Download presentation
Presentation is loading. Please wait.
1
13.1 Test for Goodness of Fit
In this section we are going to see how well a distribution of proportions fits an entire population. This test is called the chi-square test for goodness of fit. There are 3 different types of chi-square test – we will just start with the first one.
2
If we want to test that we got the correct proportion of a certain color of M & M’s (say blue) what could we do? If we want to run a chi-square test, we would assign the following hypotheses: Ho :The color distribution of M&M’s is the same as the Mars company claims. Ha : The color distribution of M&M’s is different than the Mars company claims.
3
Population (Thousands)
Ex: In recent years, the graying of America has been used to refer to the belief that in recent years, people have been living longer. We want to investigate whether this perception is accurate. To do so, we decide to investigate the distribution of age groups in the US in 1996 as compared to 1980. Age Population (Thousands) Percent 0-24 93,777 41.39 25-44 62,716 27.68 45-64 44,503 19.64 65 and up 25,550 11.28 Total 226,546 100 What hypotheses could we use to investigate this?
4
Population (Thousands)
Age Population (Thousands) Percent 0-24 93,777 41.39 25-44 62,716 27.68 45-64 44,503 19.64 65 and up 25,550 11.28 Total 226,546 100
5
It is a good idea to graph your data to see if you can see any drastic changes. A side by side bar graph is a useful tool for comparison.
6
In order to run a chi-square test, we need to compare the observed and the expected. Since we did not sample the same number of people in each age group, we need to compute the values we would expect in 1996 if the percents remained unchanged. Age Group 1980 Percents Expected Counts 0-24 41.39 25-44 27.68 45-64 19.64 65 and up 11.28
7
The chi-square statistic is found by computing:
Age Group Observed Expected 0-24 177 207 25-44 158 138.4 45-64 101 98.2 65 and up 64 56.4 The larger the difference between the observed and the expected values, the large chi square will be and the more evidence there is against the null.
8
Properties of the Chi-Square distributions
They take only positive values They are skewed right They are specified by their degrees of freedom (number of categories-1) The total area under the curve = 1
9
Why Use a Goodness of Fit Test??
To determine whether a population has a certain hypothesized distribution. Once you arrive at your chi-square statistic, to compute the p-value, you will calculate Conditions All individual expected counts are at least 1 No more than 20% of the expected counts are less than 5.
10
Ex: Trix cereal comes in 5 fruit flavors and each flavor has a different shape. A curious student methodically sorted an entire box of the cereal and found the following distribution of flavors for the pieces of cereal in the box: Flavor Grape Lemon Lime Orange Strawberry Frequency 530 470 420 610 585 Test the null hypothesis that the flavors are uniformly distributed versus the alternative that they are not.
11
Ex: Run a chi square test for goodness of fit for the data you came up with in the M&M’s problem.
Ho: The distribution is the same as the mars company claims Ha: The distribution is different than the mars company claims
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.