Chi-Square Goodness of Fit – Uniform Example

# Chi-Square Goodness of Fit – Uniform Example

This is an example of the chi-square
goodness-of-fit test when the expected frequency distribution is to be uniform,
or in other words, each outcome is expected to be equally likely. During a
game of chance, it is suspected that a die is not fair and that it may be
loaded. The die was rolled 200 times with the following results. Use alpha equal
point zero five to test the claim that the outcomes are not equally likely. The outcomes on fair six-sided die are numbers one through six and when this
suspected unfair die was rolled the counts for each outcome are in the
observed frequency row. To set up the null and the alternative, the null
statement is that the distribution of outcomes is uniform. In other words, we
expect each outcome to be equally likely. That would be the proportion for
getting a one is equal to one out of six, proportion for getting a 2 is 1 out of 6,
and so on. The proportion for getting a six would be one out of six
verses an alternative that the distribution is not uniform. Now if the distribution
is not uniform, this would be the case where we have a loaded die, and if
the distribution is uniform this would be the case where we have a fair die. I’m going to get the test statistic and p-value using the goodness
of fit function built into the TI-84, but if you wanted to do this by hand, you’re
going to need the expected counts. The test statistic is the sum, I put an extra
squiggle there, the sum of the observed counts minus the expected counts, that
difference squared, over the expected and that’s done for each outcome or each
category. In my calculator I already already entered the observed counts in
list 1 and I want to get the expected counts in another list so I can run the
test. The calculator won’t run the goodness of fit off of the proportions,
so you have to convert those over to counts. I’m gonna put in the
expected proportion for each category, in other words, one out of six for each
outcome, and it’s the same because on a fair die each outcome is equally likely.
Then I want to create a third list of counts. The die was rolled two hundred
times, so each expected count is going to be two hundred at times 1/6. I can
have the calculator do this quickly for me. If I move my cursor up to
list 3, press ENTER, and then down at the bottom I can tell the calculator to take
200 times the values in list two. You’ll see that the expected counts are
all the same because we’re expecting each outcome to be the same.
Now I can run the goodness of fit off of this. If you want it to do that by
hand for each category, it’s going to be 48 minus thirty-three point three three
three squared over thirty-three point three three three,
oops I forgot a three there. That’s for the first outcome, and then you have
to do it for the second outcome and because we’re squaring all of these
differences the chi-square test statistic will never be negative. So if
you do this by hand and you come up with a negative value, something is wrong,
all right, down to the last category. There were ten observed sixes, the
expected is around thirty three. You would have to calculate each of
these if you wanted to do it by hand, but I’m gonna get this using the
TI-84 goodness-of-fit. Going to my STAT menu, arrow over to TESTS, it’s toward
the bottom. You can scroll down or scroll up to the chi-square goodness-of-fit.
It’s going to ask for where your observed counts are. I put those in list
one and the expected counts are in list three. If you need to change that you can.
Again it won’t run the test correctly if you use the expected proportions. The
degrees of freedom is the number of outcomes or number or categories minus 1, so for six-sided die that degrees of freedom would be 5. Then
Calculate. My standardized test statistic is twenty eight point five
four and looking at the corresponding p-value, it’s in scientific or sort of
scientific notation, it’s going to be two point eight five times 10 to the
negative fifth power. That p-value two point eight five
times 10 to the negative fifth, okay or if you wanted to put in the leading
zeroes, you’d have four leading zeros and then your significant digits. One
method to make the decision is to use the critical value method, so I’m gonna
do that real quick. The chi-square distribution is skewed
right, so you want to draw something reasonably skewed right. This may not be
exactly the correct representation, but it’s good enough, it’s a visual aid. And
then the problem I’m told to use a level of significance as point zero five, degrees of freedom is five. Going to the chi-square table for the
text I’m currently using, the table reads from the critical value to positive
infinity and it’s extremely difficult to read. Reading over to 0.05 and then
down to five degrees of freedom, the critical value is eleven point zero
seven zero. Looking at this test statistic of 28.54,
that’s going to be way out in the rejection region further to the right
and the p-value represents the area further to the right of that test
statistic. We know the decision is to reject the null hypothesis, so we
are in favor of the alternative. There is sufficient evidence to support the
claim or to support the suspicion that the die is not fair and it may be loaded.
Looking at the p-value method, when your p-value is less than your level of
significance, my level of significance was point zero one, two point eight five
times ten 10 to the negative fifth is less than 0.01, so the decision is to
reject the null. If I change that to 0.05, I’m sorry, this was the actual level of
significance for the problem, and we know the decision is to reject so even if we
tightened up our level of significance, in other words we demanded more evidence
to reject the null, this p-value is still significantly less than our smallest
common level of significance. We’re going to be rejecting the null at all
common levels of significance because that p-value is less than these alphas.