11.3.2.2 - Example: Summarized Data

Example: Coffee and Tea Preference Section

Is there a relationship between liking tea and liking coffee?

The following table shows data collected from a random sample of 100 adults. Each were asked if they liked coffee (yes or no) and if they liked tea (yes or no).

    Likes Coffee
    Yes No
Likes Tea Yes 30 25
  No 10 35

Let's use the 5 step hypothesis testing procedure to address this research question.

1. Check any necessary assumptions and write null and alternative hypotheses.

 \(H_0:\) Liking coffee an liking tea are not related (i.e., independent) in the population
\(H_a:\) Liking coffee and liking tea are related (i.e., dependent) in the population

Assumption: All expected counts are at least 5.

2. Calculate an appropriate test statistic.

Let's use Minitab to calculate the test statistic and p-value.

  1. Enter the table into a Minitab worksheet as shown below:
      C1 C2 C3
      Likes Tea Likes Coffee-Yes Likes Coffee-No
    1 Yes 30 25
    2 No 10 35
  2. Select Stat > Tables > Cross Tabulation and Chi-Square
  3. Select Summarized data in a two-way table from the dropdown
  4. Enter the columns Likes Coffee-Yes and Likes Coffee-No in the Columns containing the table box
  5. For the row labels enter Likes Tea (leave the column labels blank)
  6. Select the Chi-Square button and check the boxes for Chi-square test and Expected cell counts.
  7. Click OK and OK
Rows: Likes Tea  Columns: Worksheet columns
  No Yes All
Yes 30 25 55
  22 33  
No 10 35 45
  18 27  
All 40 60 100
Chi-Square Test
  Chi-Square DF P-Value
Pearson 10.774 1 0.001
Likelihood Ratio 11.138 1 0.001

Since the assumption was met in step 1, we can use the Pearson chi-square test statistic.

\(Pearson\;\chi^2 = 10.774\)

3. Determine a p value associated with the test statistic.

\(p = 0.001\)

4. Decide between the null and alternative hypotheses.

Our p value is less than the standard 0.05 alpha level, so we reject the null hypothesis.

5. State a "real world" conclusion.

There is evidence of a relationship between between liking coffee and liking tea in the population.