0% found this document useful (0 votes)
13 views

Chapter 9

Uploaded by

owethumhlongo711
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Chapter 9

Uploaded by

owethumhlongo711
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 13

Chapter 9: Chi squared Tests.

: not

(Ei ≥ 5) 1 1 1 1 1 1
H 0 : p1  ; p2  ; p3  ; p 4  ; p5  ; p 6 
A die is tossed 65 times with the following results 6 6 6 6 6 6

Number 1 2 3 4 5 6 Ha : not H0
Frequency 10 12 14 10 11 8
Test at 5% level of significance if a die is balanced  0.05
Number 1 2 3 4 5 6
Oi 10 12 14 10 11 8
Ei 10.83 10.83 10.83 10.83 10.83 10.83

k
Oi2 102 122 142 102 112 82
 2  n        65  k2 1;1   5;0.95
2
11.07
i 1 Ei 10.83 10.83 10.83 10.83 10.83 10.83
66.9437  65
1.9436

Fail to reject H0 at 0.05 level of significance, and conclude that the die is balanced
Chi-square distribution critical values
1
df 0.005 0.010 0.025 0.050 0.100 0.900 0.950 0.975 0.990 0.995
1 0.000 0.000 0.001 0.004 0.016 2.71 3.84 5.02 6.64 7.88
2 0.010 0.020 0.051 0.103 0.211 4.60 5.99 7.38 9.21 10.60
3 0.072 0.115 0.216 0.35 0.58 6.25 7.82 9.35 11.34 12.84
4 0.21 0.30 0.48 0.71 1.06 7.78 9.49 11.14 13.28 14.86

5 0.42 0.55 0.83 1.14 1.61 9.24 11.07 12.38 15.09 16.75
6 0.68 0.87 1.24 1.64 2.20 10.64 12.59 14.44 16.81 18.55
7 0.99 1.24 1.69 2.17 2.83 12.02 14.07 16.01 18.48 20.28
8 1.34 1.65 2.18 2.73 3.49 13.36 15.51 17.53 20.09 21.96
9 1.73 2.09 2.70 3.32 4.17 14.68 16.92 19.02 21.67 23.59

10 2.16 2.56 3.25 3.94 4.87 15.99 18.31 20.48 23.21 25.19
11 2.60 3.05 3.82 4.58 5.58 17.28 19.68 21.92 24.72 26.76
12 3.07 3.57 4.40 5.23 6.30 18.55 21.03 23.34 26.22 28.30
13 3.57 4.11 5.01 5.89 7.04 19.81 22.36 24.74 27.69 29.82
14 4.07 4.66 5.63 6.57 7.79 21.06 23.68 26.12 29.14 31.32

15 4.60 5.23 6.26 7.26 8.55 22.31 25.00 27.49 30.58 32.80
16 5.14 5.81 6.91 7.96 9.31 23.54 26.30 28.85 32.00 34.27
17 5.70 6.41 7.56 8.67 10.91 24.77 27.59 30.19 33.41 35.72
18 6.26 7.02 8.23 9.39 10.86 25.99 28.87 31.53 34.80 37.16
19 6.84 7.63 8.91 10.12 11.65 27.20 30.14 32.85 36.19 38.58
Number 1 2 3 4 5 6
A die is tossed 65 times with the following results:
Frequency 7 12 9 11 8 13
1 1 1 1 1 1
p1  p2  p3  p4  p5  p6 
6 6 6 6 6 6

Number 1 2 3 4 5 6
Oi 7 12 9 11 8 13
Ei 10 10 10 10 10 10
1 1 1 1 1 1
H 0 : p1  ; p2  ; p3  ; p4  ; p5  ; p6  H a : not H 0
6 6 6 6 6 6
 0.025

Oi2 k
7 2 122 92 112 82 132
 
2
n        60
i 1 E i 10 10 10 10 10 10
62.8  60
2.8

 k2 1;1   5;0.975


2
12.38

Fail to reject H0 at 0.025 level of significance, and conclude that the die is balanced
In a certain community, car accidents where drivers younger than 25 years were involved were investigated.
The following classification was obtained for a random sample of 40 accidents:
Age 15 – 16 17 – 18 19 – 20 21 – 22 23 – 24
Number of accidents 5 12 10 8 5

