Unit 11: Chi-Squared Tests

Text reading and homework:

Read chapters 27, 28 and 29 of FPP and do the following review exercises:
Chapter 27 (pages 518-521): 2, 6, 7
Chapter 28 (pages 540-543): 1, 2, 3, 6, 7, 8

Reading:

Sharon Begley, "Do as I Say, Not as I Do," Newsweek, "On Science" column, June 23, 2008, page 20.
Document source: LexisNexis.

Possible essay questions:

Computer project:

Suppose we want to test whether a particular coin is fair by tossing it 100 times and then using a test of significance. (The null hypothesis will be that the coin is fair.)

For each problem below, use a spreadsheet to implement 50 simulations of 1) tossing a coin 100 times and 2) applying a test of significance. For each problem, report the percentage of simulations where the test of significance failed to reach the correct decision. The letter p denotes the probability of a head on any given toss of the coin.

  1. Use a coin with p=0.55 and a significance level of 0.05.
  2. Use a coin with p=0.6 and a significance level of 0.05.
  3. Use a coin with p=0.65 and a significance level of 0.05.
  4. Use a fair coin (p=0.5) and a significance level of 0.1.
  5. Use a fair coin (p=0.5) and a significance level of 0.05.
  6. Use a fair coin (p=0.5) and a significance level of 0.01.

Simulation Tips:

Use each column to simulate 100 flips of a coin. We wish to count the number of heads, so let 1 be a head and 0 be a tail [e.g., in the first question, =IF(RAND()<.55,1,0)]. At the bottom of each column use the SUM command to count the number of heads. You can then see in how many of the 50 simulations (sets of 100 flips) the null hypothesis is rejected by using FREQUENCY or HISTOGRAM to count how many simulations gave too many or too few heads: Construct the "bin array" with the values for the lower and upper acceptable range (calculated by hand using the normal distribution). It should have just two numbers. [For example, for the first simulation: to get a significance level of 0.05 in a one-tailed test, the desired z-value corresponds to an area of 100 - 2(5) = 90 percent, which the normal table says is z = 1.65. Because the null hypothesis implies an EV of 50 and an SE of 5, we should reject a result outside of the interval 50 plus or minus 1.65(5), i.e., from 41.8 to 58.3; these are the values that should go in the "bin array". Because the interval depends only on the significance level, it should be the same for four of the six simulations.]

The FREQUENCY or HISTOGRAM function then can give the number of simulations "below the lower level" (i.e., unfair, too few heads), "in the acceptable range" (fair, about the right number of heads) and "above the higher level" (unfair, too many heads). In the first three questions, the coin is unfair, so any simulation with count of heads inside the acceptable range, i.e., in which the null hypothesis is not rejected, got the wrong answer; in the last three, the coin is fair, so any simulation with count of heads outside the acceptable range, so that the null hypothesis is rejected, got the wrong answer.


Revised November 14, 2008. Questions to dlantz@mail.colgate.edu
Copyright 2008 © Colgate University. All rights reserved.