Food: Hypothesis Test with Coke and Pepsi

Summary: This High School AP activity examines whether students can tell the difference between CokeTM and PepsiTM by taste? During the “tasting part”, data are collected and the class keeps track of how many students can differentiate between Coke and Pepsi. During the “simulation part” of the activity, a simulation is conducted with dice. Finally, students compare their classroom results in the taste test with the simulated results about what would happen when subjects just guess randomly from the three possible choices. The activity is described in F. Bullard, “AP Statistics: Coke Versus Pepsi: An Introductory Activity for Test of Significance: AP Central – The College Board,” 2017 on the AP Central website at


Specifics: The activity is performed in the following steps:

  1. The Tasting part:
    1. First, two students will label three cup positions “A,” “B,” and “C.” Then they will roll a die and pour drinks into the cups such that all combinations of two of one drink and one of the other are represented, and the die roll makes each combination equally likely and keep track of the treatment.
    2. Students will be called out into the hall one by one to taste the three drinks and decide which cup contains the different drink. They do not need to identify the drinks as Coke or Pepsi, they only have to identify the cup containing the different soda, either A, B, or C.
  2. The Simulation part:
    1. The next stage of the discussion is to ask the students how many correct identifications they need before they can conclude that people were not just randomly guessing: “11 out of 30 is more than a third, but not enough more to be convincing, right?” Students will probably volunteer different dividing lines, but they will not be good at defending them. At the point when all the students understand the question but are unsure of how to answer it, the dice should be introduced into the activity.
    2. The students can suggest a simulation in which two die outcomes (say, 1 and 2) are considered a correct cup identification, and the other four die outcomes (say, 3, 4, 5, and 6) are considered incorrect cup identifications. Demonstrate by rolling a set of dice or one die many times. You should have as many die rolls as there are subjects in the study. Count the 1s and 2s. Suppose there are 8 out of 30 that “guessed correctly.” On your number line at the blackboard, make an X over the number 8. The students or group of students should do five or 10 simulations each (it’s good to have about 100—200 simulations) and then come to the blackboard and stack their Xs over the appropriate integers, making a histogram of the distribution of “number of correct cup identifications if everyone is randomly guessing.”
  3. Conclusion:
    1. Upon the conclusion of the tasting, the number of correct identifications is then counted. At this point, if the number is unusually high (say, 18 out of 30), then most students are prepared to conclude (correctly) that there is evidence that at least some people can tell the difference between Coke and Pepsi.
    2. Some statement like this would be great: “If everyone were randomly guessing, we would almost never see 18 students get it right by luck, because we did that 100 times with dice, and the highest we ever got was 16, and that was only once.”
    3. In the author’s experience, usually, about half or a little more will identify the correct drink. When the author, did this activity with a class: 13 out of 21 students correctly identified the different drinks.

(Resource photo illustration by Barbara Cohen, 2020; this summary compiled by Bibek Aryal)

No votes yet
Author Name: 
F. Bullard
Source Code Available: 
Source Code Not Available
Material Type: 
Free for All

You must Login or Register to post comments.