U1 Chi Square Test

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

1.

12 Statistics Numerical Methods

Chi-Square test (Goodness of fit)

2 (O E )2
E
Where O Observed Frequency
E Expected Frequency, Degree of freedom n 1
Problem 1.7:
The following data gives the number of aircraft accidents that
occurred during the various days of a week. Find whether the
accidents are uniformly distributed over the week.
(N/D 2010)
Days: Sun Mon Tue Wed Thu Fri Sat
No. of accidents: 14 16 8 12 11 9 14

Solution:
Null Hypothesis H 0 : The aircraft accidents are uniform over the
week.

Alternative Hypothesis H1 : The aircraft accidents are not


uniform over the week.
Test Statistic:

2 (O E )2
E
Where O Observed Frequency
E Expected Frequency, Degree of freedom n 1
Total number of accidents = 84
84
Under the null hypothesis, Ei 12 .
7
Testing of Hypothesis 1. 13

Observed Expected 2
Frequency 2 O E
Frequency O E O E
(O) (E) E
14 12 2 4 0.333
16 12 4 16 1.333
8 12 -4 16 1.333
12 12 0 0 0
11 12 -1 1 0.083
9 12 -3 9 0.75
14 12 2 4 0.333
84 84 4.165

From the table,


2
2 O E
4.167 (Calculated Value)
E
Degree of freedom n 1 7 1 6
2
Table value of for 6 d.f. 12.592 (Table Value)
Calculated Value < Table Value
We accept the null hypothesis H0 .
Similar Problem:
The demand for a particular spare part in a factory was found to
vary from day-to-day. In a sample study the following
information was obtained.

Days: Mon Tues Wed Thurs Fri Sat


No. of spare parts
1124 1125 1110 1120 1126 1115
demanded:
1. 14 Statistics Numerical Methods

Test the hypothesis that the number of parts demanded does not
depend on the day of the week. ( 20.05 (5) 11.07 )
(N/D 2014)

Problem 1.8:
4 coins were tossed 160 times and the following results were
obtained:
No. of heads: 0 1 2 3 4
Observed frequencies: 17 52 54 31 6
Under the assumption that the coins are unbiased, find the
expected frequencies of getting 0, 1, 2, 3, 4 heads and test the
goodness of fit. (A/M 2011)

Solution:
Null Hypothesis H 0 : The coins are unbiased.

Alternative Hypothesis H1 : The coins are biased.


Test Statistic:

2 (O E )2
E
Where O Observed Frequency
E Expected Frequency, Degree of freedom n 1

1
Probability of getting head p
2
1
Probability of getting tail q
2
P X x nCx p x q n x , x 0,1,2,3,4
0 4 0
1 1
P 0 head P X 0 4C0 0.0625
2 2
Testing of Hypothesis 1. 15

1 4 1
1 1
P 1 head P X 1 4C1 0.25
2 2
2 4 2
1 1
P 2 head P X 2 4C2 0.375
2 2
3 4 3
1 1
P 3 head P X 3 4C3 0.25
2 2
4 4 4
1 1
P 4 head P X 4 4C4 0.0625
2 2
Observed Expected
2
Frequency p( xi ) Frequency (E) 2 O E
O E O E
(O) Ei 160 p( xi ) E

17 0.0625 10 7 49 4.9
52 0.25 40 12 144 3.6
54 0.375 60 -6 36 0.6
31 0.25 40 -9 81 2.025
6 0.0625 10 -4 16 1.6
12.725

From the table,


2
2 O E
12.725 (Calculated Value)
E
Degree of freedom n1 1 5 1 4
2
Table value of for 4 d.f. 9.488 (Table Value)
Calculated Value > Table Value

We reject the null hypothesis H0 .


1. 16 Statistics Numerical Methods

Similar Problem:
Five coins are tossed 320 times. The number of heads observed
is given below:

Number of heads 0 1 2 3 4 5

Frequency 15 45 85 95 60 20

Examine whether the coin is unbiased. Use 5% level of


significance. (A/M 2018)

Problem 1.9:
Theory predicts that the proportion of beans in four groups A, B,
C, D should be 9:3:3:1. In an experiment among 1600 beans, the
numbers in the four groups were 882, 313, 287 and 118. Does
the experiment support the theory? (M/J 2012),(M/J 2016)

Solution:
Null Hypothesis H 0 : The experimental results support the
theory.

Alternative Hypothesis H1 : The experimental results do not


support the theory.

Test Statistic:

2 (O E )2
E
Where O Observed Frequency
E Expected Frequency, Degree of freedom n 1

The expected frequencies are calculated as follows:


Total number of beans = 1600
Testing of Hypothesis 1. 17

Under the null hypothesis, they are to be divided in the ratio


9:3:3:1.
9
E ( A) 1600 900
16
3
E ( B) 1600 300
16
3
E (C ) 1600 300
16
1
E ( D) 1600 100
16
Observed Expected 2
Frequency 2 O E
Frequency O E O E
(O) (E) E

882 900 -18 324 0.36


313 300 13 169 0.563
287 300 -13 169 0.563
118 100 18 324 3.24
4.726

From the table,


2
2 O E
4.726 (Calculated Value)
E
Degree of freedom n 1 4 1 3
2
Table value of for 3 d.f. 7.815 (Table Value)
Calculated Value < Table Value

We accept the null hypothesis H0 .


1. 18 Statistics Numerical Methods

Chi-Square test (Independence of attributes)


Observed Frequencies:
Attribute B 1 Attribute B 2
Attribute A 1 a b a b
Attribute A 2 c d c d
a c b d N
Expected Frequencies:
Attribute B1 Attribute B 2
( a b)( a c) (a b)(b d )
Attribute A1
N N
(a c)(c d ) (b d )(c d )
Attribute A2
N N

