9.4 Contingency Tables
A contingency table provides a way of portraying data that can facilitate calculating probabilities. The table helps in determining conditional probabilities quite easily. The table displays sample values in relation to two different variables that may be dependent or contingent on one another. Later on, we will use contingency tables again, but in another manner.
EXAMPLE 3.20
Problem
Suppose a study of speeding violations and drivers who use cell phones produced the following fictional data:
Speeding violation in the last year | No speeding violation in the last year | Total | |
---|---|---|---|
Uses cell phone while driving | 25 | 280 | 305 |
Does not use cell phone while driving | 45 | 405 | 450 |
Total | 70 | 685 | 755 |
The total number of people in the sample is 755. The row totals are 305 and 450. The column totals are 70 and 685. Notice that 305 + 450 = 755 and 70 + 685 = 755.
Calculate the following probabilities using the table.
a. Find P(Driver is a cell phone user).
b. Find P(driver had no violation in the last year).
c. Find P(Driver had no violation in the last year AND was a cell phone user).
d. Find P(Driver is a cell phone user OR driver had no violation in the last year).
e. Find P(Driver is a cell phone user GIVEN driver had a violation in the last year).
f. Find P(Driver had no violation last year GIVEN driver was not a cell phone user)
Solution
a. [latex]\frac{\text{number of cell phone users}}{\text{total number in study}}=\frac{305}{755}[/latex]
b. [latex]\frac{\text{number that had no violation}}{\text{total number in study}}=\frac{685}{755}[/latex]
c. [latex]\frac{280}{755}[/latex]
d. [latex](\frac{305}{755}+\frac{685}{755})−\frac{280}{755}=\frac{710}{755}[/latex]
e. [latex]\frac{25}{70}[/latex] (The sample space is reduced to the number of drivers who had a violation.)
f. [latex]\frac{405}{450}[/latex] (The sample space is reduced to the number of drivers who were not cell phone users.)
TRY IT 9.20
Table 9.3 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 |
- What is P(athlete stretches before exercising)?
- What is P(athlete stretches before exercising|no injury in the last year)?
EXAMPLE 9.21
Table 9.4 shows a random sample of 100 hikers and the areas of hiking they prefer.
Sex | The Coastline | Near Lakes and Streams | On Mountain Peaks | Total |
---|---|---|---|---|
Female | 18 | 16 | 45 | |
Male | 14 | 55 | ||
Total | 41 |
Problem
a. Complete the table.
b. Are the events “being female” and “preferring the coastline” independent events?
Let F = being female and let C = preferring the coastline.
- Find P(F AND C).
- Find P(F)P(C)
Are these two numbers the same? If they are, then F and C are independent. If they are not, then F and C are not independent.
c. Find the probability that a person is male given that the person prefers hiking near lakes and streams. Let M = being male, and let L = prefers hiking near lakes and streams.
- What word tells you this is a conditional?
- Fill in the blanks and calculate the probability: P(___|___) = ___.
- Is the sample space for this problem all 100 hikers? If not, what is it?
d. Find the probability that a person is female or prefers hiking on mountain peaks. Let F = being female, and let P = prefers mountain peaks.
- Find P(F).
- Find P(P).
- Find P(F AND P).
- Find P(F OR P).
Solution
a.
Sex | 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 |
b.
- [latex]\text{P(F AND C)}=\frac{18}{100}=0.18[/latex]
- [latex]P(F)P(C)=(\frac{45}{100})(\frac{34}{100})=(0.45)(0.34)=0.153[/latex]
P(F AND C) ≠ P(F)P(C), so the events F and C are not independent.
c.
- The word ‘given’ tells you that this is a conditional.
- P(M|L) = [latex]\frac{25}{41}[/latex]
- No, the sample space for this problem is the 41 hikers who prefer lakes and streams.
d.
- [latex]P(F)=\frac{45}{100}[/latex]
- [latex]P(P)=\frac{25}{100}[/latex]
- [latex]\text{P(F AND P)}=\frac{11}{100}[/latex]
- [latex]\text{P(F OR P)}=\frac{45}{100}+\frac{25}{100}-\frac{11}{100}=\frac{59}{100}[/latex]
TRY IT 9.21
Table 3.6 shows a random sample of 200 cyclists and the routes they prefer. Let M = males and H = hilly path.
Gender | Lake Path | Hilly Path | Wooded Path | Total |
---|---|---|---|---|
Female | 45 | 38 | 27 | 110 |
Male | 26 | 52 | 12 | 90 |
Total | 71 | 90 | 39 | 200 |
- Out of the males, what is the probability that the cyclist prefers a hilly path?
- Are the events “being male” and “preferring the hilly path” independent events?
EXAMPLE 9.22
Muddy Mouse lives in a cage with three doors. If Muddy goes out the first door, the probability that he gets caught by Alissa the cat is [latex]\frac{1}{5}[/latex] and the probability he is not caught is [latex]\frac{4}{5}[/latex]. If he goes out the second door, the probability he gets caught by Alissa is [latex]\frac{1}{4}[/latex] and the probability he is not caught is [latex]\frac{3}{4}[/latex]. The probability that Alissa catches Muddy coming out of the third door is [latex]\frac{1}{2}[/latex] and the probability she does not catch Muddy is [latex]\frac{1}{2}[/latex]. It is equally likely that Muddy will choose any of the three doors so the probability of choosing each door is [latex]\frac{1}{3}[/latex].
Caught or Not | Door One | Door Two | Door Three | Total |
---|---|---|---|---|
Caught | [latex]\frac{1}{15}[/latex] | [latex]\frac{1}{12}[/latex] | [latex]\frac{1}{6}[/latex] | |
Not Caught | [latex]\frac{4}{15}[/latex] | [latex]\frac{3}{12}[/latex] | [latex]\frac{1}{6}[/latex] | |
Total | 1 |
- The first entry [latex]\frac{1}{15}=(\frac{1}{5})(\frac{1}{3})[/latex] is P(Door One AND Caught)
- The entry [latex]\frac{4}{15}=(\frac{4}{5})(\frac{1}{3})[/latex] is P(Door One AND Not Caught)
Verify the remaining entries.
Problem
a. Complete the probability contingency table. Calculate the entries for the totals. Verify that the lower-right corner entry is 1.
b. What is the probability that Alissa does not catch Muddy?
c. What is the probability that Muddy chooses Door One OR Door Two given that Muddy is caught by Alissa?
Solution
a.
Caught or Not | Door One | Door Two | Door Three | Total |
---|---|---|---|---|
Caught | [latex]\frac{1}{15}[/latex] | [latex]\frac{1}{12}[/latex] | [latex]\frac{1}{6}[/latex] | [latex]\frac{19}{60}[/latex] |
Not Caught | [latex]\frac{4}{15}[/latex] | [latex]\frac{3}{12}[/latex] | [latex]\frac{1}{6}[/latex] | [latex]\frac{41}{60}[/latex] |
Total | [latex]\frac{5}{15}[/latex] | [latex]\frac{4}{12}[/latex] | [latex]\frac{2}{6}[/latex] | 1 |
b. [latex]\frac{41}{60}[/latex]
c. [latex]\frac{9}{19}[/latex]
EXAMPLE 9.23
Table 9.9 contains the number of crimes per 100,000 inhabitants from 2008 to 2011 in the U.S.
Year | Robbery | Burglary | Rape | Vehicle | Total |
---|---|---|---|---|---|
2008 | 145.7 | 732.1 | 29.7 | 314.7 | |
2009 | 133.1 | 717.7 | 29.1 | 259.2 | |
2010 | 119.3 | 701 | 27.7 | 239.1 | |
2011 | 113.7 | 702.2 | 26.8 | 229.6 | |
Total |
Problem
TOTAL each column and each row. Total data = 4,520.7
- Find P(2009 AND Robbery).
- Find P(2010 AND Burglary).
- Find P(2010 OR Burglary).
- Find P(2011|Rape).
- Find P(Vehicle|2008).
Solution
a. 0.0294, b. 0.1551, c. 0.7165, d. 0.2365, e. 0.2575
TRY IT 9.24
Table 3.10 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 |
- Find the total for each row and column
- Find the probability that a randomly chosen individual from this group is Tall.
- Find the probability that a randomly chosen individual from this group is Obese and Tall.
- Find the probability that a randomly chosen individual from this group is Tall given that the idividual is Obese.
- Find the probability that a randomly chosen individual from this group is Obese given that the individual is Tall.
- Find the probability a randomly chosen individual from this group is Tall and Underweight.
- Are the events Obese and Tall independent?
Attribution
By Barbara Illowsky and Susan Dean, Introductory Statistics, Access for free at https://openstax.org/books/introductory-statistics/pages/1-introduction. Jun 23, 2022 OpenStax. Textbook content produced by OpenStax is licensed under a Creative Commons Attribution License CC BY-NC-SA 4.0. The OpenStax name, OpenStax logo, OpenStax book covers, OpenStax CNX name, and OpenStax CNX logo are not subject to the Creative Commons license and may not be reproduced without the prior and express written consent of Rice University.