Non-Parametric Methods: Goodness of Fit Tests: (Chi-Square Applications)
Non-Parametric Methods: Goodness of Fit Tests: (Chi-Square Applications)
Chapter 17
McGraw-Hill/Irwin Copyright © 2010 by The McGraw-Hill Companies, Inc. All rights reserved.
GOALS
17-2
Chi square application in
hypothesis testing
17-3
Is the packing machine working
properly?
Suppose people have lodged complaints about
the weight of the 12.5 Kg mealie-meal bags.
A consultant took a sample of mealie-meal bags
and did not find any problem with the average
weight. That is, she could not reject the null
hypothesis that the population mean weight =
12.5 Kg
17-4 4
Why study variance?
17-6 6
Other applications
17-8
Chi-square Table look
17-9
The chi-square test
orH1 : 2 02
orH1 : 2 02
The test is based on the comparison between s 2 and
0 2
using the ratio ( n 1 ) s 2
17-10
02 10
Conducting the test
( n 1 )s 2
X2
02
17-11 11
Conducting the test
17-12 12
17-13
Back to Example
17-14 14
Test computations and results
2 s2 11* 0.0025
X ( n 1 ) 2 17.2
0 0.0016
17-15 15
EXAMPLE
17-16
EXAMPLE
17-17
EXAMPLE
17-18
EXAMPLE
17-19
Characteristics of the Chi-Square
Distribution
17-20
What is the use of chi-square test in
economics?
17-21
What is the use of chi-square test
in Marketing?
17-23
Goodness-of-Fit Test: Equal Expected
Frequencies
f o f e 2
2
fe
The critical value is a chi-square value with (k-1) degrees of
freedom, where k is the number of categories.
17-24
EXAMPLE
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 Magnolia Research, LLC, to
conduct a survey of adults as to their favorite meal when eating out.
Magnolia selected a sample 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
entrées? Is the difference in the number of times each entrée is
selected due to chance, or should we conclude that the entrées are
not equally preferred?
17-25
EXAMPLE
17-26
Goodness-of-Fit Example
Step 1: State the null hypothesis and the alternate hypothesis.
f o f e 2
f 2 ,k 1
e
f o f e 2
f 2 .05,5
e
f o f e 2
17-27
f 11.070
e
Goodness-of-Fit Example
17-28
Goodness-of-Fit Example
17-29
Goodness-of-Fit Test: Unequal
Expected Frequencies
The Hypothesis
H : There is no difference between the observed and expected
0
frequencies.
H : There is a difference between the observed and the expected
1
frequencies.
17-30
EXAMPLE
17-31
Goodness-of-Fit Test: Unequal Expected
Frequencies - Example
f o f e 2
fe
.05, 4 1
2
f o f e 2
fe
.05,3
2
f o f e 2
17-32 f
7.815
e
Goodness-of-Fit Test: Unequal Expected
Frequencies - Example
f o f e 2
2
f e
The computed χ2 of 1.3723 is NOT greater than the critical value of 7.815
– we cannot reject the null hypothesis. The difference between the
observed and the expected frequencies is due to chance.
We conclude that there is no evidence of a difference between the local
17-33
and national experience for hospital admissions.
Perform a chi-square test for independence on a
contingency table.
We can use the chi-square statistic to formally test for a relationship between
two nominal-scaled variables. To put it another way, is one variable independent
of the other? Here are some examples where we are interested in testing
whether two variables are related.
Ford Motor Company operates an assembly plant in Dearborn, Michigan. The
plant operates three shifts per day, 5 days a week. The quality control manager
wishes to compare the quality level on the three shifts. Vehicles are classified by
quality level (acceptable, unacceptable) and shift (day, afternoon, night). Is there
a difference in the quality level on the three shifts?That is, is the quality of the
product related to the shift when it was manufactured? Or is the quality of the
product independent of the shift on which it was manufactured?
A sample of 100 drivers who were stopped for speeding violations was
classified by gender and whether or not they were wearing a seat belt. For this
sample, is wearing a seatbelt related to gender?
Does a male released from federal prison make a different adjustment to civilian
life if he returns to his hometown or if he goes elsewhere to live? The two
variables are adjustment to civilian life and place of residence. Note that both
variables are measured on the nominal scale
17-34
Contingency Table Analysis
17-35
Contingency Analysis - Example
The classifications for the 200 former prisoners were tallied as follows.
Joseph Camden, for example, returned to his hometown and has
shown outstanding adjustment to civilian life. His case is one of the 27
tallies in the upper left box (circled).
17-36
Example
17-37
Contingency Analysis - Example
Step 1: State the null hypothesis and the alternate hypothesis.
H0: There is no relationship between adjustment to civilian life and where the
individual lives after being released from prison.
H1: There is a relationship between adjustment to civilian life and where the
individual lives after being released from prison.
e
f o f e 2
f
.01,(1)( 3)
2
e
f o f e 2
f
.01,3
2
e
f o f e 2
17-38 fe
11 .345
Computing Expected Frequencies (fe)
(120)(50)
200
17-39
Computing the Chisquare Statistic
17-40
Conclusion
17-42
LIMITATIONS OF CHI SQUARE
17-43
Limitations of Chi-Square
For more than two cells, chi-square should not be used if more
than 20 percent of the cells have expected frequencies less
than 5. According to this policy, it would not be appropriate to
use the goodness-of-fit test on the following data. Three of the
seven cells, or 43 percent, have expected frequencies ( fe) of
less than 5.
17-44
EXAMPLE
17-45