Upload
zaire-beale
View
217
Download
1
Embed Size (px)
Citation preview
McGraw-Hill/Irwin Copyright © 2010 by The McGraw-Hill Companies, Inc. All rights reserved.
Chi-Square Tests
Chapter 12
12-2
Chapter Outline
12.1 Chi-Square Goodness of Fit Tests
12.2 A Chi-Square Test for Independence
12-3
12.1 Chi-Square Goodness of Fit Tests
1. Carry out n identical trials with k possible outcomes of each trial
2. Probabilities are denoted p1, p2, … , pk where p1 + p2 + … + pk = 1
3. The trials are independent4. The results are observed
frequencies, f1, f2, …, fk
12-4
Chi-Square Goodness of Fit Tests Continued
Consider the outcome of a multinomial experiment where each of n randomly selected items is classified into one of k groups
Let fi = number of items classified into group i (ith observed frequency)
Ei = npi = expected number in ith group if pi is probability of being in group i (ith expected frequency)
12-5
A Goodness of Fit Test for Multinomial Probabilities
H0: multinomial probabilities are p1, p2, … , pk
Ha: at least one of the probabilities differs from p1, p2, … , pk
Test statistic:
Reject H0 if2 >
2 or p-value < 2 and the p-value are based on p-1
degrees of freedom
k
i i
ii
E
Ef=
1
22 )(
12-6
Example 12.1: The Microwave Oven Preference Case
Tables 12.1 and 12.2
12-7
Example 12.1: The Microwave Oven Preference Case Continued
7786.860
6057
120
120120
140
140121
80
80102
not true is hypothesis null stated previously the:
15.,30.,35.,20.:
2222
4
1
22
1
43210
k
i i
ii
E
Ef
H
H
12-8
Example 12.1: The Microwave Oven Preference Case #3
Figure 12.1
12-9
A Goodness of Fit Test for Multinomial Probabilities
fi = the number of items classified into group i
Ei = npi
H0: The values of the multinomial probabilities are p1, p2,…pk
H1: At least one of the multinomial probabilities is not equal to the value stated in H0
k
i i
ii
E
Ef
1
22
12-10
A Goodness of Fit Test for a Normal Distribution
Have seen many statistical methods based on the assumption of a normal distribution
Can check the validity of this assumption using frequency distributions, stem-and-leaf displays, histograms, and normal plots
Another approach is to use a chi-square goodness of fit test
12-11
A Goodness of Fit Test for a Normal Distribution Continued
1. H0: the population has a normal distribution
2. Select random sample3. Define k intervals for the test4. Record observed frequencies5. Calculate the expected frequencies6. Calculate the chi-square statistics7. Make a decision
k
i i
oi
E
Ef
1
22
12-12
12.2 A Chi-Square Test for Independence
Each of n randomly selected items is classified on two dimensions into a contingency table with r rows an c columns and let fij = observed cell frequency for ith row and
jth column ri = ith row total
cj = jth column total Expected cell frequency for ith row and jth
column under independence
n
crE jiij ˆ
12-13
A Chi-Square Test for Independence Continued
H0: the two classifications are statistically independent
Ha: the two classifications are statistically dependent
Test statistic
Reject H0 if 2 > 2 or if p-value <
2 and the p-value are based on (r-1)(c-
1) degrees of freedom
cellsall
22
ˆ)ˆ(
ij
ijij
E
Ef=
12-14
Example 12.3 The Client Satisfaction Case
Table 12.4
12-15
Example 12.3 The Client Satisfaction Case #2
Figure 12.2 (a)
12-16
Example 12.3 The Client Satisfaction Case #3
H0: fund time and level of client satisfaction are independentH1: fund time and level of client satisfaction are dependent
Calculate frequencies under independence assumption
Calculate test statistic of 46.44Reject H0