\( \chi^2 \) (Chi Square) Test
Explanations & examples:![]() To see the formulas used in the calculations of the chi-square statistic (χ2) and the corresponding p-value, please see the page formulas. Example:We want to investigate whether there is a connection between having a specific sex and preferring specific types of sports. In other words; whether the two variables "sex" and "preferred sport" are either independent of each other or influence each other. If the latter is the case, then information about a person's sex would increase the probability of that person preferring specific types of sports compared to if that person had belonged to the opposite sex. In a high school there are 731 students, 369 girls and 362 boys. In a survey, the students were asked what their favourite sport is. The results figure in the following table:
We phrase the null hypothesis: The two variables "sex" and "preferred sport" are independent of each other. The null hypothesis can of course be phrased in more than one way. An alternativ, that states the same essense, would be; There is no connection between a person's sex and a person's favourite sport. By entering this observed data into the table we perform the chi-squared test of independence between the two variables. ![]() ![]() The p-value of the test is p = 0.0000 which is far below 0.05. And therefore we reject the null hypothesis. So we reject that the two variables "sex" and "preferred sport" are independent of each other. Therefore the opposite of that must be true, namely H1; that the two variables are dependent on each other, meaning that boys prefer specific types of sport more than girls and girls prefer specific types of sports more than boys. So a person's sex does have an influence on the probability of that person having a specific sport as his/her favourite in this fictive, made-up example. Note that the chi-square statistic (the number χ2) is larger than the critical value of chi-squared. This is the case, because the p-value is below 0.05, otherwise the χ2 number would have been smaller than the critical value. For an illustration of this, please see the page tables |
Rows:
Columns:
|
Show:
Expected values
Percentual deviation Contributions to \( \chi^2 \) |
Decimals:
|
|||||||||||||||||||||
|