Professional Documents
Culture Documents
Inference 2:
Hypothesis Testing
Marnielle A. Salig
TEST FOR INDEPENDENCE
CHI – SQUARE TEST
CHI – SQUARE TEST
• used as a test of significance when we have
data that are expressed in
frequencies, or
in terms of percentages (or proportions) but
which can be readily transformed into
frequencies.
• can used as
test concerning the population variance
goodness-of-fit test
test for independence
CHI – SQUARE TEST for Independence
Test Statistic
c r (o ij eij ) 2
2 𝑣 =(𝑟 −1)(𝑐 −1)
j i eij
(corrected )
2
j i eij
𝑣 = ( 2 − 1 ) ( 2− 1 ) =1
CHI – SQUARE TEST for Independence
Critical Region
Reject Ho if
2 2
,v
Otherwise, Ho is not rejected.
CHI – SQUARE TEST for Independence
Computation
( RiT ) (CTj )
eij
GT
CHI – SQUARE TEST for Independence
Conclusion
2
𝑣 =(𝑟 −1)(𝑐 −1)
eij
¿ ( 3−1 )(3−1 )=( 2 )( 2 ) =4
j i
14
5. Computation.
Beverage Teenagers Adult Senior Citizen TOTAL
Coffee/Tea 22 36 54 112 ( RiT ) (CTj )
Soft drinks 94 54 30 178 eij
GT
Others 34 10 16 60
NOTE: T=TOTAL; GT=GRAND
TOTAL 150 100 100 350 TOTAL; i=row, j=column
c r (oij eij ) 2 (22 48) 2 (36 32) 2 (54 32) 2 (94 76.29) 2
2
j i eij 48 32 32 76.29
(54 50.86) 2 (30 50.86) 2 (34 25.71) 2 (10 17.14) 2 (16 17.14) 2
50.86 50.86 25.71 17.14 17.14
14.08 0.5 15.125 4.11 0.19 8.556 2.673 2.97 0.08 48.29
6. Decision:
Since, 48.29 > 11.143, we reject Ho.
7. Conclusion:
Age and beverage preference are dependent.
17
We have surveyed 50 males and 100
females and asked them whether they
personally wanted to have kids. The
choices available to each person were
"yes," "no," and "undecided." Listed
here are the results of the survey.
Use alpha = 0.05
Observed Frequency
Don’t want
Gender Want Kids Undecided Row Total
Kids
Male 20 10 20 50
Female 20 20 60 100
Column 40 30 80 150
Total
Ho: There is no association between the
gender and the desire to have children
H1: There is an association between the
gender and the desire to have children
Column 40 30 80 150
Total
Don’t want
Gender Want Kids Undecided Row Total
Kids
Male 50
20 10 20
Observed
13.33 10 26.67
Expected
Female 100
20 20 20
Observed
26.67 20 53.33
Expected
= 7.51
Decision:
Since the calculated (7.51) is greater than the
critical value (5.99), we reject the null
hypothesis. This means that there is a significant
relationship/association between the gender and
their stated preferences for having children.
ASSIGNMENT: