Chi Square Test
Chi Square Test
We reject 𝐻0 .
A random sample of size 25 from a population
gives the sample standard deviation 8.5. Test the
hypothesis that the population s.d. is 10.
𝐻0 : 𝜎 2 = 100
𝐻1 : 𝜎 2 ≠ 100
(𝑛−1)𝑠 2 24×8.52
𝑇𝑒𝑠𝑡 𝑠𝑡𝑎𝑡𝑖𝑠𝑡𝑖𝑐: 𝜒 2 = = = 17.34
𝜎2 100
𝑇𝑎𝑏𝑙𝑒 𝑣𝑎𝑙𝑢𝑒 𝑤𝑖𝑡 24 𝑑. 𝑜. 𝑓 = 36.415
Calculated value < Table value. 𝐻0 is accepted.
Nominal data are used to label variables without any
quantitative value. Common examples
include male/female, hair color, nationalities, names of
people, and so on.
Using chi-square test, find the digits were distributed in equal number in the tables.
Table value at 9
d.o.f at 5% =
16.919
Calculated
value < Table
value
𝐻0 𝑖𝑠 𝑎𝑐𝑐𝑒𝑝𝑡𝑒𝑑.
Note:
• We convert all frequencies to whole number so that 𝑂 = 𝐸
• All the frequency should be ≥ 10, 𝑜𝑡𝑒𝑟𝑤𝑖𝑠𝑒 𝑟𝑒𝑔𝑟𝑜𝑢𝑝.
Fit a Poisson distribution for the following data and also test the
goodness of fit.
X 0 1 2 3 4 5
f 142 156 69 27 5 1
Solution:
𝐻0 : 𝑃𝑜𝑖𝑠𝑠𝑜𝑛 𝑓𝑖𝑡 𝑖𝑠 𝑔𝑜𝑜𝑑
𝑒 −𝜆 𝜆𝑥
𝐹𝑜𝑟 𝑎 𝑃𝑜𝑖𝑠𝑠𝑜𝑛 𝑑𝑖𝑠𝑡𝑟𝑖𝑏𝑢𝑡𝑖𝑜𝑛, 𝑃 𝑋=𝑥 = , 𝑤𝑒𝑟𝑒 𝑥 = 0,1,2, …
𝑥!
𝑓𝑖 𝑥𝑖 400
𝑤𝑒𝑟𝑒 𝜆 = 𝑚𝑒𝑎𝑛 = = =1
𝑓𝑖 400
𝑥𝑖 O=𝑓𝑖 𝑥𝑖 𝑓𝑖 𝑁 𝑒 −𝜆 𝜆𝑥 (𝑂 − 𝐸)2
𝐸=
𝑥! 𝐸
0 142 0 400 × 𝑒 −1 10 0.17
= 147
0!
1 156 156 400 × 𝑒 −1 11 0.55
= 147
1!
2 69 138 400 × 𝑒 −1 12 0.34
= 74
2!
3 27 81 400 × 𝑒 −1 13 0.03
= 25
3!
4 5 33 20 400 × 𝑒 −1 14
=6 32
4!
5 1 5 400 × 𝑒 −1 15
=1
5!
N= 𝑂 = 𝑓𝑖 𝑥𝑖 =400
𝐸 = 400
400
1.09
Table value of 𝜒 2 𝑎𝑡 𝑛 − 2 = 4 − 2 = 2 𝑑. 𝑜. 𝑓 =
5.99 (𝑎𝑡 5% 𝑙𝑒𝑣𝑒𝑙)
A.U 2022
X 0 1 2 3 4
f 419 352 154 56 19
A survey of 320 families with 5 children each revealed the following
distribution:
No. of 5 4 3 2 1 0
Boys
No. of girls 0 1 2 3 4 5
No. of 14 56 110 88 40 12
families
Is this result consistent with the hypothesis that male and female births are equally
probable?
Accept H0.
(𝑎 + 𝑏)(𝑎 + 𝑐) (𝑎 + 𝑏)(𝑏 + 𝑑)
𝐸 𝑎 = 𝐸 𝑏 =
𝑁 𝑁
(𝑐 + 𝑑)(𝑎 + 𝑐) (𝑐 + 𝑑)(𝑏 + 𝑑)
𝐸 𝑐 = 𝐸 𝑑 =
𝑁 𝑁
𝐷𝑒𝑔𝑟𝑒𝑒𝑠 𝑜𝑓 𝑓𝑟𝑒𝑒𝑑𝑜𝑚 = 𝑟 − 1 𝑐 − 1 ,
𝑟 = 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑟𝑜𝑤𝑠, 𝑐 = 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑐𝑜𝑙𝑢𝑚𝑛𝑠
On the basis of information given below about the treatment of 200
people suffering from a disease, state whether the new treatment is
comparatively superior to the conventional or customary treatment.
𝜒 2 =18.18
TABLE VALUE OF 𝜒 2 AT (r-1)(c-1)=1 d.o.f = 3.841
O E (𝑂 − 𝐸)2
𝐸
450 300 75
550 700 32.14
150 300 75
850 700 32.14
𝜒 2 = 214.28
𝑇𝑎𝑏𝑙𝑒 𝑣𝑎𝑙𝑢𝑒 𝑎𝑡 1 𝑑. 𝑜. 𝑓 𝑎𝑡 5% = 3.841
Calculated value > Table value
𝐻0 𝑖𝑠 𝑟𝑒𝑗𝑒𝑐𝑡𝑒𝑑