Contingency Tables

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.

The following video shows and example of finding the probability of an event from a table.

Example

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 car 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 car phone user).
  4. Find P(Person is a car phone user OR person had no violation in the last year).
  5. Find P(Person is a car 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 car phone user)

Solution:

  1. [latex]\displaystyle\frac{{\text{number of car phone users}}}{{\text{total number in study}}}=\frac{{305}}{{755}}\\[/latex]
  2. [latex]\displaystyle\frac{{\text{number that had no violation}}}{{\text{total number in study}}}=\frac{{685}}{{755}}\\[/latex]
  3. [latex]\displaystyle\frac{{280}}{{755}}\\[/latex]
  4. [latex]\displaystyle{(\frac{{305}}{{755}}+\frac{{685}}{{755}})}-\frac{{280}}{{755}}=\frac{{710}}{{755}}\\[/latex]
  5. [latex]\displaystyle\frac{{25}}{{70}}\\[/latex](The sample space is reduced to the number of persons who had a violation.)
  6. [latex]\displaystyle\frac{{405}}{{450}}\\[/latex] (The sample space is reduced to the number of persons who were not car phone users.)

 


This video shows an example of how to determine the probability of an AND event using a contingency table.

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 P(athlete stretches before exercising)?
  2. What is P(athlete stretches before exercising|no injury in the last year)?
  1. P(athlete stretches before exercising) = [latex]\displaystyle\frac{{350}}{{800}}\\[/latex] = 0.4375
  2. P(athlete stretches before exercising|no injury in the last year) = [latex]\displaystyle\frac{{295}}{{514}}\\[/latex] = 0.5739

Example

This 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)

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

Solution:

  1. 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
  2. P(F AND C) = [latex]\displaystyle\frac{{18}}{{100}}[/latex] = 0.18
    P(F)P(C) = [latex]\displaystyle(\frac{{45}}{{100}})(\frac{{34}}{{100}})[/latex] = (0.45)(0.34) = 0.153
    P(F AND C) ≠ P(F)P(C), so the events F and C are not independent.
  3. The word given tells you that this is a conditional. [latex]\displaystyle{P}{({M}|{L})}=\frac{{25}}{{41}}[/latex] No, the sample space for this problem is the 41 hikers who prefer lakes and streams.
    1. P(F) = [latex]\displaystyle\frac{{45}}{{100}}\\[/latex]
    2. P(P) = [latex]\displaystyle\frac{{25}}{{100}}\\[/latex]
    3. P(F AND P) = [latex]\displaystyle\frac{{11}}{{100}}\\[/latex]
    4. P(F OR P) = [latex]\displaystyle\frac{{45}}{{100}} + \frac{{25}}{{100}} - \frac{{11}}{{100}} = \frac{{59}}{{100}}\\[/latex]

try it

This 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?
  1. P(H|M) = [latex]\displaystyle\frac{{52}}{{90}}\\[/latex] = 0.5778
  2. For and H to be independent, show P(H|M) = P(H)
    P(H|M) = 0.5778, P(H) = [latex]\displaystyle\frac{{90}}{{200}}\\[/latex] = 0.45
    P(H|M) does not equal P(H), so M and H are not independent.

Example

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]\displaystyle\frac{{1}}{{5}}[/latex].

Door Choice

Caught or Not Door One Door Two Door Three Total
Caught [latex]\displaystyle\frac{{1}}{{15}}\\[/latex] [latex]\displaystyle\frac{{1}}{{12}}\\[/latex] [latex]\displaystyle\frac{{1}}{{6}}\\[/latex] ____
Not Caught [latex]\displaystyle\frac{{4}}{{15}}\\[/latex] [latex]\displaystyle\frac{{3}}{{12}}\\[/latex] [latex]\displaystyle\frac{{1}}{{6}}\\[/latex] ____
Total ____ ____ ____ 1
  • The first entry [latex]\displaystyle\frac{{1}}{{15}}={(\frac{{1}}{{5}})}{(\frac{{1}}{{3}})}\\[/latex] is P(Door One AND Caught)
  • The entry [latex]\displaystyle\frac{{4}}{{15}}={(\frac{{4}}{{5}})}{(\frac{{1}}{{3}})}\\[/latex] 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:

  1. Door Choice
    Caught or Not Door One Door Two Door Three Total
    Caught [latex]\displaystyle\frac{{1}}{{15}}\\[/latex] [latex]\displaystyle\frac{{1}}{{12}}\\[/latex] [latex]\displaystyle\frac{{1}}{{6}}\\[/latex] [latex]\displaystyle\frac{{19}}{{60}}[/latex]
    Not Caught [latex]\displaystyle\frac{{4}}{{15}}\\[/latex] [latex]\displaystyle\frac{{3}}{{12}}\\[/latex] [latex]\displaystyle\frac{{1}}{{6}}\\[/latex] [latex]\displaystyle\frac{{41}}{{60}}[/latex]
    Total [latex]\displaystyle\frac{{5}}{{15}}\\[/latex] [latex]\displaystyle\frac{{4}}{{12}}\\[/latex] [latex]\displaystyle\frac{{2}}{{16}}\\[/latex] 1
  2. [latex]\displaystyle\frac{{41}}{{60}}\\[/latex]
  3. [latex]\displaystyle\frac{{9}}{{19}}\\[/latex]

 

example

This 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).

Solution:

  1. 0.0294
  2. 0.1551
  3. 0.7165
  4. 0.2365
  5. 0.2575

 


This video gives and example of determining an “OR” probability given a table.

try it

This 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?
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) = [latex]\displaystyle\frac{{50}}{{205}}\\[/latex] = 0.244
  3. P(Obese AND Tall) = [latex]\displaystyle\frac{{18}}{{205}}\\[/latex] = 0.088
  4. P(Tall|Obese) = [latex]\displaystyle\frac{{18}}{{60}}\\[/latex] = 0.3
  5. P(Obese|Tall) = [latex]\displaystyle\frac{{18}}{{50}}\\[/latex] = 0.36
  6. P(Tall AND Underweight = [latex]\displaystyle\frac{{12}}{{205}}\\[/latex] = 0.0585
  7. No. P(Tall) does not equal P(Tall|Obese).

 

References

“Blood Types.” American Red Cross, 2013. Available online at http://www.redcrossblood.org/learn-about-blood/blood-types (accessed May 3, 2013).

Data from the National Center for Health Statistics, part of the United States Department of Health and Human Services.

Data from United States Senate. Available online at www.senate.gov (accessed May 2, 2013).

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

“Human Blood Types.” Unite Blood Services, 2011. Available online at http://www.unitedbloodservices.org/learnMore.aspx (accessed May 2, 2013).

Samuel, T. M. “Strange Facts about RH Negative Blood.” eHow Health, 2013. Available online at http://www.ehow.com/facts_5552003_strange-rh-negative-blood.html (accessed May 2, 2013).

“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).

Concept 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 probabilites that have multiple dependent variables.