You are on page 1of 20

Chi Square Test

(Practical/Exercise)
• This test is used to assess association between
two variables like, association between Type
of Delivery and Child Epilepsy, Smoking and
Lung Cancer, etc.
• This is an alternate test for Z test for SE(p1-p2)
when sample sizes of two samples are small.
• When association is assessed between two
variables, one is the cause and other is effect.
• Thus this test results whether there is causal
relationship between two variables.
Example 1
• Test whether removal of tonsils increase risk
of whooping cough in the child from following
information obtained in a case-control study:
a. Of the 40 total children, 5 were having
whooping cough and not had tonsillectomy.
b. Out of 22 children not having whooping
cough 7 had undergone tonsillectomy.
Given:
Tonsillectomy
TOTAL
Done Not Done

Whooping Present 13 5 18
Cough
Absent 7 15 22

TOTAL 20 20 40
Step I – Set Null Hypothesis (H0)
Null Hypothesis (H0): No significant
association between tonsillectomy and
whooping cough.
Step II – Set Alternet Hypothesis (H1)

Alternet Hypothesis (H1): Association


between tonsillectomy and whooping cough is
significant.
Step III – Decide the appropriate test
of significance to be applied
• Since
• Two variables under study, ‘Tonsillectomy’
and ‘Whooping Cough’.
• Both are qualitative type, and
• Assessment of association between two
variables

• ‘Chi Square test’ is applicable.


Considering 2×2 table as follows:
Tonsillectomy
TOTAL
Done Not Done

Whooping Present a b a+b


Cough
Absent c d c+d

TOTAL a+c b+d n=a+b+c


+d
Step IV – Calculate test value
(ad-bc)2 × (a+b+c+d)
χ2 = -----------------------------------
(a+b)×(c+d)×(a+c)×(b+d)

((13×15)-(5×7))2 × 40
= ---------------------------------- = 6.46
20×20×18×22
Step V – Decide level of significance
• Usually 5% level of significance is taken to
take the decision and to draw the inference.
Step VI – Determine degree of
freedom
• For chi square test of significance
Degree of Freedom (DF) = (c-1) × (r-1)
where
‘c’ stands for number of columns, and
‘r’ stands for number of rows
in the table
thus DF = (2-1) × (2-1) = 1
Step VII – Take Decision
• Refer Table of Theoretical values of χ2.
• Find out Table chi square value at determined
DF for pre-decided level of significance.
• Thus at 1 DF and for 5% i.e. 0.05 level of
significance Table χ2 value is 3.84.
• Since Cal χ2 > Table χ2
i.e. 6.46 > 3.84,
H0 should should be rejected at 5% level of
significance.
Step VIII – Draw Inference
• Hence
• There is no significant association
between tonsillectomy and whooping
cough.
Example 2
• In an Ophthalmic OPD 160 persons above 40
years were examined.
40 had both trachoma and corneal
degeneration while 30 had none.
Total cases of corneal degeneration obtained
were 100.
Determine if there is any association between
trachoma and corneal degeneration.
Example 3
• Using below information obtained from a case-
control study, test whether there is association
between Alcohol and Gastric Ulcer.
1. Out of 260 persons included in case-control
study 134 were diagnosed as gastric ulcer
patients.
2. 102 persons having gastric ulcer were
alcoholic and 72 persons having no gastric ulcer
were non-alcoholic.
Thanks

You might also like