Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

CHAPTER 18 : CHI-SQUARED TEST

1. Two hundred adult smokers are asked whether they agree to quit smoking. 2. The power lines across a range of mountains are constantly struck by lightning.
The results are shown in the table below. The number of occurrence per week is recorded for the past 72 weeks.
The results obtained are shown in the table.
Response Strongly agree Agree Disagree Strongly disagree
No. of smokers 97 55 33 15 No. of lightning strikes per week 0 1 2 3 ≥4
No. of weeks 14 21 17 12 8
A researcher claims that the smokers' response towards quit smoking is in
the ratio of 4 : 3 : 2 : 1. Determine, at the 5% significance level, whether the Perform a 2 goodness of fit test, at the 1% significance level, to determine
researcher's claim is justified. [8] whether the data fits a Poisson distribution with a mean of 2. [8]

Ho : Smokers' response towards quit smoking is in the ratio of 4 : 3 : 2 : 1 You may use the probability distribution of a Poisson random variable with
mean 2 given below.
H1 : Smokers' response towards quit smoking is not in the ratio of 4 : 3 : 2 : 1
No. of occurrence 0 1 2 3 ≥4
Probability 0.1353 0.2707 0.2707 0.1804 0.1429
SA A D SD Sum
Oi 97 55 33 15 200
H0 : The observed data fits a Po(2)
4 3 2 1
(200) = 80 (200) = 60 (200) (200) H1 : The observed data does not fits a Po(2)
Ei 10 10 10 10
= 80 = 40 = 20 200
x (Oi  E i )2
(Oi  Ei )2 x Oi [ ( 2x ! ) ] x 72
Ei = e  2
Ei
Ei 3.613 0.417 1.225 1.25 6.505
0 14 9.742 1.861
1 21 19.490 0.117
v=4–1=3: At  = 0.05, reject Ho if  2cal >  20.05 (3) (= 7.815) 2 17 19.490 0.318
3 12 12.989 0.075
Since  2cal = 6.505 (< 7.815)  Do not reject Ho (Accept Ho) ≥4 8 72 – [E1 + E2 + E3 + E4] = 10.289 0.509
There is insufficient evidence to reject the researcher’s claim at 5 % significance level 72 72  2cal = 2.880
Note : There is sufficient evidence to accept the researcher’s claim at 5 %
significance level. v=5–1=4: At  = 0.01, reject Ho if  2cal >  20.01, 4 (= 13.28)

Since  2cal = 2.880 (< 13.28), there is insufficient evidence to reject H0


 The distribution of lightning strikes per week fits a Poisson Distri. with mean 2.
5 Oi 2 14 2 212 17 2 12 2 82
Alternative :  2cal =  – N = ( 9.742 + 19.490 + 19.490 + 12.989 + 10.289 ) – 72
1 Ei
= 2.881

18-1
3. The numbers of dengue cases reported for the first 4 months of a certain year in 4. The symptom of hypertension and smoking habit for 120 individuals is shown
a state is shown the table below. in the contingency table below.
No. of cases 0 1 2 3 4 5 ≥6 Smoking
No. of days 3 12 20 28 23 18 16 habit Heavy Moderate Non-
Symptom of smokers smokers smokers
Test at the 5% significance level whether the Poisson distribution with a hypertension
parameter of 3.5 is a suitable model for the data. [8] Presence 22 25 15
Ho : Poisson distribution with mean 3.5 is a suitable model for the data. Absence 16 18 24
H1 : Poisson distribution with mean 3.5 is not a suitable model for the data.
Using a chi-squared test, at the 5% significance level, determine whether
the symptom of hypertension is independent of smoking habit. [11]
3 .5 x
X  Po(3.5) : Ei = P(X = x) x 120 = e –3.5 . x 120
x! H0 : The symptom of hypertension is independent of smoking habit
0 H1 : The symptom of hypertension is not independent of smoking habit
3.5 3 .5
x = 0 : E1 = e –3.5 . x 120 = 3.624 x = 1: E2 = e –3.5 . x 120 = 12.683
0! 1!
r xc Smoking habits
–3.5 3.5 2 –3.5 3.5 3 n Total
x = 2 : E3 = e . x 120 = 22.195 x = 3: E4 = e . x 120 = 25.894 H M N
2! 3!
3.5 4 3.5 5 62 x 38 62 x 43
x = 4 : E5 = e –3.5 . x = 5: E6 = e –3.5 .

