Discussion 6 Hypothesis Test of Chi Square
Discussion 6 Hypothesis Test of Chi Square
Discussion 6 Hypothesis Test of Chi Square
5
USING THE APPROPRIATE
TEST STATISTIC
(𝑂 − 𝐸 )2
𝒙 =∑𝟐
where:
𝐸
O = observed frequencies
= expected frequencies
6
EXAMPLE 1
The following table shows the results of a survey in which the subjects were a
sample of 300 adults residing in a certain metropolitan area. Each subject was asked
to indicate which of three policies they favored with respect to smoking in public
places. Can one conclude from these data that in the sampled population, there is a
relationship between the level of education and the attitude towards smoking in
public places?
7
EXAMPLE 1
STEP 1: Formulate the null and the alternative hypothesis (in words)
Level of significance:
8
EXAMPLE 1
STEP 3: Decide the test static to be used and determine the critical value/s (tabular
value/s) from the appropriate table.
Test statistic:
Chi-square
𝟐 (5 −8.17)2 (44 − 42.93)2 (18 −14.70)2 (3 − 4 .20)2 (15 −17.50)2 (100 − 92)2
𝒙 = + + + + +
8.17 42.93 14.70 4.20 17.50 92
+(30 −31.50) (5− 9) (15 − 9.33) ( 40 −4 9.07) (15 − 16.80) (10 − 4.80)2
2 2 2 2 2
+ + + + +
31.50 9 9.33 49.07 16.80 4.80
11
𝒙 𝟐 ≈ 16.191
EXAMPLE 1
STEP 5: Make a decision
Observe that the computed chi-square value is greater than the critical
value and it is on the critical region (or falls on the rejection region). Thus,
we reject the null hypothesis (Ho).
𝒙𝟐 ≈ 𝟏𝟔. 𝟏𝟗𝟏
13
EXAMPLE 2
STEP 1: Formulate the null and the alternative hypothesis (in words)
Level of significance:
14
EXAMPLE 2
STEP 3: Decide the test static to be used and determine the critical value/s (tabular
value/s) from the appropriate table.
Test statistic:
Chi-square
C C C C
C C C C
C C C C
C C C C
C C C C
(12− 9.08)2 (5 −10.24 )2 (12 −10.82)2 (11− 9 .86)2 (5 − 9.99)2 (14 −11.27 )2
𝟐
𝒙 = + + + + +
9.08 10.24 10.82 9.86 9.99 11.27
+(14 −11.90) (11−10.84 ) (5 −7.72) (6 − 8.71) (12− 9.20) (11 −8.38)2
2 2 2 2 2
+ + + + +
11.90 10.84 7.72 8.71 9.20 8.38
+(10 −9.99) (8 −11.27) (13 − 11.90) (13 −10.84) (15 −10.22) (20 −11.52)2
2 2 2 2 2
+ + + + +
9.99 11.27 11.90 10.84 10.22 11.52
2 2
+(5 − 12.17) (5 − 11.09) 17
12.17
+
11.09
≈ 28.408
EXAMPLE 2
STEP 5: Make a decision
Observe that the computed chi-square value is greater than the critical
value and it is on the critical region (or falls on the rejection region). Thus,
we reject the null hypothesis (Ho).
𝒙𝟐 ≈ 𝟐𝟖 . 𝟒𝟎𝟖
18
GENERALIZATION
19
“
When do we use the test of difference
and test of relationship in Chi-square
test?
20
QUESTIONS?
21