Chapter 3: Probability Topics
3.4 Contingency Tables
Learning Objectives
By the end of this section, the student should be able to:
- Use a given contingency table to compute probabilities
- Complete a contingency table given starting information about a sample
Sometimes, when the probability problems are complex, it can be helpful to visualize the situation. Contingency tables, tree diagrams and Venn diagrams are some tools that can help us visualize and solve conditional probabilities. Tree and Venn diagrams will be covered in the next section.
Contingency Tables
A contingency table provides a way of portraying data that can facilitate calculating probabilities, particularly conditional probabilities. 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
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.
a. Find P(Person is a car phone user).
Solution
[latex]\frac{\text{number of car phone users}}{\text{total number in study}}\text{ }=\text{ }\frac{305}{755}[/latex]
b. Find P(Person had no violation in the last year).
Solution
[latex]\frac{\text{number that had no violation}}{\text{total number in study}}\text{ }=\text{ }\frac{685}{755}[/latex]
c. Find P(Person had no violation in the last year AND was a car phone user).
Solution
[latex]\frac{280}{755}[/latex]
d. Find P(Person is a car phone user OR person had no violation in the last year).
Solution
[latex]\left(\frac{305}{755}\text{ }+\text{ }\frac{685}{755}\right)\text{ }-\text{ }\frac{280}{755}\text{ }=\text{ }\frac{710}{755}[/latex]
e. Find P(Person is a car phone user GIVEN person had a violation in the last year).
Solution
[latex]\frac{25}{70}[/latex] (The sample space is reduced to the number of persons who had a violation.)
f. Find P(Person had no violation last year GIVEN person was not a car phone user).
Solution
[latex]\frac{405}{450}[/latex] (The sample space is reduced to the number of persons who were not car phone users.)
Your Turn!
The following 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 |
- What is P(athlete stretches before exercising)?
- What is P(athlete stretches before exercising | no injury in the last year)?
Solution
- P(athlete stretches before exercising) = [latex]\frac{350}{800}[/latex] = 0.4375
- P(athlete stretches before exercising | no injury in the last year) = [latex]\frac{295}{514}[/latex] = 0.5739
Key Takeaways
The table below shows a random sample of 200 cyclists broken down by type of bicycle and type of route they prefer. Let M = mountain bike and H = hilly path.
Lake Path | Hilly Path | Wooded Path | Total | |
---|---|---|---|---|
Road | 45 | 38 | 27 | 110 |
Mountain | 26 | 52 | 12 | 90 |
Total | 71 | 90 | 39 | 200 |
- Out of the mountain bike cyclists, what is the probability that the cyclist prefers a hilly path?
- Are the events “prefers a mountain bike” and “preferring the hilly path” independent events?
Solution
- “Out of the mountain bike cyclists” is another way, like “given,” of asking a conditional probability. Equivalently, we’re finding the probability that a cyclist prefers a hilly path given that they prefer a mountain bike.
[latex]P(H|M)=\frac{52}{90} \approx 0.58[/latex] - If the events are independent, then [latex]P(H|M)=P(H)[/latex]. But [latex]P(H)=\frac{90}{200}=0.45 \neq 0.58[/latex], so the events are not independent.
Your Turn!
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 |
Complete the contingency table by finding the total for each row and column.
Use the table to find the probability that a randomly chosen individual from this group is:
- Tall.
- Obese and Tall.
- Tall given that the individual is Obese.
- Obese given that the individual is Tall.
- Tall and Underweight.
- Are the events Obese and Tall independent?
Solution
- [latex]P(\text{Tall})=\frac{50}{205}=\frac{10}{41} \approx 0.244[/latex]
- [latex]P(\text{Obese and Tall})=\frac{18}{205} \approx 0.088[/latex]
- [latex]P(\text{Tall | Obese})=\frac{18}{60}=\frac{3}{20}=0.3[/latex]
- [latex]P(\text{Obese | Tall})=\frac{18}{50}=0.36[/latex]
- [latex]P(\text{Tall AND Underweight})=\frac{12}{205} \approx 0.0585[/latex]
- No. We found the probability of Tall to be about 0.244, and the probability of Tall given Obese to be 0.3. Since these are not equal, the events are not independent.
Your Turn!
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}\text{}[/latex]. If he goes out the second door, the probability he gets caught by Alissa is [latex]\frac{1}{4}[/latex]. The probability that Alissa catches Muddy coming out of the third door 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] | ________ | ________ | ________ |
Not Caught | [latex]\frac{4}{15}[/latex] | ________ | ________ | ________ |
Total | ____ | ____ | ____ | 1 |
The first column of the contingency table has been filled in for you. The first entry is computed as [latex]P(\text{caught }|\text{ Door 1}) P(\text{Door 1}) = \frac{1}{5} \cdot \frac{1}{3} = \frac{1}{15}[/latex]. Similarly, the first entry in the second row is computed as [latex]P(\text{not caught }|\text{ Door 1}) P(\text{Door 1}) = (1-P(\text{caught }|\text{ Door 1})) P(\text{Door 1}) = \frac{4}{5} \cdot \frac{1}{3} = \frac{4}{15}.[/latex]
Complete the rest of the table, verifying that the totals sum to 1 as probabilities should. Then use the table to answer the following questions.
- 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?
Solution
- [latex]\frac{41}{60}[/latex]
- [latex]\frac{9}{19}[/latex]
Section 3.4 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.
Section 3.4 Practice
Use the following information to answer the next three exercises. The following table shows a random sample of musicians and how they learned to play their instruments. Find P(musician is a female).
Gender | Self-taught | Studied in School | Private Instruction | Total |
Female | 12 | 38 | 21 | 71 |
Male | 19 | 24 | 15 | 58 |
Other | 0 | 0 | 1 | 1 |
Total | 31 | 62 | 37 | 130 |
1. Find P(musician is a male AND had private instruction).
Solution
P(musician is a male AND had private instruction) = [latex]\frac{15}{130}[/latex] = [latex]\frac{3}{26}[/latex] = 0.12
2. Find P(musician is a female OR is self taught).
3. Are the events “being a female musician” and “learning music in school” independent events?
Solution
P(being a female musician AND learning music in school) = [latex]\frac{38}{130}[/latex] = [latex]\frac{19}{65}[/latex] = 0.29
P(being a female musician)P(learning music in school) = [latex]\left(\frac{71}{130}\right)\left(\frac{62}{130}\right)[/latex] = [latex]\frac{4,402}{16,900}[/latex] = [latex]\frac{2,201}{8,450} \approx[/latex] 0.26
No, they are not independent because P(being a female musician AND learning music in school) is not equal to P(being a female musician)P(learning music in school).
Use the information in the table to answer the next eight exercises. The table shows the political party affiliation of each of 67 members of the US Senate in June 2012, and when they are up for reelection.
Up for reelection: | Democratic Party | Republican Party | Other | Total |
---|---|---|---|---|
November 2014 | 20 | 13 | 0 | |
November 2016 | 10 | 24 | 0 | |
Total |
1. What is the probability that a randomly selected senator has an “Other” affiliation?
Solution
0
2. What is the probability that a randomly selected senator is up for reelection in November 2016?
3. What is the probability that a randomly selected senator is a Democrat and up for reelection in November 2016?
Solution
[latex]\frac{10}{67}[/latex]
4. What is the probability that a randomly selected senator is a Republican or is up for reelection in November 2014?
5. Suppose that a member of the US Senate is randomly selected. Given that the randomly selected senator is up for reelection in November 2016, what is the probability that this senator is a Democrat?
Solution
[latex]\frac{10}{34}[/latex]
6. Suppose that a member of the US Senate is randomly selected. What is the probability that the senator is up for reelection in November 2014, knowing that this senator is a Republican?
7. The events “Republican” and “Up for reelection in 2016” are [latex]\underline{\hspace{2cm}}[/latex]
a. mutually exclusive.
b. independent.
c. both mutually exclusive and independent.
d. neither mutually exclusive nor independent.
Solution
d
8. The events “Other” and “Up for reelection in November 2016” are [latex]\underline{\hspace{2cm}}[/latex]
- mutually exclusive.
- independent.
- both mutually exclusive and independent.
- neither mutually exclusive nor independent.
The table gives the number of suicides estimated in the U.S. for a recent year by age, race (black or white), and sex. We are interested in possible relationships between age, race, and sex. We will let suicide victims be our population.
Race and Sex | 1–14 | 15–24 | 25–64 | over 64 | TOTALS |
---|---|---|---|---|---|
white, male | 210 | 3,360 | 13,610 | 22,050 | |
white, female | 80 | 580 | 3,380 | 4,930 | |
black, male | 10 | 460 | 1,060 | 1,670 | |
black, female | 0 | 40 | 270 | 330 | |
all others | |||||
TOTALS | 310 | 4,650 | 18,780 | 29,760 |
Do not include “all others” for parts 6 and 7.
Solution
-
Race and Sex 1–14 15–24 25–64 over 64 TOTALS white, male 210 3,360 13,610 4,870 22,050 white, female 80 580 3,380 890 4,930 black, male 10 460 1,060 140 1,670 black, female 0 40 270 20 330 all others 100 TOTALS 310 4,650 18,780 6,020 29,760 -
Race and Sex 1–14 15–24 25–64 over 64 TOTALS white, male 210 3,360 13,610 4,870 22,050 white, female 80 580 3,380 890 4,930 black, male 10 460 1,060 140 1,670 black, female 0 40 270 20 330 all others 10 210 460 100 780 TOTALS 310 4,650 18,780 6,020 29,760 - [latex]\frac{\text{22,050}}{\text{29,760}}[/latex]
- [latex]\frac{\text{330}}{\text{29,760}}[/latex]
- [latex]\frac{\text{2,000}}{\text{29,760}}[/latex]
- [latex]\frac{\text{23,720}}{\text{29,760}}[/latex]
- [latex]\frac{\text{5,010}}{\text{6,020}}[/latex]
Use the following information to answer the next two exercises. The table of data obtained from www.baseball-almanac.com shows hit information for four well known baseball players. Suppose that one hit from the table is randomly selected.
NAME | Single | Double | Triple | Home Run | TOTAL HITS |
---|---|---|---|---|---|
Babe Ruth | 1,517 | 506 | 136 | 714 | 2,873 |
Jackie Robinson | 1,054 | 273 | 54 | 137 | 1,518 |
Ty Cobb | 3,603 | 174 | 295 | 114 | 4,189 |
Hank Aaron | 2,294 | 624 | 98 | 755 | 3,771 |
TOTAL | 8,471 | 1,577 | 583 | 1,720 | 12,351 |
1. Find [latex]P(\text{hit was made by Babe Ruth})[/latex]. Choose the correct letter.
a. [latex]\frac{1518}{2873}[/latex]
b. [latex]\frac{2873}{12351}[/latex]
c. [latex]\frac{583}{12351}[/latex]
d. [latex]\frac{4189}{12351}[/latex]
2. Find [latex]P(\text{hit was made by Ty Cobb|The hit was a Home Run})[/latex]. Choose the correct letter.
a. [latex]\frac{4189}{12351}[/latex]
b. [latex]\frac{114}{1720}[/latex]
c. [latex]\frac{1720}{4189}[/latex]
d. [latex]\frac{114}{12351}[/latex]
Solution
b
The table below identifies a group of children by one of four hair colors, and by type of hair.
Hair Type | Brown | Blond | Black | Red | Totals |
---|---|---|---|---|---|
Wavy | 20 | 15 | 3 | 43 | |
Straight | 80 | 15 | 12 | ||
Totals | 20 | 215 |
- Complete the table.
- What is the probability that a randomly selected child will have wavy hair?
- What is the probability that a randomly selected child will have either brown or blond hair?
- What is the probability that a randomly selected child will have wavy brown hair?
- What is the probability that a randomly selected child will have red hair, given that he or she has straight hair?
- If B is the event of a child having brown hair, find the probability of the complement of B.
- In words, what does the complement of B represent?
In a previous year, the weights of the members of the San Francisco 49ers and the Dallas Cowboys were published in the San Jose Mercury News. The factual data were compiled into the following table.
Shirt# | ≤ 210 | 211–250 | 251–290 | > 290 |
---|---|---|---|---|
1–33 | 21 | 5 | 0 | 0 |
34–66 | 6 | 18 | 7 | 4 |
66–99 | 6 | 12 | 22 | 5 |
For the following, suppose that you randomly select one player from the 49ers or Cowboys.
Solution
- [latex]\frac{26}{106}[/latex]
- [latex]\frac{33}{106}[/latex]
- [latex]\frac{21}{106}[/latex]
- [latex]\left(\frac{26}{106}\right)[/latex] + [latex]\left(\frac{33}{106}\right)[/latex] – [latex]\left(\frac{21}{106}\right)[/latex] = [latex]\left(\frac{38}{106}\right)[/latex]
- [latex]\frac{21}{33}[/latex]
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.
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 Level | African American | Native Hawaiian | Latino | Japanese Americans | White | TOTALS |
---|---|---|---|---|---|---|
1–10 | ||||||
11–20 | ||||||
21–30 | ||||||
31+ | ||||||
TOTALS |
1. Suppose that one person from the study is randomly selected. Find the probability that person smoked 11 to 20 cigarettes per day.
Solution
[latex]\frac{35,065}{100,450}[/latex]
2. Find the probability that the person was Latino.
3. 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.
Solution
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 [latex]\frac{4,715}{100,450}[/latex].
4. 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.
5. 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.
Solution
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 [latex]\frac{4715}{15,273}[/latex].
6. Prove that smoking level/day and ethnicity are dependent events.
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 the United States Senate. Available online at www.senate.gov (accessed May 2, 2013).
Haiman, Christopher A., Daniel O. Stram, Lynn R. Wilkens, Malcolm 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.” 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.” United 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).
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.