Problem 1.10:
Out of 8000 graduates in a town 800 are females, out of 1600
graduate employees 120 are females. Use 2 to determine if any
distinction is made in appointment on the basic of sex. Value of
2
at 5% level for one degree of freedom is 3.84. (A/M 2010)

Solution:
Null Hypothesis H 0 : There is no significant difference between
male and female.
Alternative Hypothesis H1 : There is significant difference
between male and female.
Testing of Hypothesis 1. 19

Observed Frequencies:
Male Female Total
Graduates in a town 7200 800 8000
Graduate employees 1480 120 1600
Total 8680 920 9600

Expected Frequencies:
8000 8680 8000 920
7233.33 766.67
9600 9600
1600 8680 1600 920
1446.67 153.33
9600 9600

Observed Expected 2
Frequency 2 O E
Frequency O E O E
(O) (E) E
7200 7233.33 -33.33 1110.889 0.1536
800 766.67 33.33 1110.889 1.449
1480 1446.67 33.33 1110.889 0.7679
120 153.33 -33.33 1110.889 7.2451
9.6156

From the table,


2
2 O E
9.6156 (Calculated Value)
E
Degree of freedom (r 1)(c 1) (2 1)(2 1) 1
2
Table value of 0.05 for 1 d.f. 3.841 (Table Value)
Calculated Value > Table Value

We reject the null hypothesis H0 .


1. 20 Statistics Numerical Methods

Problem 1.11:
An automobile company gives you the following information
about age groups and the liking for particular model of car which
it plans to introduce. On the basic of this data can it be concluded
that the model appeal is independent of the age group.
( 20.05 (3) 7.815 ) (A/M 2010)

Persons who: Below 20 20 39 40 59 60 and above


Liked the car: 140 80 40 20
Disliked the car: 60 50 30 80

Solution:
Null Hypothesis H 0 : There is no significant difference.

Alternative Hypothesis H1 : There is significant difference.

Observed Frequencies:
Below 20 40 - 60 and
Persons who: Total
20 39 59 above
Liked the car: 140 80 40 20 280
Disliked the
60 50 30 80 220
car:
Total 200 130 70 100 500

Expected Frequencies:
280 200 280 130 280 70 280 100
112 72.8 39.2 56
500 500 500 500

220 130 220 70 220 100


220 200 57.2 30.8 44
88 500 500 500
500
Testing of Hypothesis 1. 21

Observed Expected 2
Frequency 2 O E
Frequency O E O E
(O) (E) E

140 112 28 784 7


80 72.8 7.2 51.84 0.7121
40 39.2 0.8 0.64 0.0163
20 56 -36 1296 23.1429
60 88 -28 784 8.9091
50 57.2 -7.2 51.84 0.9063
30 30.8 -0.8 0.64 0.0208
80 44 36 1296 29.4545
70.162

From the table,


2
2 O E
70.162 (Calculated Value)
E
Degree of freedom (r 1)(c 1) (2 1)(4 1) 3
2
Table value of 0.05 for 3 d.f. 7.815 (Table Value)
Calculated Value > Table Value
We reject the null hypothesis H0 .
1. 22 Statistics Numerical Methods

Problem 1.12:
Using the data given in the following table to test at 1% level of

independent of his/her interest in Statistics.


(N/D 2017),(N/D 2018)

Ability in
Mathematics
Low Average High
Low 63 42 15
Interest in Average 58 61 31
Statistics High 14 47 29

Solution:
Null Hypothesis H 0 :
independent.

Alternative Hypothesis H1 :
is not independent.

Observed Frequencies:
Ability in
Mathematics Total
Low Average High
Low 63 42 15 120
Interest in Average 58 61 31 150
Statistics High 14 47 29 90
Total 135 150 75 360
Testing of Hypothesis 1. 23

Expected Frequencies:
120 135 120 150 120 75
45 50 25
360 360 360
150 135 150 150 150 75
56.25 62.5 31.25
360 360 360
90 135 90 150 90 75
33.75 37.5 18.75
360 360 360

Observed Expected 2
Frequency 2 O E
Frequency O E O E
(O) (E) E
63 45 18 324 7.2
42 50 -8 64 1.28
15 25 -10 100 4
58 56.25 1.75 3.0625 0.0544
61 62.5 -1.5 2.25 0.036
31 31.25 -0.25 0.0625 0.002
14 33.75 -19.75 390.0625 11.557
47 37.5 9.5 90.25 2.407
29 18.75 10.25 105.0625 5.603
32.1394

From the table,


2
2 O E
32.1394 (Calculated Value)
E
Degree of freedom (r 1)(c 1) (3 1)(3 1) 4
2
Table value of 0.01 for 4 d.f. at 1% level 6.635 (Table Value)
1. 24 Statistics Numerical Methods

Calculated Value > Table Value


We reject the null hypothesis H0 .
Similar Problems:
1) Test of the fidelity and selectivity of 190 radio receivers
produced the results shown in the following table:

Fidelity
Selectivity Low Average High
Low 6 12 32
Average 33 61 18
High 13 15 0

Use the 0.01 level of significance to test whether there is a


relationship between fidelity and selectivity.(A/M 2011)
2) Mechanical engineers testing a new arc welding technique
classified welds both with respect to appearance and an X-
ray inspection. (A/M 2018)
Appearance

Bad Normal Good

Bad 20 7 3

X-ray Normal 13 51 16

Good 7 12 21

Test for independence using 0.05 level of significance.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy