Goodness-of-Fit Tests
Chapter 17
McGraw-Hill/Irwin
Copyright © 2012 by The McGraw-Hill Companies, Inc. All rights reserved.
Learning Objectives
LO1 Conduct a test of hypothesis comparing an observed set of frequencies to an expected distribution.
LO2 List and explain the characteristics of the chi-square distribution. LO3 Conduct a goodness-of-fit test for unequal expected frequencies. LO4 Conduct a test of hypothesis to verify that data grouped into a frequency distribution is a sample from a normal distribution. LO5 Use graphical methods to determine if a set of sample data is from a normal distribution.
LO6 Conduct a test of hypothesis to determine whether two
17-2
LO1 List and explain the characteristics of the chi-square distribution.
Characteristics of the Chi-Square
Distribution
The major characteristics of the chi-square distribution
It is positively skewed.
It is non-negative.
It is based on degrees of freedom. When the degrees of freedom change a new distribution is created.
17-3
LO2 Conduct a test of hypothesis comparing an observed set of frequencies to an expected distribution.
Goodness-of-Fit Test: Comparing an Observed
Set of Frequencies to an Expected Distribution
Let f0 and fe be the observed and expected frequencies respectively.
Hypothses
H0: There is no difference between the observed and expected frequencies.
H1: There is a difference between the observed and the expected frequencies.
17-4
LO2
Goodness-of-fit Test: Comparing an Observed Set of Frequencies to an Expected Distribution
The test statistic is:
2
fo fe 2
fe
The critical value is a chi-square value with (k-1) degrees of freedom, where k is the number of categories 17-5
Goodness-of-Fit Example
LO2
The Bubba’s Fish and Pasta is a chain of restaurants located along the
Gulf Coast of Florida. Bubba, the owner, is considering adding steak to his menu. Before doing so he decides to hire the Magnolia Research,
LLC to conduct a survey of adults as to their favorite meal when eating out. Magnolia selected a sample of 120 adults and asked each to indicate their favorite meal when dining out. The results are reported below. Is it reasonable to conclude there is no preference among the four entrees?
17-6
Goodness-of-Fit Example
LO2
Step 1: State the null hypothesis and the alternate hypothesis.
H0: there is no difference between fo and fe
H1: there is a difference between fo and fe
Step 2: Select the level of significance. α = 0.05 as stated in the problem
Step 3: Select the test statistic.
The test statistic follows the chi-square distribution, designated as χ2
2
fo fe 2
fe
17-7
Goodness-of-Fit Example
LO2
Step 4: Formulate the decision rule.
Reject H0 if 2 2 ,k 1
fo fe 2
2
f ,k 1 e fo fe 2
f 2.05,4 1 e fo fe 2
f 2.05,3 e fo fe 2
f 7.815 e 17-8
LO2
Goodness-of-Fit Example
7.815
Critical
Value
17-9
LO2
Goodness-of-Fit Example
Step 5: Compute the value of the chi-square statistic and make a decision
2
2
fo fe
fe
17-10
LO2
Goodness-of-Fit Example
7.815
Critical
Value
2.20
The computed χ2 of 2.20 is in the Fail to Reject H0 region, less the critical value of 7.815. The decision, therefore, is to fail to reject H 0 at the .05 level .
Conclusion: The difference between the observed and the expected frequencies is due to chance. There appears to be no difference in the preference among the four entrees.
17-11
LO2
Chi-square - MegaStat
17-12
LO3 Conduct a goodness-of-fit test for unequal expected frequencies.
Goodness-of-Fit Test: Unequal
Expected Frequencies
Let f0 and fe be the observed and expected frequencies respectively.
Hypotheses
H0: There is no difference between the observed and expected frequencies.
H1: There is a difference between the observed and the expected