The percentages of the total population of the drivers for the age groups are respectively 10%, 20%, 20%, 25%, and
25%. Test at 5% significance level whether the proportion of accidents agree with the population proportion of
drivers in a certain age group.

Age 15 – 16 17 – 18 19 – 20 21 – 22 23 – 24 Age 15 – 18 19 – 20 21 – 22 23 – 24
5 12 10 8 5 17 10 8 5
4 8 8 10 10 12 8 10 10

H0: p1= 0.3; p2 = 0.2; p3 = 0.25; p4= 0.25 Ha: not H0

2 2 2 2 2
𝑂𝑖 ( 17 ) ( 10 ) ( 8 ) ( 5 )
𝜒 =∑
2
−𝑛= + + + − 40=5.4833
𝐸𝑖 12 8 10 10
2 2
𝜒 𝑘 −1 ;1 − 𝛼 = 𝜒 3 ; 0.95=7.82
Fail to reject H0 at 5% significance level, and conclude that proportion of accidents agree with the population
proportion of drivers in a certain age group.
A cross between white and yellow summer flowers gave progeny of the following colours:

Colour White Yellow Green


Number of progeny 150 35 10

A certain genetic model predicted the ratio of these colours to be: 10: 3: 2. Test at 0.01 level of significance if the
observed results (frequencies) are consistent with the expected
10 3 2 E1 n p1
n = 195 p1  p2  p3 
15 15 15 10
195 
15
130

10 3 2
H 0 : p1  ; p2  ; p3 
15 15 15 Ha: not H0

k
O
  i  n 
2 150  35  10  195 13.3333
2 2 2

i 1 Ei 130 39 26

 k2 1;1 0.01  22;0.99 9.21

Reject the null hypothesis at 0.01 level of significance and conclude that the observed frequencies are not
consistent with the expected.
Chi-square distribution critical values
1
df 0.005 0.010 0.025 0.050 0.100 0.900 0.950 0.975 0.990 0.995
1 0.000 0.000 0.001 0.004 0.016 2.71 3.84 5.02 6.64 7.88
2 0.010 0.020 0.051 0.103 0.211 4.60 5.99 7.38 9.21 10.60
3 0.072 0.115 0.216 0.35 0.58 6.25 7.82 9.35 11.34 12.84
4 0.21 0.30 0.48 0.71 1.06 7.78 9.49 11.14 13.28 14.86

5 0.42 0.55 0.83 1.14 1.61 9.24 11.07 12.38 15.09 16.75
6 0.68 0.87 1.24 1.64 2.20 10.64 12.59 14.44 16.81 18.55
7 0.99 1.24 1.69 2.17 2.83 12.02 14.07 16.01 18.48 20.28
8 1.34 1.65 2.18 2.73 3.49 13.36 15.51 17.53 20.09 21.96
9 1.73 2.09 2.70 3.32 4.17 14.68 16.92 19.02 21.67 23.59

10 2.16 2.56 3.25 3.94 4.87 15.99 18.31 20.48 23.21 25.19
11 2.60 3.05 3.82 4.58 5.58 17.28 19.68 21.92 24.72 26.76
12 3.07 3.57 4.40 5.23 6.30 18.55 21.03 23.34 26.22 28.30
13 3.57 4.11 5.01 5.89 7.04 19.81 22.36 24.74 27.69 29.82
14 4.07 4.66 5.63 6.57 7.79 21.06 23.68 26.12 29.14 31.32

15 4.60 5.23 6.26 7.26 8.55 22.31 25.00 27.49 30.58 32.80
16 5.14 5.81 6.91 7.96 9.31 23.54 26.30 28.85 32.00 34.27
17 5.70 6.41 7.56 8.67 10.91 24.77 27.59 30.19 33.41 35.72
18 6.26 7.02 8.23 9.39 10.86 25.99 28.87 31.53 34.80 37.16
19 6.84 7.63 8.91 10.12 11.65 27.20 30.14 32.85 36.19 38.58
Contingency Tables (independency and homogeneity tests)

: variables are independent

: variables are the same


