Chapter 15 Chi-Square Test
Usage: To check for a relationship between variables.
Requirements: Two nominal variables.
Steps to running a chi-square test:
- Write out null and alternative hypotheses.
- Calculate \(\chi^2\)-value.
- Determine critical \(\chi^2\)-value (yep!) for rejection of null hypothesis.
A. Use degrees of freedom (df) and alpha level. - Calculate \(\chi^2\)-value.
- Compare your calculated \(\chi^2\)-value to the critical \(\chi^2\)-value.
A. If your calculated value is greater than the critical value, you reject the null hypothesis.
B. If your calculated value is less than the critical value, you fail to reject the null hypothesis.
- Calculate effect size (Cramer’s V).
15.1 Example Setup
15.1.1 Hypotheses
\(\Large H_0: X\ and\ Y\ are\ unrelated\)
\(\Large H_1: X\ and\ Y\ are\ related\)
15.1.2 Calculate Chi-Square
\(\Large N = number\ of\ participants\)
\(\Large O = observed\ values\ in\ each\ cell\)
\(\Large CMF_{cell} = \sum values\ in\ column\)
\(\Large RMF_{cell} = \sum values\ in\ row\)
\(\Large E_{cell} = (\frac{CMF_{cell}}{N})*(RMF_{cell})\)
\(\Large \chi^2 = \sum \frac{(O_{cell} - E_{cell})^2}{E_{cell}}\)
15.1.3 Determine Critical Chi-Square Value (CV)
\(\Large df = (rows - 1)(columns - 1)\)
\(\Large \alpha = .05\)
\(\Large CV = [check\ table]\)
15.1.4 Compare Observed Chi-Square to CV
If \(\chi^2\) is greater than the CV, reject the null hypothesis.
If \(\chi^2\) is less than the CV, fail to reject the null hypothesis.
15.1.5 Calculate Effect Size
\(\Large L = number\ of\ levels\ of\ variable\ with\ least\ levels\)
\(\Large V = \sqrt{\frac{\chi^2}{N*(L - 1)}}\)
15.2 Chi-Square Goodness-of-Fit Test
This involves testing the relative frequencies of a single nominal variables. The setup is similar to a general \(\chi^2\) test. The main difference is the calculation of the expected frequencies.
\(\Large rf_{category} = given\)
Or, if it is not given and all categories are expected to be proportional:
\(\Large rf_{category} = \frac{N}{number\ of\ categories}\)
\(\Large E_{category} = (rf_{category})*(N)\)
15.3 Tips
\(\chi^2\) is pronounced K-Y
, NOT CH-Y
.
Remember not to get \(\chi^2\) mixed up with X.
Draw a table like the one below to organize your calculations as you go.
Cell | \(O\) | \(E\) | \(O - E\) | \((O - E)^2\) | \(\frac{(O - E)^2}{E}\) |
---|---|---|---|---|---|
Religious Males | 20 | 23.08 | -3.08 | 9.49 | 0.41 |
Religious Females | 30 | 26.92 | 3.08 | 9.49 | 0.35 |
Non-Religious Males | 10 | 6.92 | 3.08 | 9.49 | 1.37 |
Non-Religious Females | 5 | 8.08 | -3.08 | 9.49 | 1.17 |
\(\chi^2\) | 3.30 |