2. Larson & Farber, Elementary Statistics: Picturing the World, 3e 2
Chi-square test
Chi-square test is a "non-parametric" method because it
doesn’t require the assumptions of population parameters
nor do they test hypotheses about population parameters.
For chi-square test, the data are frequencies rather than
numerical scores
Chi-square test can answer the three questions:
Goodness of fit: Are the proportions of the different outcomes in
this population equal to the hypothesized proportions?
Independence: Are two different variables independent in this
population?
Homogeneity: Are the proportions of the different outcomes in
one population equal to those in another population?
Lemma Derseh, Department of Epidemiology and Biostatistics, University of Gondar
3. Larson & Farber, Elementary Statistics: Picturing the World, 3e 3
Chi-square test …
Steps in caring out chi-square test
Step 1: Set the null and alternative hypotheses
Step 2: Calculate the expected frequencies for each category
combination
Step 3: Verify the assumptions for the chi-square test are
satisfied.
Step 4: Select α based on the level of seriousness of
making type I error
Lemma Derseh, Department of Epidemiology and Biostatistics, University of Gondar
4. Larson & Farber, Elementary Statistics: Picturing the World, 3e 4
Chi-square test …
NB. Hypotheses testing using chi-square tests are always
right-tailed.
Lemma Derseh, Department of Epidemiology and Biostatistics, University of Gondar
5. Larson & Farber, Elementary Statistics: Picturing the World, 3e 5
Chi-square test …
Lemma Derseh, Department of Epidemiology and Biostatistics, University of Gondar
Decision procedure in chi-square test
6. Larson & Farber, Elementary Statistics: Picturing the World, 3e 6
Chi-square test …
Assumptions
No expected count is less than 1, and 80% of the counts
must be > 5
Combine columns/rows to increase expected counts that
are too low
There is no requirement that every observed frequency must
be at least 5.
Also, there is no requirement that the population must have a
normal distribution or any other specific distribution.
Lemma Derseh, Department of Epidemiology and Biostatistics, University of Gondar
7. Larson & Farber, Elementary Statistics: Picturing the World, 3e 7
Chi-square test of independence
In chi-square test of independence, we take a single random
sample from a population and classify them by two
characteristics
Each of the two characteristics/variables will have at least two
levels/categories
One characteristic with its levels will be placed in the row while
the other one in the column to form a contingency table
Null hypothesis: H0: there is no association between
characteristic one and two
Alternative Hypothesis: there is association between them
Example: to test whether being Left-Handed is independent of Gender
H0: Hand preference is independent of gender
HA: Hand preference is not independent of gender
Lemma Derseh, Department of Epidemiology and Biostatistics, University of Gondar
8. Larson & Farber, Elementary Statistics: Picturing the World, 3e 8
Chi-square test of independence cont…
130 unmarried, 34 were
illiterate
120 divorced, 42 were
illiterate
90 Married, 67 illiterate
Marital
status
Education
Total
illiterate Literate
Unmarried 34 96 130
Divorced 42 78 120
Married 67 23 90
Total 143 197 340
Lemma Derseh, Department of Epidemiology and Biostatistics, University of Gondar
Example: to test whether marital status is independent of education
H0: Education is independent of marital status
HA: Education is not independent of martial status
9. Larson & Farber, Elementary Statistics: Picturing the World, 3e 9
Overall:
P(Illiterate)
= 143/340 = 0.42
If independent, then P(Illiterate| Unmarried) =
P(Illiterate| Divorced) = P(illiterate| Married) = 0.42
So we would expect 42% of the 130 unmarried and 42% of the 120
divorced and 42% of 90 married women to be illiterate
i.e., we would expect (130)(0.42) = 54.6 unmarried to be illiterate
(120)(0.42) = 50.4 divorced to be illiterate
(90)(0.42) = 37.8 married to be illiterarte
Chi-square test of independence
cont…
Lemma Derseh, Department of Epidemiology and Biostatistics, University of Gondar
130 unmarried, 34 were illiterate
120 divorced, 42 were illiterate
90 Married, 67 illiterate
10. Larson & Farber, Elementary Statistics: Picturing the World, 3e 10
Chi-square test of independence
cont…
Under Ho, we calculate the expected frequencies as
Marital status
Illiterate
Total
Illiterate Literate
Unmarried
Observed = 34
Expected = 54.7
Observed = 96
Expected = 75.3
130
Divorced
Observed = 42
Expected = 50.5
Observed = 78
Expected = 69.5
120
Married Observed = 67
Expected = 37.9
Observed = 23
Expected = 52.1
90
143 197 340
6
.
54
1
.
52
)
1
.
52
23
(
...
3
.
75
)
3
.
75
96
(
5
.
54
)
5
.
54
34
( 2
2
2
2
size
sample
Total
al)
Column tot
total)(
Row
( th
th
ij
j
i
e
Lemma Derseh, Department of Epidemiology and Biostatistics, University of Gondar
11. Larson & Farber, Elementary Statistics: Picturing the World, 3e 11
Chi-square test of independence cont…
Here, 2
cal = 54.5
> 5.99. So we reject
H0 and conclude
that marital status
and education are
not independent
Decision Rule:
If 2
cal > 5.99, reject
H0 ,otherwise, do
not reject H0
At df = (r-1)(c-1) = (2)(1) = 2, 2
cal = 54.5
Lemma Derseh, Department of Epidemiology and Biostatistics, University of Gondar
5.99
12. Larson & Farber, Elementary Statistics: Picturing the World, 3e 12
Lemma Derseh, Department of Epidemiology and Biostatistics, University of Gondar
Inferential statistics
13. Larson & Farber, Elementary Statistics: Picturing the World, 3e 13
Lemma Derseh, Department of Epidemiology and Biostatistics, University of Gondar