Contingency Tables
Learning Outcomes
- Construct and interpret 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.
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 | [latex]25[/latex] | [latex]280[/latex] | [latex]305[/latex] |
| Not a cell phone user | [latex]45[/latex] | [latex]405[/latex] | [latex]450[/latex] |
| Total | [latex]70[/latex] | [latex]685[/latex] | [latex]755[/latex] |
The total number of people in the sample is [latex]755[/latex]. The row totals are [latex]305[/latex] and [latex]450[/latex]. The column totals are [latex]70[/latex] and [latex]685[/latex]. Notice that [latex]305 + 450 = 755 \text{ and } 70 + 685 = 755[/latex].
Calculate the following probabilities using the table.
- Find [latex]P[/latex](Person is a car phone user).
- Find [latex]P[/latex](person had no violation in the last year).
- Find [latex]P[/latex](Person had no violation in the last year AND was a car phone user).
- Find [latex]P[/latex](Person is a car phone user OR person had no violation in the last year).
- Find [latex]P[/latex](Person is a car phone user GIVEN person had a violation in the last year).
- Find [latex]P[/latex](Person had no violation last year GIVEN person was not a car phone user)
[reveal-answer q=”124075″]Show Solution[/reveal-answer]
[hidden-answer a=”124075″]
Solution:
- [latex]\displaystyle\frac{{\text{number of car phone users}}}{{\text{total number in study}}}=\frac{{305}}{{755}}[/latex]
- [latex]\displaystyle\frac{{\text{number that had no violation}}}{{\text{total number in study}}}=\frac{{685}}{{755}}[/latex]
- [latex]\displaystyle\frac{{280}}{{755}}[/latex]
- [latex]\displaystyle{(\frac{{305}}{{755}}+\frac{{685}}{{755}})}-\frac{{280}}{{755}}=\frac{{710}}{{755}}[/latex]
- [latex]\displaystyle\frac{{25}}{{70}}[/latex](The sample space is reduced to the number of persons who had a violation.)
- [latex]\displaystyle\frac{{405}}{{450}}[/latex] (The sample space is reduced to the number of persons who were not car phone users.)
[/hidden-answer]
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 | [latex]55[/latex] | [latex]295[/latex] | [latex]350[/latex] |
| Does not stretch | [latex]231[/latex] | [latex]219[/latex] | [latex]450[/latex] |
| Total | [latex]286[/latex] | [latex]514[/latex] | [latex]800[/latex] |
- What is [latex]P[/latex](athlete stretches before exercising)?
- What is [latex]P[/latex](athlete stretches before exercising|no injury in the last year)?
[reveal-answer q=”124076″]Show Solution[/reveal-answer]
[hidden-answer a=”124076″]
- [latex]P[/latex](athlete stretches before exercising) = [latex]\displaystyle\frac{{350}}{{800}} = 0.4375[/latex]
- [latex]P[/latex](athlete stretches before exercising|no injury in the last year) = [latex]\displaystyle\frac{{295}}{{514}} = 0.5739[/latex]
[/hidden-answer]
Example
This table shows a random sample of [latex]100[/latex] hikers and the areas of hiking they prefer.
Hiking Area Preference
| Sex | The Coastline | Near Lakes and Streams | On Mountain Peaks | Total |
|---|---|---|---|---|
| Female | [latex]18[/latex] | [latex]16[/latex] | ___ | [latex]45[/latex] |
| Male | ___ | ___ | [latex]14[/latex] | [latex]55[/latex] |
| Total | ___ | [latex]41[/latex] | ___ | ___ |
- Complete the table.
- Are the events “being female” and “preferring the coastline” independent events?Let [latex]F[/latex] = being female and let [latex]C[/latex] = preferring the coastline.
- Find [latex]P(F \text{ AND } C)[/latex].
- Find [latex]P(F)P(C)[/latex]
Are these two numbers the same? If they are, then [latex]F[/latex] and [latex]C[/latex] are independent. If they are not, then [latex]F[/latex] and [latex]C[/latex] are not independent.
- Find the probability that a person is male given that the person prefers hiking near lakes and streams. Let [latex]M[/latex] = being male, and let [latex]L[/latex] = prefers hiking near lakes and streams.
- What word tells you this is a conditional?
- Fill in the blanks and calculate the probability: [latex]P[/latex](___|___) = ___.
- Is the sample space for this problem all [latex]100[/latex] hikers? If not, what is it?
- 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 [latex]P(F)[/latex].
- Find [latex]P(P)[/latex].
- Find [latex]P(F \text{ AND } P)[/latex].
- Find [latex]P(F \text{ OR } P)[/latex].
[reveal-answer q=”124077″]Show Solution[/reveal-answer]
[hidden-answer a=”124077″]
Solution:
- Hiking Area Preference
Sex The Coastline Near Lakes and Streams On Mountain Peaks Total Female [latex]18[/latex] [latex]16[/latex] [latex]11[/latex] [latex]45[/latex] Male [latex]16[/latex] [latex]25[/latex] [latex]14[/latex] [latex]55[/latex] Total [latex]34[/latex] [latex]41[/latex] [latex]25[/latex] [latex]100[/latex] - [latex]P(F \text{ AND }C) = \displaystyle\frac{{18}}{{100}} = 0.18[/latex]
[latex]P(F)P(C) = \displaystyle(\frac{{45}}{{100}})(\frac{{34}}{{100}}) = (0.45)(0.34) = 0.153[/latex]
[latex]P(F \text{ AND } C) \neq P(F)P(C)[/latex], so the events [latex]F[/latex] and [latex]C[/latex] are not independent. - 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. - [latex]P(F) = \displaystyle\frac{{45}}{{100}}[/latex]
[latex]P(P) = \displaystyle\frac{{25}}{{100}}[/latex]
[latex]P(F \text{ AND } P) = \displaystyle\frac{{11}}{{100}}[/latex]
[latex]P(F \text{ OR } P) = \displaystyle\frac{{45}}{{100}} + \frac{{25}}{{100}} - \frac{{11}}{{100}} = \frac{{59}}{{100}}[/latex]
try it
This table shows a random sample of [latex]200[/latex] cyclists and the routes they prefer. Let [latex]M[/latex] = males and [latex]H[/latex] = hilly path.
| Gender | Lake Path | Hilly Path | Wooded Path | Total |
|---|---|---|---|---|
| Female | [latex]45[/latex] | [latex]38[/latex] | [latex]27[/latex] | [latex]110[/latex] |
| Male | [latex]26[/latex] | [latex]52[/latex] | [latex]12[/latex] | [latex]90[/latex] |
| Total | [latex]71[/latex] | [latex]90[/latex] | [latex]39[/latex] | [latex]200[/latex] |
- 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?
[reveal-answer q=”124078″]Show Solution[/reveal-answer]
[hidden-answer a=”124078″]
- [latex]P(H|M) = \displaystyle\frac{{52}}{{90}} = 0.5778[/latex]
- For [latex]M[/latex] and [latex]H[/latex] to be independent, show [latex]P(H|M) =P(H)[/latex]
[latex]P(H|M) = 0.5778, P(H) =\displaystyle\frac{{90}}{{200}} = 0.45[/latex]
[latex]P(H|M)[/latex] does not equal [latex]P(H)[/latex], so [latex]M[/latex] and [latex]H[/latex] are not independent.
[/hidden-answer]
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 | ____ | ____ | ____ | [latex]1[/latex] |
- The first entry [latex]\displaystyle\frac{{1}}{{15}}={(\frac{{1}}{{5}})}{(\frac{{1}}{{3}})}[/latex] is [latex]P[/latex](Door One AND Caught)
- The entry [latex]\displaystyle\frac{{4}}{{15}}={(\frac{{4}}{{5}})}{(\frac{{1}}{{3}})}[/latex] is [latex]P[/latex](Door One AND Not Caught)
Verify the remaining entries.
- Complete the probability contingency table. Calculate the entries for the totals. Verify that the lower-right corner entry is [latex]1[/latex].
- What is the probability that Alissa does not catch Muddy?
- What is the probability that Muddy chooses Door One OR Door Two given that Muddy is caught by Alissa?
[reveal-answer q=”124079″]Show Solution[/reveal-answer]
[hidden-answer a=”124079″]
Solution:
- 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] [latex]1[/latex] - [latex]\displaystyle\frac{{41}}{{60}}[/latex]
- [latex]\displaystyle\frac{{9}}{{19}}[/latex]
[/hidden-answer]
example
This table contains the number of crimes per [latex]100,000[/latex] inhabitants from 2008 to 2011 in the U.S.
United States Crime Index Rates Per [latex]100,000[/latex] Inhabitants 2008–2011
| Year | Robbery | Burglary | Rape | Vehicle | Total |
|---|---|---|---|---|---|
| 2008 | [latex]145.7[/latex] | [latex]732.1[/latex] | [latex]29.7[/latex] | [latex]314.7[/latex] | |
| 2009 | [latex]133.1[/latex] | [latex]717.7[/latex] | [latex]29.1[/latex] | [latex]259.2[/latex] | |
| 2010 | [latex]119.3[/latex] | [latex]701[/latex] | [latex]27.7[/latex] | [latex]239.1[/latex] | |
| 2011 | [latex]113.7[/latex] | [latex]702.2[/latex] | [latex]26.8[/latex] | [latex]229.6[/latex] | |
| Total |
TOTAL each column and each row. Total data = [latex]4,520.7[/latex]
- Find [latex]P[/latex](2009 AND Robbery).
- Find [latex]P[/latex](2010 AND Burglary).
- Find [latex]P[/latex](2010 OR Burglary).
- Find [latex]P[/latex](2011|Rape).
- Find [latex]P[/latex](Vehicle|2008).
[reveal-answer q=”124080″]Show Solution[/reveal-answer]
[hidden-answer a=”124080″]
Solution:
- [latex]0.0294[/latex]
- [latex]0.1551[/latex]
- [latex]0.7165[/latex]
- [latex]0.2365[/latex]
- [latex]0.2575[/latex]
[/hidden-answer]
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 | [latex]18[/latex] | [latex]28[/latex] | [latex]14[/latex] | |
| Normal | [latex]20[/latex] | [latex]51[/latex] | [latex]28[/latex] | |
| Underweight | [latex]12[/latex] | [latex]25[/latex] | [latex]9[/latex] | |
| 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?
[reveal-answer q=”124081″]Show Solution[/reveal-answer]
[hidden-answer a=”124081″]
| Weight/Height | Tall | Medium | Short | Totals |
|---|---|---|---|---|
| Obese | [latex]18[/latex] | [latex]28[/latex] | [latex]14[/latex] | [latex]60[/latex] |
| Normal | [latex]20[/latex] | [latex]51[/latex] | [latex]28[/latex] | [latex]99[/latex] |
| Underweight | [latex]12[/latex] | [latex]25[/latex] | [latex]9[/latex] | [latex]46[/latex] |
| Totals | [latex]50[/latex] | [latex]104[/latex] | [latex]51[/latex] | [latex]205[/latex] |
- Row Totals: [latex]60, 99, 46[/latex]. Column totals: [latex]50, 104, 51[/latex].
- [latex]P[/latex](Tall) = [latex]\displaystyle\frac{{50}}{{205}} = 0.244[/latex]
- [latex]P[/latex](Obese AND Tall) = [latex]\displaystyle\frac{{18}}{{205}} = 0.088[/latex]
- [latex]P[/latex](Tall|Obese) = [latex]\displaystyle\frac{{18}}{{60}} = 0.3[/latex]
- [latex]P[/latex](Obese|Tall) = [latex]\displaystyle\frac{{18}}{{50}} = 0.36[/latex]
- [latex]P[/latex](Tall AND Underweight = [latex]\displaystyle\frac{{12}}{{205}} = 0.0585[/latex]
- No. [latex]P[/latex](Tall) does not equal [latex]P[/latex](Tall|Obese).
[/hidden-answer]
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.