Loading [MathJax]/jax/output/HTML-CSS/jax.js
Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Statistics LibreTexts

3.5: Contingency Tables

( \newcommand{\kernel}{\mathrm{null}\,}\)

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.5.1

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
Cell phone user 25 280 305
Not a cell phone user 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.

  1. Find P(Person is a cell phone user).
  2. Find P(person had no violation in the last year).
  3. Find P(Person had no violation in the last year AND was a cell phone user).
  4. Find P(Person is a cell phone user OR person had no violation in the last year).
  5. Find P(Person is a cell phone user GIVEN person had a violation in the last year).
  6. Find P(Person had no violation last year GIVEN person was not a cell phone user)

Answer

  1. number of cell phone userstotal number in study = 305755
  2. number that had no violationtotal number in study=685755
  3. 280755
  4. (305755+685755)280755=710755
  5. 2570 (The sample space is reduced to the number of persons who had a violation.)
  6. 405450 (The sample space is reduced to the number of persons who were not cell phone users.)
Exercise 3.5.1

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 P(athlete stretches before exercising)?
  2. What is P(athlete stretches before exercising|no injury in the last year)?

Answer

  1. P(athlete stretches before exercising)=350800=0.4375
  2. P(athlete stretches before exercising|no injury in the last year)=295514=0.5739
Example 3.5.2

Table shows a random sample of 100 hikers and the areas of hiking they prefer.

Hiking Area Preference
Sex The Coastline Near Lakes and Streams On Mountain Peaks Total
Female 18 16 ___ 45
Male ___ ___ 14 55
Total ___ 41 ___ ___
  1. Complete the table.
  2. Are the events "being female" and "preferring the coastline" independent events? Let F = being female and let C = preferring the coastline.
    1. Find P(F AND C).
    2. Find P(F)P(C)
    3. 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.
  3. 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.
    1. What word tells you this is a conditional?
    2. Fill in the blanks and calculate the probability: P(___|___) = ___.
    3. Is the sample space for this problem all 100 hikers? If not, what is it?
  4. Find the probability that a person is female or prefers hiking on mountain peaks. Let F= being female, and let P= prefers mountain peaks.
    1. Find P(F).
    2. Find P(P).
    3. Find P(F AND P).
    4. Find P(F OR P).

Answers

a.

Hiking Area Preference
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.

P(F AND C)=18100=0.18

P(F)P(C)=(45100)(34100)=(0.45)(0.34)=0.153

P(F AND C)P(F)P(C), so the events F and C are not independent.

c.

  1. The word 'given' tells you that this is a conditional.
  2. P(M|L)=2541
  3. No, the sample space for this problem is the 41 hikers who prefer lakes and streams.

d.

  1. Find P(F).
  2. Find P(P).
  3. Find P(F AND P).
  4. Find P(F OR P).

d.

  1. P(F)=45100
  2. P(P)=25100
  3. P(F AND P)=11100
  4. P(F OR P)=45100+2510011100=59100
Exercise 3.5.2

Table 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
  1. Out of the males, what is the probability that the cyclist prefers a hilly path?
  2. Are the events “being male” and “preferring the hilly path” independent events?

Answer

  1. P(H|M) = 5290 = 0.5778
  2. For M and H to be independent, show P(H|M) = P(H)
    P(H|M) = 0.5778, P(H) = 90200 = 0.45
    P(H|M) does not equal P(H) so M and H are NOT independent.
Example 3.5.3

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 15 and the probability he is not caught is 45. If he goes out the second door, the probability he gets caught by Alissa is 14 and the probability he is not caught is 34. The probability that Alissa catches Muddy coming out of the third door is 12 and the probability she does not catch Muddy is 12. It is equally likely that Muddy will choose any of the three doors so the probability of choosing each door is 13.

Door Choice
Caught or Not Door One Door Two Door Three Total
Caught 115 112 16 ____
Not Caught 415 312 16 ____
Total ____ ____ ____ 1
  • The first entry 115=(15)(13) is P(Door One AND Caught)
  • The entry 415=(45)(13) is P(Door One AND Not Caught)

Verify the remaining entries.

  1. Complete the probability contingency table. Calculate the entries for the totals. Verify that the lower-right corner entry is 1.
  2. What is the probability that Alissa does not catch Muddy?
  3. What is the probability that Muddy chooses Door One OR Door Two given that Muddy is caught by Alissa?

Solution

Door Choice
Caught or Not Door One Door Two Door Three Total
Caught 115 112 16 1960
Not Caught 415 312 16 4160
Total 515 412 26 1

b. 4160

c. 919

Example 3.5.4

Table contains the number of crimes per 100,000 inhabitants from 2008 to 2011 in the U.S.

United States Crime Index Rates Per 100,000 Inhabitants 2008–2011
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          

TOTAL each column and each row. Total data = 4,520.7

  1. Find P(2009 AND Robbery).
  2. Find P(2010 AND Burglary).
  3. Find P(2010 OR Burglary).
  4. Find P(2011|Rape).
  5. Find P(Vehicle|2008).

Answer

a. 0.0294, b. 0.1551, c. 0.7165, d. 0.2365, e. 0.2575

Exercise 3.5.3

Table 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 Obese and Tall.
  4. Find the probability that a randomly chosen individual from this group is Tall given that the idividual is Obese.
  5. Find the probability that a randomly chosen individual from this group is Obese given that the individual is Tall.
  6. Find the probability a randomly chosen individual from this group is Tall and Underweight.
  7. Are the events Obese and Tall independent?