: variables are dependent
𝑟𝑜𝑤 𝑡𝑜𝑡𝑎𝑙 ×𝑐𝑜𝑙𝑢𝑚𝑛𝑡𝑜𝑡𝑎𝑙
𝐸𝑖 =
𝑛
: variables are not the same

Four separate machines mold the same plastic parts that are used in cellular phones. A random sample f 400 such
parts is obtained, and each part is identified according to its machine and whether it is acceptable or defective. The
results are given below:

Machine
A B C D
Defective 9 7 10 16
Acceptable 111 103 105 39

Test at 0.05 level of significance if the claim that the machine is independent of whether the part is acceptable or
defective.
Machine Total
A B C D
Defective 9 7 10 16 42
(12.6) (11.55) (12.075) (5.775)
Acceptable 111 103 105 39 358
(107.4) (98.45) (102.925) (49.225)
Total 120 110 115 55 400

H0 machine is independent of whether the part is acceptable or defective Ha not H 0

Oi2
k
9 
2
7 
2
39 
2

 
2
n    ......   400
i 1 Ei
12.6 11.55 49.225
23.7967

 2r  1c  1;1   22 14 1;1 0.05  3;0.95


2
7.82

Reject H0 at 0.05 level of significance and conclude that the machine depends on whether a part is defective or not.
A study was made to determine whether an individual who possesses life insurance is a better loan risk than ones
who does not possess such insurance. The determination as to whether a loan was good or bad risk was made by a
certain leading institutions with much experience in that field. The following data results of this study

Loan
Classification
Good Bad
Insurance 284 249
No Insurance 66 93

Test at 5% level of significance whether loan classified and the possession or not of life insurance are independent.

Loan Classification Total


Good Bad
Insurance 284 249 533
(269.58) (263.12)
No Insurance 66 93 159
(80.42) (78.58)
Total 350 342 692

H0 : loan classification and possession or not of life insurance are Independent

Ha: loan classification and possession or not of life insurance are dependent
O 
2
k
i  Ei  1
2
 
2

i 1 Ei

 284  269.58    249  263.12    66  80.42    93  78.58  


2 2 2 2
1 1 1 1
2 2 2 2
   
269.58 263.12 80.42 78.58
0.7188  0.7050  2.4094  2.4658
6.299

 2r  1c  1;1   22 12 1;1 0.05 1;0.95


2
3.84

Reject H0 0.05 level of significance and conclude that the loan classification and possession of life insurance are
dependent.
A new cough remedy for children is available in 3 flavours A, B and C. The table below shows the number of
children who prefer each flavour for population groups X, Y and Z.

Population group Flavour


A B C
X 25 17 10

Y 14 16 20

Z 15 20 15

Test at 0.05 level of significance if flavour and population group are independent.

Population group Flavour Total


A B C
X 25 17 10 52
(18.47) (18.13) (15.39)
Y 14 16 20 50
(17.76) (17.43) (14.80)
Z 15 20 15 50
(17.76) (17.43) (14.80)
Total 54 53 45 152
H0 : Flavour and population group are independent Ha : Flavour and population group are dependent

k 2
O
 2  i  n
i 1 Ei


25
2


17 
2
 ............... 

15
2
 152
18.47 18.13 14.80
7.8478

 42;0.95 9.49

Fail to reject H0 at 0.05 level of significance and conclude that flavour and population group are independent
A random sample of 90 adults in Bloemfontein are classified according to gender (M = male, F = female) and the sport
type they prefer to watch on a Saturday where Rugby = R and Tennis = T. the results are as follows:

Sport Gender Total


Sport Gender M F
M F R 29 19 48
R 29 19 (23.47) (24.53)
T 15 27 42
T 15 27
(20.53) (21.47)
Total 44 46 90

Use 0.01 level of significance to decide whether the two factors are independent

H0 : Gender and sport preference are independent Ha: Gender and sport preference are dependent

 2 
k O  E
i i  2
1 2

i 1 Ei
29  23.47    19  24.53    15  20.53    27  21.47  
1 2
2
1 2
2
1 2
2
1
2
 12;0.99 6.64

23.47 24.53 20.53 21.47
1.0780  1.0314  1.2324  1.1784
4.5202
Fail to reject H0 at 0.01 level of significance and conclude that gender and sport preference are independent

You might also like