Chi-Square Test of Homogeneity – Apply It 1

  • Complete a chi-square test of homogeneity
  • Write the conclusion of a chi-square test of homogeneity in context of the problem

Coffee Preferences Across Age Groups

In October 2023, coffee expert James Hoffmann and the coffee company Cometeer held the “Great American Coffee Taste Test,” a livestream on YouTube. Viewers who had ordered a set of four coffees tasted them during the stream and filled out a survey about the coffees, their own coffee habits, and their age.[1]

Let’s use the data from this survey to investigate the following question: Does the proportion of coffee drinkers who like their coffee “very strong” differ for three age groups?

A note about these data: The survey participants were viewers who chose to respond, so they are not a random sample of coffee drinkers. This means the results cannot be generalized to all coffee drinkers, and the randomness condition for a chi-square test is not met. We use these data here only to practice the mechanics of the test and the interpretation of its results. For this practice, we also treat the respondents in each age group as a sample from that age group. The table includes only respondents ages 18–44 who answered both questions.

Below are the summarized survey data for the three age groups in a two-way table.

  Prefer Very Strong Coffee  
  Yes No Totals
Ages 18–24 46 386 432
Ages 25–34 201 1,744 1,945
Ages 35–44 104 835 939
Totals 351 2,965 3,316
Let’s use the statistical tool to conduct the Chi-Squared test of Homogeneity.
Remember to select “Contingency Table” under Enter Data and input our values accordingly.

[Trouble viewing? Click to open in a new tab.]

  1. Hoffmann, J., & Cometeer. (2023, October). The Great American Coffee Taste Test [Survey data]. Distributed via TidyTuesday, 2024-05-14. https://github.com/rfordatascience/tidytuesday/tree/main/data/2024/2024-05-14 ↵