3.3 Contingency Tables

LEARNING OBJECTIVES

  • Construct and interpret contingency tables.

contingency table provides a way of displaying data that can facilitate calculating probabilities.  The table can be used to describe the sample space of an experiment.  Contingency tables allow us to break down a sample pace when two variables are involved.

Speeding violation in the last year No speeding violation in the last year Total
Cell phone user 25 280 305
Not a cell phone user 45 405 450
Total 70 685 755

When reading a contingency table:

  • The left-side column lists all of the values for one of the variables.  In the table shown above, the left-side column shows the variable about whether or not someone uses a cell phone while driving.
  • The top row lists all of the values for the other variable.  In the table shown above, the top row shows the variable about whether or not someone had a speeding violation in the last year.
  • In the body of the table, the cells contain the number of outcomes that fall into both of the categories corresponding to the intersecting row and column.  In the table shown above, the number of 25 at the intersection of the “cell phone user” row and “speeding violation in the last year” column tells us that there are 25 people who have both of these characteristics.
  • The bottom row gives the totals in each column.  In the table shown above, the number 685 in the bottom of the “no speeding violation in the last year” tells us that there are 685 people who did not have a speeding violation in the last year.
  • The right-side column gives the totals in each row.  In the table shown above, the number 305 in the right side of the “cell phone user” row tells us that there are 305 people who use cell phones while driving.
  • The number in the bottom right corner is the size of the sample space.  In the table shown above, the number in the bottom right corner is 755, which tells us that there 755 people in the sample space.

EXAMPLE

Suppose a study of speeding violations and drivers who use cell phones while driving produced the following fictional data:

Speeding violation in the last year No speeding violation in the last year Total
Cell phone user 25 280 305
Not a cell phone user 45 405 450
Total 70 685 755

Calculate the following probabilities:

  1. What is the probability that a randomly selected person is a cell phone user?
  2. What is the probability that a randomly selected person had no speeding violations in the last year?
  3. What is the probability that a randomly selected person had a speeding violation in the last year and does not use a cell phone?
  4. What is the probability that a randomly selected person uses a cell phone and had no speeding violations in the last year?

Solution:

  1. [latex]\displaystyle{\mbox{Probability}=\frac{\mbox{number of cell phone users}}{\mbox{total number in study}}=\frac{305}{755}}[/latex]
  2. [latex]\displaystyle{\mbox{Probability}=\frac{\mbox{number of no violations}}{\mbox{total number in study}}=\frac{685}{755}}[/latex]
  3. [latex]\displaystyle{\mbox{Probability}=\frac{\mbox{number of violations and not cell phone users}}{\mbox{total number in study}}=\frac{45}{755}}[/latex]
  4. [latex]\displaystyle{\mbox{Probability}=\frac{\mbox{number of cell phone users and no violations}}{\mbox{total number in study}}=\frac{280}{755}}[/latex]

TRY IT

This table shows the number of athletes who stretch before exercising and how many had injuries within the past year.

Injury in last year No injury in last year Total
Stretches 55 295 350
Does not stretch 231 219 450
Total 286 514 800
  1. What is the probability that a randomly selected athlete stretches before exercising?
  2. What is the probability that a randomly selected athlete had an injury in the last year?
  3. What is the probability that a randomly selected athlete does not stretch before exercising and had no injuries in the last year?
  4. What is the probability that a randomly selected athlete stretches before exercising and had no injuries in the last year?
Click to see Solution
  1. [latex]\displaystyle{\mbox{Probability}=\frac{350}{800}=0.4375}[/latex]
  2. [latex]\displaystyle{\mbox{Probability}=\frac{286}{800}=0.3575}[/latex]
  3. [latex]\displaystyle{\mbox{Probability}=\frac{219}{800}=0.27375}[/latex]
  4. [latex]\displaystyle{\mbox{Probability}=\frac{295}{800}=0.36875}[/latex]

EXAMPLE

The table below shows a random sample of 100 hikers broken down by gender and the areas of hiking they prefer.

Gender The Coastline Near Lakes and Streams On Mountain Peaks Total
Female 18 16 45
Male 14 55
Total 41
  1. Fill in the missing values in the table
  2. What is the probability that a randomly selected hiker is female?
  3. What is the probability that a randomly selected hiker prefers to hike on the coast?
  4. What is the probability that a randomly selected hiker is male and prefers to hike near lakes and streams?
  5. What is the probability that a randomly selected hiker is female and prefers to hike on mountains?

Solution:

  1. Gender The Coastline Near Lakes and Streams On Mountain Peaks Total
    Female 18 16 11 45
    Male 16 25 14 55
    Total 34 41 25 100
  2. [latex]\displaystyle{\mbox{Probability}=\frac{45}{100}=0.45}[/latex]
  3. [latex]\displaystyle{\mbox{Probability}=\frac{34}{100}=0.34}[/latex]
  4. [latex]\displaystyle{\mbox{Probability}=\frac{25}{100}=0.25}[/latex]
  5. [latex]\displaystyle{\mbox{Probability}=\frac{11}{100}=0.11}[/latex]

TRY IT

The table below relates the weights and heights of a group of individuals participating in an observational study.

Weight/Height Tall Medium Short Totals
Obese 18 28 14
Normal 20 51 28
Underweight 12 25 9
Totals
  1. Find the total for each row and column.
  2. Find the probability that a randomly chosen individual from this group is tall.
  3. Find the probability that a randomly chosen individual from this group is normal.
  4. Find the probability that a randomly chosen individual from this group is obese and short.
  5. Find the probability that a randomly chosen individual from this group is underweight and medium.
Click to see Solution
  1. Weight/Height Tall Medium Short Totals
    Obese 18 28 14 60
    Normal 20 51 28 99
    Underweight 12 25 9 46
    Totals 50 104 51 205
  2. [latex]\displaystyle{\mbox{Probability}=\frac{50}{205}}[/latex]
  3. [latex]\displaystyle{\mbox{Probability}=\frac{99}{205}}[/latex]
  4. [latex]\displaystyle{\mbox{Probability}=\frac{14}{205}}[/latex]
  5. [latex]\displaystyle{\mbox{Probability}=\frac{25}{205}}[/latex]

Watch this video: Ex: Basic Example of Finding Probability From a Table by Mathispower4u [2:39] (transcript available).


Concept Review

There are several tools we can use to help organize and sort data when calculating probabilities.  Contingency tables help display data and are particularly useful when calculating probabilities that have two variables of interest.


Attribution

3.4 Contingency Tables in Introductory Statistics by OpenStax is licensed under a Creative Commons Attribution 4.0 International License.

License

Icon for the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License

Introduction to Statistics Copyright © 2022 by Valerie Watts is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License, except where otherwise noted.