✦Template Printable Ideas Insights

Two-Way Contingency Table Example

By

A two-way contingency table, also known as a 2x2 contingency table, is a fundamental tool in statistics used to compare two categorical variables. It's a 2x2 matrix that displays the frequency counts of two variables, helping researchers understand the relationship between them. Let's explore this concept with an engaging example.

Imagine you're studying the relationship between two variables: smoking habits and stress levels among university students. The smoking habits variable has two categories: 'smoker' and 'non-smoker'. Similarly, stress levels can be categorized into 'high' and 'low'. Now, let's build our two-way contingency table.

Smoking Habits vs. Stress Levels

In our study, we've collected data from 100 students. Here's how they fall into the four categories:

7th Grade Completing Two-Way Tables Worksheet
7th Grade Completing Two-Way Tables Worksheet
Create Contingency Table in R (5 Examples) | Two-way Cross Tabulation
Create Contingency Table in R (5 Examples) | Two-way Cross Tabulation
two-way tables
two-way tables

High StressLow StressTotal
Smoker352055
Non-smoker153045
Total5050100

GCSE Statistics Resources & Worksheets [FREE]
GCSE Statistics Resources & Worksheets [FREE]
TWO WAY TABLES GUIDED NOTES AND PRACTICE
TWO WAY TABLES GUIDED NOTES AND PRACTICE
Two Way Frequency Table Worksheet – Worksheet for Education
Two Way Frequency Table Worksheet – Worksheet for Education

High Stress Levels

The top left cell (35 students) shows that 35 smokers reported high stress levels. The row below (15 students) indicates that 15 non-smokers also reported high stress. In total, half of our students (50) are experiencing high stress.

Looking at high stress levels, we notice that a higher proportion of smokers (35/55) report high stress compared to non-smokers (15/45). This suggests a potential relationship between smoking and high stress levels, but let's examine the other categories before drawing conclusions.

Low Stress Levels

The bottom left cell (20 students) shows that 20 smokers reported low stress. Moving down, 30 non-smokers reported low stress (bottom middle cell). So, half of our students (50) are experiencing low stress.

Contingency Table: Definition, Examples & Interpreting
Contingency Table: Definition, Examples & Interpreting
Two-Way Tables Task Cards
Two-Way Tables Task Cards
Year 5 Statistics Worksheets: Reading from Two Way Tables
Year 5 Statistics Worksheets: Reading from Two Way Tables
Table concept
Table concept
Fun Insect-Themed Math Worksheets for Preschoolers: Times Tables & Addition Practice
Fun Insect-Themed Math Worksheets for Preschoolers: Times Tables & Addition Practice
Умножения
Умножения

Interestingly, a higher proportion of non-smokers (30/45) report low stress compared to smokers (20/55). This further supports the potential relationship between smoking and stress levels we noticed earlier.

Statistical Analysis

To gain a more precise understanding of the relationship, we can conduct a chi-square test of independence. This test will help determine if the association between smoking habits and stress levels is statistically significant. Let's break it down:

Expected Frequencies

The chi-square test uses expected frequencies, which can be calculated by multiplying the row totals by the column totals, and then dividing by the grand total (100 in this case).

Blog The Importance of Teaching Two-Way Tables and Relative Frequency Tables in Mathematics
Blog The Importance of Teaching Two-Way Tables and Relative Frequency Tables in Mathematics
Two Way Tables Two Truths & a Lie
Two Way Tables Two Truths & a Lie
the multiplyed table to 20 chart is shown in purple and green colors, with numbers
the multiplyed table to 20 chart is shown in purple and green colors, with numbers

High StressLow StressTotal
Smoker27.527.555
Non-smoker22.522.545
Total5050100

Calculating the Chi-square Statistic

Now, we calculate the chi-square statistic (χ²) by summing the values in each cell, subtracting the expected frequency, squaring the result, and then dividing by the expected frequency.

The calculated χ² value is approximately 4.1, which, with a degree of freedom of 1 (since we have two categories in both variables), gives us a p-value less than 0.05. This suggests that there is indeed a statistically significant relationship between smoking habits and stress levels among university students.

So, there you have it - we've explored two-way contingency tables using a practical example. By understanding the frequencies and proportions within these tables, we can make informed decisions and uncover relationships between categorical variables.