Beruflich Dokumente
Kultur Dokumente
JOHN S. LOUCKS
St. Edward’s University
5. Rejection rule:
Using test statistic: Reject H0 if 2 a2
Using p-value: Reject H0 if p-value < a
(where a is the significance level and
there are k - 1 degrees of freedom)
Notation
pC = popul. proportion that purchase a colonial
pR = popul. proportion that purchase a ranch
pS = popul. proportion that purchase a split-level
pA = popul. proportion that purchase an A-frame
Hypotheses
H0: pC = pR = pS = pA = .25
Ha: The population proportions are not
pC = .25, pR = .25, pS = .25, and pA = .25
Expected Frequencies
e1 = .25(100) = 25 e2 = .25(100) = 25
e3 = .25(100) = 25 e4 = .25(100) = 25
Test Statistic
( 30 25) 2 ( 20 25) 2 ( 35 25) 2 (15 25) 2
2
25 25 25 25
=1+1+4+4
= 10
Rejection Rule
With a = .05 and
k-1=4-1=3
degrees of freedom
Conclusion
2 = 10 > 7.81, so we reject the assumption there
is no home style preference, at the .05 level of
significance.
Formula Worksheet
C D E F G H I
1 Hyp. Observed Expect. Sq'd. Sq.Diff./
2 Categ. Prop. Frequency Freq. Diff. Diff. Exp.Freq.
3 Col. 0.25 =COUNTIF(B2:B101,"Col") =D3*$E$7 =E4-F4 =G3^2 =H3/F3
4 Ranch 0.25 =COUNTIF(B2:B101,"Ran") =D4*$E$7 =E5-F5 =G4^2 =H4/F4
5 Split-L 0.25 =COUNTIF(B2:B101,"Spl") =D5*$E$7 =E6-F6 =G5^2 =H5/F5
6 A-Fr. 0.25 =COUNTIF(B2:B101,"Afr") =D6*$E$7 =E7-F7 =G6^2 =H6/F6
7 Total =SUM(E3:E6) =SUM(I3:I6)
8
9 Categories 4
10 Test Statistic =I7
11 Degr. of Free. =E-1
12 p -Value =CHIDIST(E11,E12)
Note: Columns A-B and rows 13-101 are not shown.
Value Worksheet
C D E F G H I
1 Hyp. Observed Expect. Sq'd. Sq.Diff./
2 Categ. Prop. Frequency Freq. Diff. Diff. Exp.Freq.
3 Col. 0.25 30 25 5 25 1
4 Ranch 0.25 20 25 -5 25 1
5 Split-L 0.25 35 25 10 100 4
6 A-Fr. 0.25 15 25 -10 100 4
7 Total 100 10
8
9 Categories 4
10 Test Statistic 10
11 Degr. of Free. 3
12 p -Value 0.0186
Note: Columns A-B and rows 13-101 are not shown.
Hypotheses
H0: Price of the home is independent of the style
of the home that is purchased
Ha: Price of the home is not independent of the
style of the home that is purchased
Expected Frequencies
Test Statistic
(18 16 . 5) 2
( 6 11) 2
( 3 6 . 75) 2
2 ...
16. 5 11 6. 75
= .1364 + 2.2727 + . . . + 2.0833 = 9.1486
Rejection Rule
With a = .05 and (2 - 1)(4 - 1) = 3 d.f., .205 7. 81
Reject H0 if 2 > 7.81
Conclusion
We reject H0, the assumption that the price of the
home is independent of the style of the home
that is purchased.
Formula Worksheet
D E F G H I J
1 Count of Home Style
2 Price ($) Colonial Ranch Split-Lev. A-Frame Grand Tot.
3 <=99K 18 6 19 12 55
4 >99K 12 14 16 3 45
5 Grand Total 30 20 35 15 100
6
7 Expected Frequencies
8 Colonial Ranch Split-Lev. A-Frame
9 <=99K =F5*J3/J5 =G5*J3/J5 =H5*J3/J5 =I5*J3/J5
10 >99K =F5*J4/J5 =G5*J4/J5 =H5*J4/J5 =I5*J4/J5
11
12 Chi-Sq. =CHIINV(G13,3)
13 p -Value =CHITEST(F3:I4,F9:I10)
Note: Columns A-C (sample data) are not shown.
© 2003 South-Western /Thomson Learning™
Slide 21
Using Excel to Conduct a Test of Independence
Value Worksheet
D E F G H I J
1 Count of Home Style
2 Price ($) Colonial Ranch Split-Lev. A-Frame Grand Tot.
3 <=99K 18 6 19 12 55
4 >99K 12 14 16 3 45
5 Grand Total 30 20 35 15 100
6
7 Expected Frequencies
8 Colonial Ranch Split-Lev. A-Frame
9 <=99K 16.50 11.00 19.25 8.25
10 >99K 13.50 9.00 15.75 6.75
11
12 Chi-Sq. 9.1486
13 p -Value 0.0274
Note: Columns A-C (sample data) are not shown.
© 2003 South-Western /Thomson Learning™
Slide 22
Goodness of Fit Test: Poisson Distribution
( f i ei ) 2
k
2
i 1 ei
5. Rejection rule:
Using test statistic: Reject H0 if 2 a2
# Arrivals 0 1 2 3 4 5 6 7 8 9 10 11 12
Frequency 0 1 4 10 14 20 12 12 9 8 6 3 1
Hypotheses
H0: Number of cars entering the garage during
a one-minute interval is Poisson distributed.
Ha: Number of cars entering the garage during a
one-minute interval is not Poisson distributed
6 x e 6
Hence, f ( x)
x!
Expected Frequencies
x f (x ) xf (x ) x f (x ) xf (x )
0 .0025 .25 7 .1389 13.89
1 .0149 1.49 8 .1041 10.41
2 .0446 4.46 9 .0694 6.94
3 .0892 8.92 10 .0417 4.17
4 .1339 13.39 11 .0227 2.27
5 .1620 16.20 12 .0155 1.55
6 .1606 16.06 Total 1.0000 100.00
Test Statistic
( 1.20) 2
(1.08) 2
(1.62) 2
2 ... 3.268
6.20 8.92 8.38
Rejection Rule
With a = .05 and k - p - 1 = 9 - 1 - 1 = 7 d.f. (where
k = number of categories and p = number of
population parameters estimated), .205 14 . 07
Reject H0 if 2 > 14.07
Conclusion
We cannot reject H0. There’s no reason to doubt
the assumption of a Poisson distribution.
33 43 44 45 52 52 56 58 63 64
64 65 66 68 70 72 73 73 74 75
83 84 85 86 91 92 94 98 102 105
Hypotheses
H0: The population of number of units sold
has a normal distribution with mean 71
and standard deviation 18.54.
Ha: The population of number of units sold
does not have a normal distribution with
mean 71 and standard deviation 18.54.
Interval Definition
To satisfy the requirement of an expected
frequency of at least 5 in each interval we will
divide the normal distribution into 30/5 = 6
equal probability intervals.
Interval Definition
Areas
= 1.00/6
= .1667
i fi ei (fi – ei)2/ei
Less than 53.02 6 5 0.2
53.02 to 63.03 3 5 0.8
63.03 to 71.00 6 5 0.2
71.00 to 78.97 5 5 0
78.97 to 88.98 4 5 0.2
More than 88.98 6 5 0.2
Total 30 30 1.6=x2
Test Statistic
(1) 2
( 2 ) 2
(1) 2
( 0 ) 2
( 1) 2
(1) 2
2 1. 60
5 5 5 5 5 5
Rejection Rule
With a = .05 and k - p - 1 = 6 - 2 - 1 = 3 d.f.,
.205 7. 81 Reject H0 if 2 > 7.81
Conclusion
We cannot reject H0. There is little evidence to
support rejecting the assumption the population
is normally distributed with = 71 and = 18.54.