Symptom
x 120 = 22.657 x 120 = 15.860 P = 19.63 = 22.22 62 – E11 – E12 = 20.15 62
4! 5! 120 120
5
A 38 – E11 = 18.37 43 – E12 = 20.78 39 – E13 = 18.85 58
x ≥ 6 : E7 = 120 –  Ei = 17.087
i0 Total 38 43 39 120
Since E1 < 5, combine E1 with E2.

(Oi  E i )2 (Oij  E ij )2 v = (2 – 1)(3 – 1) = 2


Oi Ei Oij Eij At  = 0.05, reject Ho
Ei E ij
15 16.307 0.105 19.63 0.286 if  2cal >  20.05 , 2 (= 5.991)
22
20 22.195 0.217 25 22.22 0.348
28 25.894 0.171 Since  2cal =4.035 < 5.991
15 20.15 1.316
23 22.657 0.001 16 18.37 0.306  Cannot reject Ho
18 15.860 0.289 18 20.78 0.372
16 17.087 0.069 24 18.85 1.407 We have sufficient evidence to conclude
120 120  2cal = 0.852 120 120  2cal = 4.035
that the symptom of hypertension is
independent of smoking habit, at  = 0.05
v = (6 – 1) = 5 : At  = 0.05, reject Ho if  2cal > 11.07 [ =  20.05 (5) ] Alternative :
Since  2cal = 0.852 (< 11.07)  Cannot reject Ho Oij 2 2 2 2 2
 2cal =  22 2 25 15 16 18 24 2
– N = ( 19.43 + 22.22 + 20.15 + 18.37 + 20.78 + 18.85 ) – 120 = 4.035
We have sufficient evidence to conclude that Poisson distribution with mean 3.5 is a E ij
suitable model for the data at  = 0.05.

18-2
5. An environmentalist investigates whether there is association between 6. A survey of 200 participants to study the preferred communication methods of two
temperature and air quality. Temperature and air quality of 200 randomly generations is carried out. The results of the survey are shown in the table below.
selected days are recorded as follows :
Preferred communication method
Air quality Internet Phone call SMS
Good Moderate Unhealthy X 28 43 39
Generation
Low 25 20 11 Y 47 17 26
Temp

Moderate 28 27 16
High 18 21 34 Determine, at the 5% significance level, whether there is evidence to reject the
null hypothesis that preferred communication methods and the generations are
Perform a chi-squared test at the 5% significance level to determine
independent. [10]
whether there is an association between temperature and air quality. [11]
H0 : The PCMs and the generations are independent.
Ho : There is no association between temperature and air quality
H1 : The PCMs and the generations are not independent.
H1 : There is an association between temperature and air quality

r xc Air quality PCM


Total
Total Int PC SMS
n G M U
110 x 75 = 41.25 110 x 60 = 33
56 x 71 = 19.88 56 x 68 = 19.04 56 – E11 – E12 X 110 – E11 – E12 = 35.75 110

Gen.
L 56 200 200
200 200
Temperature

= 17.08 Y 75 – E11 = 33.75 60 – E12 = 27 65 – E13 = 29.25 90


71 x 71 = 25.21 71 x 68 = 24.14 71 – E21 – E22
M 71 Total 75 60 65 200
200 200 = 21.65
71 – E11 – E21 68 – E21 – E22 61 – E13 – E23
H 73
= 25.91 = 24.82 = 22.27
Total 71 68 61 200 (Oij  E ij )2
Oij Eij v = (2 – 1)(3 – 1) = 2
E ij
v = (3 – 1)(3 – 1) = 4 : At  = 0.05, reject Ho if  2cal >  20.05 , 4 (= 9.488)
28 41.25 4.2561 At  = 0.05, reject Ho
43 33 3.0303 if  2cal >  20.05 , 2 (= 5.991)
(Oij  E ij ) 2 39 35.75 0.2955
Oij Eij 47 33.75 5.2019
E ij
17 27 3.7073 Since  2cal = 16.849 (> 5.991)
26 19.25 0.3811
25 19.88 1.319
 Reject Ho
20 19.04 0.048
Since  2cal = 14.834 (> 9.488) 200 200  2cal = 16.849
11 17.08 2.164
28 25.21 0.309  Reject Ho There is sufficient evidence to conclude ‘the preferred communication methods and
27 24.14 0.339 the generations are not independent’.
16 21.65 1.474 6
 We have sufficient evidence to Oi 2
 28 2 43 2
18 25.91 2.415 2 2 2 2
Alternative :  2cal = – 200 = ( 41.25
47
+ 33.75 + 33
+ 17
27
39
+ 35.75 26
+ 29.25 ) – 200
21 24.82 0.588 conclude that there is an Ei
1
34 22.27 6.178 association between temperature = 16.849
200 200  2cal = 14.834 and air quality, at  = 0.05.

18-3
7. The milk yield from two breeds of goats, 8. A farmer claims that three types of eggs of grades A, B and C which are produced
Milk yield in his poultry farm are in the ratio of 2 : 4 : 3 respectively. In a random sample
A and B, is categorised as low, medium
or high. One hundred goats in a random Low Medium High of 180 eggs, 30 eggs are classified as grade A, 96 eggs as grade B and 54 eggs
sample are classified according to breed A 32 20 16 as grade C. Perform a test, at the 1 % significance level, to determine whether

Bread
and milk yield. The results are there is an evidence that the farmer’s claim is justified. [8]
summarised in the table. B 10 18 4
Ho : The data are in the ratio of 2 : 4 : 3
Perform a chi-squared test, at the 5% significance level, to determine whether
H1 : The data are not in the ratio of 2 : 4 : 3
there is an association between the breed of goats and the milk yield. [11]

A B C Sum
Ho : There is no association between the breed of
goats and the milk yield Oi 30 96 54 180
H1 : There is an association between the breed of 2 x 180 = 40 4 x 180 = 40
goats and the milk yield Ei 9 9 180 – E1 – E2 = 60 180

Milk yield (Oi  Ei )2


Total 2.5 3.2 0.6 6.3
L M H Ei
68 x 42 = 28.56 68 x 38 = 25.84
A 68 – E11 – E12 = 13.6 68
Breed

100 100 v=3–1=2: At  = 0.01, reject Ho if  2cal >  20.01 , 2 (= 9.21)


B 42 – E11 = 13.44 38 – E12 = 12.16 20 – E13 = 6.4 32
Since  2cal = 6.3 (< 9.21)  Do not reject Ho
Total 42 38 20 100
There is insufficient evidence to reject the farmer’s claim at 1 % significance level. goats a

v = (2 – 1)(3 – 1) = 2 : At  = 0.05, reject Ho if  2cal >  20.05 , 2 (= 5.991)


Note :

(Oi  Ei )2 At the 1% significance level, there is sufficient evidence to justify the farmer’s claim
Oi Ei
Ei At the 1% significance level, there is insufficient evidence the farmer’s claim is not
32 28.56 0.414 justified
10 13.44 0.881 Since  2cal = 6.744 (> 5.991)  Reject Ho At the 1% significance level, there is no evidence that the ratio is not 2 : 4 : 3
20 25.84 1.320
18 12.16 2.805 We have sufficient evidence to conclude
16 13.6 0.424 that There is an association between
4 6.4 0.900 the breed of goats and the milk yield
at  = 0.05.
100 100  2cal = 6.744

18-4
9. The classification of 100 chickens
according to the breed and the Size of eggs Alternative : (With Yates Correction)
size of eggs produced are shown Small Large
in the contingency table.
A 42 18 ( Oij  E ij  0.5)2

Bread
Test at the 5% significance level Oij Eij
E ij
whether there is a relationship between B 19 21 Since  2cal = 4.205 (> 3.841)  Reject Ho
breed and the size of eggs produced. [8] 42 36.6 0.656
18 23.4 1.026 We have sufficient evidence to conclude
Ho : There is no relationship between breed and the size of eggs produced 19 24.4 0.984 that there is a relation between breed and
H1 : There is a relationship between breed and the size of eggs produced 21 15.6 1.539 the size of eggs produced at  = 0.05.
100 100  2cal = 4.205
Milk yield
Total
S L
60 x 61 = 36.6
A
100 60 – E11 = 23.4 60
Breed

B 61 – E11 = 24.4 39 – E12 = 15.6 40


Total 61 39 100

v = (2 – 1)(2 – 1) = 1 : At  = 0.05, reject Ho if  2cal >  20.05 ,1 (= 3.841)

(Oij  E ij )2
Oij Eij
E ij
Since  2cal = 5.107 (> 3.841)  Reject Ho
42 36.6 0.797
18 23.4 1.246
19 24.4 1.195 We have sufficient evidence to conclude
21 15.6 1.869 that there is a relation between breed and
the size of eggs produced at  = 0.05.
100 100  2cal = 5.107

18-5

You might also like