Chapter 1. Chi-square Goodness of Fit Test

Introduction

Statistical Applets

Set the Bag Count n and the significance level (α) for your hypothesis test with the sliders, then click POUR NEW BAG to pour a bag of candies from the hopper (i.e. take a sample from the underlying population). The table on the right will show the number of candies for each color in the bag, along with the results of the chi-square goodness-of-fit test against the hypothesis that all colors are equally represented in the hopper. Click SHOW HOPPER VALUES to reveal the true population proportions, and click NEW HOPPER to start over with a new hopper (that has a new set of population proportions).

Click the "Quiz Me" button to complete the activity.

Suppose you have a large "hopper" of colored candies. You believe each of the 5 colors are represented equally often in the hopper (that is, you think the hopper contains 20% of each color), but you're not sure. To test this hypothesis, you can pour a "bag" of candies, count the number of each color in the bag, and perform a chi-square goodness-of-fit test on the resulting frequencies. The goodness-of-fit test can be used to test any null hypothesis about the underlying population frequencies; in this case we test against the null hypothesis that all 5 colors have the same likelihood of coming out of the hopper.

Try pouring a few bags from the hopper (controlling the size of each bag using the Bag Count slider) and observe the frequencies and the chi-square test for each bag. A rejected null hypothesis indicates evidence that the color proportions are not equal. After testing a few bags, click the SHOW HOPPER VALUES button to reveal the true population proportions for the hopper. You can then click to get a new hopper (with a new set of population proportions) and try again.

Question 1.1

MhaNNWvg6iry8qqIak3rDqTnnXG3opkbRDYSsQmyLtjAb4jtRaGB5/zjvswgQl6CrYDTxE/aYNcf3VvMUD9O4O3eYluuBXNPzy+dbjLh4mAFBWonVNkBvTu6r3jsNhSTknCo4bMtC2dqUEzT4yUc+nuCGZlpoK+Lb8JyWsoyQoI9wTxwwFqMKuK7tnj6druf/363ndIoMLlv6mvt+jKeEEiwDAyq2dYfXG037e5l2r/JBosKmzMQ//TaBSW8mnSj0qIz7/G4MxzKrUNhsWswo83jvl4aQxcr79+9C3mqYx9GtPdiZO+yvzbuc2GjIXRXyvCsQg70Ip7cE27f42UH9GEc2Bvek9yIAlOLonjxVFM=
2
Correct.
Check the data and try again.
Incorrect.

Question 1.2

Are the population proportions in this hopper truly equal? That is, if you draw a candy at random from the hopper, are each of the colors equally likely to come out? sjkhLuRCQ4SijoxQ

Incorrect. The proportions of colors in this hopper are not exactly equal to each other.
Correct. The proportions of colors in this hopper are not exactly equal to each other.

Question 1.3

7ujuiAketm7UdNQ0qfikepo3uOiUFN4Bh5MgyTbxZQvmjeUBH7RNUa8fwKQZnPHDxziqKWszfRMzdCLocovM7Y1NZ6q/V79j0/lCDb0WQs0TTH/6CdC0srOYKvXvmPyEmpYjMz785G2oo91g9P6KjbjgVOU1RPX/R3PBcCFQ9F3CyssCoxmpoGnFFif6VGnkgtG6BMY86td02+9DfPoCSNIA1soNllcPIP4xw2TsNIkc3ZjS74UEwIEiTVaYHFkQCVcxyz6CJ/Llwc1S
3
Nice job.
To answer this question you must draw 5 bags of 20 candies each from the hopper, noting for each bag whether or no the null hypothesis is rejected.
Incorrect.

Question 1.4

iLL81rrzCqQVT1oWQFRycU+4xZ9H45Z/TZLZsJNApS1ktQokSArbaz2t+d/s8hrtTesbqmCMjD2EN2KtbJtM8CgLhEcfdMtwnrkiurM1hAz2FnQXo+uvmg2mIa0V6VdIVMy5o4wj0LxTNcvvUIPVkqDxeR2K3MDTCbPddyRPtpkUYVADEobJwEwLk6KlhRiUExgTCg==
3
Nice job.
To answer this question you must draw 5 bags of 20 candies each from the hopper, noting for each bag whether or no the null hypothesis is rejected.
Incorrect.

Question 1.5

xzLqsyquRCQ5vgE8RdC4gjrtTsCt7I9t3Md67vlrInvigKa24a5UvF/rxoMsYtlonLz54btOg60yBOBQlzEk5ovzNYZQmrOZI/wx5y0g6dxNuIYqD9XLNAI4Pd8tu0OFXntEstAMAdXibT380hDnxdn8eJL1cU44pV4NhgGtU8DO4+weCZAmsnSHbnF8ezchWp/meELVND+yfs6+Q1Sjmho1n7y7P2MmJmzyGfC5Y1dKwEJu3nYT08lc3CG6A6v0Ri0AmSWMftlicRipxFi5G9xJ7UGKB2jptOmXx9Mblh0la1lqWwHe7LCxO9EaC5fkegL0D+oiWclNAOLDZFCEurkOmCEhJlhvFepV72RpJkJ36J0nJmNcncOM6deFu+3WsKrvg9jyqgFgZCX5KyuqayheZc2jv9lqtzqyDHhgGhqVowRl
There's nothing wrong with the Chi-square test. The likelihood that a null hypothesis for any statistical test will be rejected is dependent on a number of factors, one of which is the sample size. The larger the sample, the more similar the sample's distribution will be to the population distribution. This has two practical effects on an inferential statistic, like Chi-square. First, if the null hypothesis is, in fact, incorrect, the sample will be less likely to mistakenly match the null hypothesis due to random sampling error. And second, the "error" term in the sample statistic will be smaller (reflecting the central limit theorem), so the test statistic will be larger and therefore result in a smaller P-value—and a larger probability that the null hypothesis will be rejected.