- Calculate and describe the value of a chi-square statistics in context of a real-world problem
- Write a null and alternative hypothesis for a chi-square test
The Chi-Square Test Statistic
Previously, we have calculated the value of the chi-square test statistic. Let’s build upon this calculation using a simplified example in order to understand the statistic’s purpose and meaning.
Imagine you are playing a dice gambling game. Each die has 6 sides. If you roll a 1 or 2, you win. If you roll a 3 or 4, it’s a tie. If you roll a 5 or 6, your opponent wins.
You play, and you end up losing money. You want to see if the die is unfairly weighted towards the higher numbers.
Let’s calculate the chi-square statistic.
The following is the formula for the chi-square test statistic:
[latex]\chi^2=\sum\dfrac{(\text{Observed}-\text{Expected})^2}{\text{Expected}}[/latex]
If certain conditions are met (we will discuss these conditions soon!), we can compare our chi-square test statistic values to the chi-square distribution to get the probability of finding the set of rolls that we observed or one that differs more from our expectations by chance alone when the die is actually fair.
Let’s do this for the chi-square statistic value from Table D.
Step 2: Choose the appropriate degrees of freedom (number of categories – 1) and select the “Upper Tail” probability type.
Step 3: Enter the calculated chi-square statistic ([latex]\chi^2=2.28[/latex]) for Table D.
| Table D | You Win (1,2) | Tie (3,4) | You Lose (5,6) |
| Number of Rolls | 311 | 342 | 347 |