Answer

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
  1. Row Totals: 60, 99, 46. Column totals: 50, 104, 51.
  2. P(Tall)=50205=0.244
  3. P(Obese AND Tall)=18205=0.088
  4. P(Tall|Obese)=1860=0.3
  5. P(Obese|Tall)=1850=0.36
  6. P(Tall AND Underweight)=12205=0.0585
  7. No. P(Tall) does not equal P(Tall|Obese).

References

  1. “Blood Types.” American Red Cross, 2013. Available online at www.redcrossblood.org/learn-a...od/blood-types (accessed May 3, 2013).
  2. Data from the National Center for Health Statistics, part of the United States Department of Health and Human Services.
  3. Data from United States Senate. Available online at www.senate.gov (accessed May 2, 2013).
  4. Haiman, Christopher A., Daniel O. Stram, Lynn R. Wilkens, Malcom C. Pike, Laurence N. Kolonel, Brien E. Henderson, and Loīc Le Marchand. “Ethnic and Racial Differences in the Smoking-Related Risk of Lung Cancer.” The New England Journal of Medicine, 2013. Available online at http://www.nejm.org/doi/full/10.1056/NEJMoa033250 (accessed May 2, 2013).
  5. “Human Blood Types.” Unite Blood Services, 2011. Available online at www.unitedbloodservices.org/learnMore.aspx (accessed May 2, 2013).
  6. Samuel, T. M. “Strange Facts about RH Negative Blood.” eHow Health, 2013. Available online at www.ehow.com/facts_5552003_st...ive-blood.html (accessed May 2, 2013).
  7. “United States: Uniform Crime Report – State Statistics from 1960–2011.” The Disaster Center. Available online at http://www.disastercenter.com/crime/ (accessed May 2, 2013).

Review

There are several tools you 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 multiple dependent variables.

Use the following information to answer the next four exercises. Table shows a random sample of musicians and how they learned to play their instruments.

Gender Self-taught Studied in School Private Instruction Total
Female 12 38 22 72
Male 19 24 15 58
Total 31 62 37 130
Exercise 3.5.4

Find P(musician is a female).

Exercise 3.5.5

Find P(musician is a male AND had private instruction).

Answer

P(musician is a male AND had private instruction)=15130=326=0.12

Exercise 3.5.6

Find P(musician is a female OR is self taught).

Exercise 3.5.7

Are the events “being a female musician” and “learning music in school” mutually exclusive events?

Answer

The events are not mutually exclusive. It is possible to be a female musician who learned music in school.

Bringing it Together

Use the following information to answer the next seven exercises. An article in the New England Journal of Medicine, reported about a study of smokers in California and Hawaii. In one part of the report, the self-reported ethnicity and smoking levels per day were given. Of the people smoking at most ten cigarettes per day, there were 9,886 African Americans, 2,745 Native Hawaiians, 12,831 Latinos, 8,378 Japanese Americans, and 7,650 Whites. Of the people smoking 11 to 20 cigarettes per day, there were 6,514 African Americans, 3,062 Native Hawaiians, 4,932 Latinos, 10,680 Japanese Americans, and 9,877 Whites. Of the people smoking 21 to 30 cigarettes per day, there were 1,671 African Americans, 1,419 Native Hawaiians, 1,406 Latinos, 4,715 Japanese Americans, and 6,062 Whites. Of the people smoking at least 31 cigarettes per day, there were 759 African Americans, 788 Native Hawaiians, 800 Latinos, 2,305 Japanese Americans, and 3,970 Whites.

Exercise 3.5.8

Complete the table using the data provided. Suppose that one person from the study is randomly selected. Find the probability that person smoked 11 to 20 cigarettes per day.

Smoking Levels by Ethnicity
Smoking Level African American Native Hawaiian Latino Japanese Americans White TOTALS
1–10            
11–20            
21–30            
31+            
TOTALS            
Exercise 3.5.9

Suppose that one person from the study is randomly selected. Find the probability that person smoked 11 to 20 cigarettes per day.

Answer

35,065100,450

Exercise 3.5.10

Find the probability that the person was Latino.

Exercise 3.5.11

In words, explain what it means to pick one person from the study who is “Japanese American AND smokes 21 to 30 cigarettes per day.” Also, find the probability.

Answer

To pick one person from the study who is Japanese American AND smokes 21 to 30 cigarettes per day means that the person has to meet both criteria: both Japanese American and smokes 21 to 30 cigarettes. The sample space should include everyone in the study. The probability is 4,715100,450.

Exercise 3.5.12

In words, explain what it means to pick one person from the study who is “Japanese American OR smokes 21 to 30 cigarettes per day.” Also, find the probability.

Exercise 3.5.13

In words, explain what it means to pick one person from the study who is “Japanese American GIVEN that person smokes 21 to 30 cigarettes per day.” Also, find the probability.

Answer

To pick one person from the study who is Japanese American given that person smokes 21-30 cigarettes per day, means that the person must fulfill both criteria and the sample space is reduced to those who smoke 21-30 cigarettes per day. The probability is 4,71515,273.

Exercise 3.5.14

Prove that smoking level/day and ethnicity are dependent events.

Glossary

contingency table
the method of displaying a frequency distribution as a table with rows and columns to show how two variables may be dependent (contingent) upon each other; the table provides an easy way to calculate conditional probabilities.

This page titled 3.5: Contingency Tables is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by OpenStax via source content that was edited to the style and standards of the LibreTexts platform.

  • Was this article helpful?

Support Center

How can we help?