22.214.171.124 - Example: Summarized Data126.96.36.199 - Example: Summarized Data
Example: Coffee and Tea Preference
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).
Let's use the 5 step hypothesis testing procedure to address this research question.
\(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.
Let's use Minitab to calculate the test statistic and p-value.
- 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
- Select Stat > Tables > Cross Tabulation and Chi-Square
- Select Summarized data in a two-way table from the dropdown
- Enter the columns Likes Coffee-Yes and Likes Coffee-No in the Columns containing the table box
- For the row labels enter Likes Tea (leave the column labels blank)
- Select the Chi-Square button and check the boxes for Chi-square test and Expected cell counts.
- Click OK and OK
Rows: Likes Tea Columns: Worksheet columns
Since the assumption was met in step 1, we can use the Pearson chi-square test statistic.
\(Pearson\;\chi^2 = 10.774\)
\(p = 0.001\)
Our p value is less than the standard 0.05 alpha level, so we reject the null hypothesis.
There is evidence of a relationship between between liking coffee and liking tea in the population.