Test For Goodness of Fit

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 15

Test for Goodness of

Fit
Section 14.1
A New Test
 In the previous chapter, we learned how to compare two
population proportions. Sometimes, though, we want to
examine the distribution of proportions in a single
population.
 The chi-square goodness-of-fit (GOF) test allows us to
determine whether a specified population distribution
seems valid.
 We can compare two or more population proportions
using a chi-square test for homogeneity.
 We can also determine whether the distribution of one
variable has been influenced by another variable using a
chi-square test of association/independence.
Some Examples
 The methods of this chapter will help us
answer questions such as:
 Are you more likely to have a car accident when
using a cell phone?

 Does background music effect wine purchases?

 How does the presence of an exclusive territory


clause in a franchisee’s contract relate to the
success of the business?
The Basic Idea
 The idea of the GOF test is to compare the
observed counts for our sample with the
counts that we expect from the population. The
more the observed counts differ from the
expected counts, the more evidence we have to
reject the null hypothesis.
Expected Counts
 In general, the expected count for any
categorical variable is obtained by
multiplying the proportion of the
distribution for each category by the
sample size.
A New Statistic
 The chi-square statistic (X2)is calculated using the
formula:
(O  E ) 22
X 
22

E
 The larger the difference between the observed
and expected counts, the larger X2 will be, and the
more evidence there will be against H0.
The Chi-Square Distribution
 The shape of the specific chi-square
distribution used to assess the evidence against
H0 is determined by the degrees of freedom. In
a chi-square GOF test, the df = (the number of
categories – 1).
Various Chi-Square Distributions
The Chi-Square GOF Test
1. Name of test: 2 GOF

2. State the Hypotheses:


H0: the actual population proportions are
equal to the hypothesized proportions

Ha: at least one of these proportions is


incorrect
3. Check Conditions:
S. SRS from population of interest

E. All expected counts are at least 5 (or all are ≥


1 and no more than 20% are < 5).

4. Compute the df, test statistic and the P-


value

5. Interpretation in context
Example: A Fair Die?
 Suppose you roll a die 60 times and get 12 ones,
9 twos, 10 threes, 6 fours, 11 fives, and 12
sixes. Do you have evidence that the die is
unfair?
What Did You Expect?
Observed Expected
Outcome
Count, O Count, E

1 12 10
2 9 10
3 10 10
4 6 10
5 11 10
6 12 10
Total 60 60
Is It All in the Genes?
 One of the most common applications of the chi-square
GOF test is in the field of genetics. Scientists want to
investigate the genetic characteristics of offspring that
result from mating parents with known genetic make-
ups. They use rules about dominant and recessive genes
to predict the ratio of offspring that will fall into each
possible genetic category. Then the researchers mate the
parents and classify the resulting offspring. The chi-
square GOF test helps the scientists assess the validity
of their hypothesized ratios.
Red-Eyed Fruit Flies
 Biologists wish to mate two fruit flies having
genetic make-up RrSs (R = red eyed, r = white
eyed, S = straight-winged, and s = curly-
winged.)

 Use a Punnett square to determine the


biologists’ predicted ratio.
Let the Mating Begin!
 To test their hypothesis about the distribution
of the offspring, the biologists mate the fruit
flies. Of 200 offspring, 99 had red eyes and
straight wings, 42 had red eyes and curly
wings, 49 had white eyes and straight wings,
and 10 had white eyes and curly wings. Do
these data differ significantly from what the
biologists predicted?

You might also like