Professional Documents
Culture Documents
Chi Square Test of Independence Dennis Gaces
Chi Square Test of Independence Dennis Gaces
• Null hypothesis (H0): Variable 1 and variable 2 are not related in the
population; The proportions of variable 1 are the same for different values of
variable 2.
• Alternative hypothesis (Ha): Variable 1 and variable 2 are related in the
population; The proportions of variable 1 are not the same for different values of
variable 2.
HOW TO CALCULATE THE TEST
STATISTIC (FORMULA)
Pearson’s chi-square (x²) is the test statistic for the chi-square test of independence:
Where
• Χ2 is the chi-square test statistic
• Σ is the summation operator (it means “take the sum of”)
• O is the observed frequency
• E is the expected frequency
STEPS TO PERFORM THE
CHI-SQUARE TEST OF INDEPENDENCE
Use the contingency table to calculate the expected frequencies following the
formula:
Expected Value =
Row total
Grand total
Column total
CALCULATE CHI-SQUARE
F I N D TH E C R I TI C A L C H I - SQ U A R E VA LU E
(OR)
G E T TH E C O R R ES PO N D I N G P - VA LU E
You can find the critical value in a chi-square critical value table or using statistical
software. You need to know two numbers to find the critical value:
1
2
• If the x² value is greater than the critical value, then the difference between
the observed and expected distributions is statistically significant (p < α).
o The data allows you to reject the null hypothesis that the variables are unrelated
and provides support for the alternative hypothesis that the variables are related.
• If the x² value is less than the critical value, then the difference between the
observed and expected distributions is not statistically significant (p > α).
o The data doesn’t allow you to reject the null hypothesis that the variables are
unrelated and doesn’t provide support for the alternative hypothesis that the
variables are related.
EXAMPLE
Expected Value =
26.13 64 21.87
22.86 56 19.13
JOGGER
Expected Value (34) = (112*49)/210
Expected Value (57) = (112*120)/210
Expected Value (41) = (112*41)/210
NON-JOGGER
Expected Value (34) = (98*15)/210
Expected Value (57) = (98*63)/210
Expected Value (41) = (98*20)/210
Step 3: Find the critical chi-square value (or) get the corresponding p-value
x² = 6.79
df = (no. of columns -1) (no. of rows-1)
= (3-1)(2-1)
=2
Step 4: Compare the chi-square value to the critical value (or) compare the p-value to the level of significance (α)
x² = 6.79 vs Critical value is 5.991
Th e Χ 2 v al ue is g r e at e r t h a n t h e c r it i ca l v al ue , a nd t he p - v a lu e < 0 .0 5 ,
r e jec t s t he nu ll h yp o t h es is ( H 0 ) . Th e r ef or e , t h e r e i s a s ig n if ic a n t
r e lat io ns hi p be t w e e n Jo g gin g an d B lo od p r e ss u r e.