#+TITLE: Rapport package team
#+AUTHOR: Homogeneity test of factor variables
#+DATE: 2011-04-26 20:25 CET
** Description
Test of homogeneity of a given factor variable split by another factor.
*** Variable description
Analysing "gender" ("Gender") with /673/ valid values whether frequency
counts are distributed equally across different categories of "dwell"
("Dwelling").
"dwell" has /3/ categories:
- city
- small town
- village
#+BEGIN_HTML
#+END_HTML
*** Counts
| | male | female | Missing | Sum |
|----------------+--------+----------+-----------+-------|
| *city* | 338 | 234 | 27 | 599 |
| *small town* | 28 | 3 | 2 | 33 |
| *village* | 19 | 9 | 2 | 30 |
| *Missing* | 25 | 17 | 5 | 47 |
| *Sum* | 410 | 263 | 36 | 709 |
#+CAPTION: Counted values: "dwell" and "gender"
*** Chi-squared test
Our [[http://en.wikipedia.org/wiki/Null_hypothesis][null hypothetis]]
says that the proportion of /gender/ is indentical in each categories of
/dwell/.
| Test statistic | df | P value |
|------------------+------+---------------|
| 16.18 | 6 | /0.01282/ * |
#+CAPTION: Pearson's Chi-squared test: =table=
The chi-squared test returned the value of /16.18/ with a degree of
freedom being /6/. Based on the returned
[[http://en.wikipedia.org/wiki/P-value][p value]] (/0.01282/) we could
state that the null hypothesis is rejected.
--------------
This report was generated with [[http://www.r-project.org/][R]] (3.0.1)
and [[http://rapport-package.info/][rapport]] (0.51) in /0.298/ sec on
x86\_64-unknown-linux-gnu platform.
[[images/logo.png]]