Wednesday, January 1, 2020
Example Chi-Square Test for a Multinomial Experiment
One use of a chi-square distribution is with hypothesis tests for multinomial experiments. To see how this hypothesis test works, we will investigate the following two examples.Ã Both examples work through the same set of steps: Form the null and alternative hypothesesCalculate the test statisticFind the critical valueMake a decision on whether to reject or fail to reject our null hypothesis.Ã Example 1: A Fair Coin For our first example, we want to look at a coin.Ã A fair coin has an equal probability of 1/2 of coming up heads or tails. We toss a coin 1000 times and record the results of a total of 580 heads and 420 tails. We want to test the hypothesis at a 95% level of confidence that the coin we flipped is fair. More formally, the null hypothesis H0 is that the coin is fair. Since we are comparing observed frequencies of results from a coin toss to the expected frequencies from an idealized fair coin, a chi-square test should be used. Compute the Chi-Square Statistic We begin by computing the chi-square statistic for this scenario. There are two events, heads and tails. Heads has an observed frequency of f1 580 with expected frequency of e1 50% x 1000 500. Tails have an observed frequency of f2 420 with an expected frequency of e1 500. We now use the formula for the chi-square statistic and see that Ãâ¡2 (f1 - e1 )2/e1 (f2 - e2 )2/e2 802/500 (-80)2/500 25.6. Find the Critical Value Next, we need to find the critical value for the proper chi-square distribution. Since there are two outcomes for the coin there are two categories to consider. The number of degrees of freedom is one less than the number of categories: 2 - 1 1. We use the chi-square distribution for this number of degrees of freedom and see that Ãâ¡20.953.841. Reject or Fail to Reject? Finally, we compare the calculated chi-square statistic with the critical value from the table. Since 25.6 3.841, we reject the null hypothesis that this is a fair coin. Example 2: A Fair Die A fair die has an equal probability of 1/6 of rolling a one, two, three, four, five or six. We roll a die 600 times and note that we roll a one 106 times, a two 90 times, a three 98 times, a four 102 times, a five 100 times and a six 104 times. We want to test the hypothesis at a 95% level of confidence that we have a fair die. Compute the Chi-Square Statistic There are six events, each with expected frequency of 1/6 x 600 100. The observed frequencies are f1 106, f2 90, f3 98, f4 102, f5 100, f6 104, We now use the formula for the chi-square statistic and see that Ãâ¡2 (f1 - e1 )2/e1 (f2 - e2 )2/e2 (f3 - e3 )2/e3(f4 - e4 )2/e4(f5 - e5 )2/e5(f6 - e6 )2/e6 1.6. Find the Critical Value Next, we need to find the critical value for the proper chi-square distribution. Since there are six categories of outcomes for the die, the number of degrees of freedom is one less than this: 6 - 1 5. We use the chi-square distribution for five degrees of freedom and see that Ãâ¡20.9511.071. Reject or Fail to Reject? Finally, we compare the calculated chi-square statistic with the critical value from the table. Since the calculated chi-square statistic is 1.6 is less than our critical value of 11.071, we fail to reject the null hypothesis.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.