Chi-Square
What do you do when your data is not continuous/normally distributed?
- If you have count data, you can do a chi-square test.
- Examples
- Number of men vs. women
- Number of heart attacks in a drug study
- Comparing number of students attending two classes
- etc.
How the chi-square test works.
- Calculate the number of observations expected in each cell or
condition (according to the null hypothesis).
- Compare how well the actual data corresponds to the null
hypothesis.
- If the fit is poor, reject the null hypothesis
How does the chi-square relate to previous tests.
- Like the ANOVA or F test, it is one tailed (X2 is always
positive).
- Like the t-test, X2 is different for different degrees of freedom
Here's an example problem for a one way chi-square:
In Monty Hall's game show there are three doors A,
B, and C. The null hypothesis is that contestants will choose each
door with equal frequency.
What is the expected cell count if there are 60 contestants?
Here is the observed data:
Calculate the chi square statistic.
(10-20)2/20+(10-20)2/20+(40-20)2/20=30
- This is the (observed-expected)2/expected for each of the three cells.
- A larger X2 signals greater deviance from the null hypothesis.
Is this significant? There are c-1=2 degrees
of freedom. The critical value for X2 is 5.99.
Like the t and F, different distributions for different degrees of freedom. Only the right end of the tail matters.
2 degrees of freedom
4 degrees of freedom