Lecture 08 Test For Independence
Lecture 08 Test For Independence
BIOSTATISTICS
TEST OF HYPOTHESIS
Lecture # 08
BY,
DR. SADIA IQBAL
PHARM-D, M.PHIL
Dated: 4th, 8th June 2024 (E)
LECTURER (PHARMACEUTICAL CHEMISTRY)
6th, 8th June 2024 (M) DCOP-DUHS
Test For Independence
LEARNING OBJECTIVES
At the end of lecture students will be able to understand
❑ Test For Independenec
❑ Exercise
❑ Chi-square Test( χ2 ):
c d c+d
are independent.
• 2nd step: State Alternative Hypothesis (HA):
o HA : Two characteristics or two criteria of classification
o test statistic:
χ2 = i=1rΣ j=1cΣ (oij-eij)2 /eij
eij = RiCj /N, e11 = R1C1 / N, e12 = R1C2 /N
o Critical region:
Χ2 > Χ2α,ν ν = (r-1) (c-1)
Χ2α,ν
• 5th step: Final statement of conclusion
Critical values
of the Chi
square
Distribution
Problem# 01:
▪The following table shows that the results of an
experiment to investigate the effect of vaccination of lab animals
against a particular disease, test the hypothesis that there is no significant
difference between the vaccinated and unvaccinated group.
e21 = R2C1 / N e22 = R2C2 / N If χ2 > χ2α,ν with ν = (r-1)(c-1), reject the
= 45 x 70/ 96 null hypothesis of independence at the α
= 45 x 26/ 96
= 32.8125 level of significance, otherwise accept the
= 12.1875 null hypothesis
Got disease Didn’t get disease TOTAL
Vaccinated 9 42 51
13.8128 37.187
Not vaccinated 17 28 45
12.187 32.81
Total 26 70 96
Hypertension 21 36 30
No Hypertension 48 26 19
Over 25 hours 5 9
Under 25 hours 9 7
Using a 0.01 level of significance, test the hypothesis that a person’s gender and time
watching television are independent.
Conclusion:
Calculated value of χ2 lies in the accepted region so we accept null hypothesis and
conclude that Person’s gender and time watching television are independent.
Problem# 05:
▪Question# 15 on page 344 of book “Introduction to Statistics” by Ronald E. Walpole,
3rd edition.
A random sample of 400 college students are classified according to class status and
drinking habits.
Freshman Sophomore Junior Senior
Heavy Drinkers 29 41 33 28
Moderate Drinkers 32 29 36 39
Nondrinkers 55 34 27 17
Test the hypothesis that class status and drinking habits are independent. Use a 0.05
level of significance.
Conclusion:
Calculated value of χ2 lies in the rejected region so we reject null hypothesis and conclude
that the class status and drinking habits are not independent.