A two-way table provides a way of portraying data that can facilitate calculating probabilities. When used to calculate probabilities, a two-way table is often called a contingency table . 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. We used two-way tables in Chapters 1 and 2 to calculate marginal and conditional distributions. These tables organize data in a way that supports the calculation of relative frequency and, therefore, experimental (empirical) probability. Later on, we will use contingency tables again, but in another manner.
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 a cell phone while driving | 25 | 280 | 305 |
Does not use a 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.
Using the table, calculate the following probabilities:
a. This is the same as the marginal distribution (Section 1.2).
P ( Person uses a cell phone while driving ) = number who use cell phones while driving number in study = 305 755 ≈ .4040 P ( Person uses a cell phone while driving ) = number who use cell phones while driving number in study = 305 755 ≈ .4040
b. The marginal distribution is
P ( Person had no violation in the last year ) = number who had no violation number in study = 685 755 ≈ .9073 . P ( Person had no violation in the last year ) = number who had no violation number in study = 685 755 ≈ .9073 .
c. Find the number of participants who satisfy both conditions.
P ( P e r s o n h a d n o v i o l a t i o n i n t h e l a s t y e a r A N D u s e s a c e l l p h o n e w h i l e d r i v i n g ) = n u m b e r w h o h a d n o v i o l a t i o n A N D u s e s c e l l p h o n e w h i l e d r i v i n g n u m b e r i n s t u d y = 280 755 ≈ .3709 P ( P e r s o n h a d n o v i o l a t i o n i n t h e l a s t y e a r A N D u s e s a c e l l p h o n e w h i l e d r i v i n g ) = n u m b e r w h o h a d n o v i o l a t i o n A N D u s e s c e l l p h o n e w h i l e d r i v i n g n u m b e r i n s t u d y = 280 755 ≈ .3709
d. To find this probability, you need to identify how many participants use a cell phone while driving OR have no violation in the past year OR both.
P ( Person uses a cell phone while driving OR had no violation in the last year ) = 25 + 405 + 280 755 P ( Person uses a cell phone while driving OR had no violation in the last year ) = 25 + 405 + 280 755
= 710 755 ≈ .9404 = 710 755 ≈ .9404e. This is a conditional probability. You are given that the person had no violation in the last year, so you need only consider the values in that column of data.
( P e r s o n u s e s a c e l l p h o n e w h i l e d r i v i n g G I V E N t h e p e r s o n h a d a v i o l a t i o n i n t h e l a s t y e a r ) = n u m b e r w h o u s e d c e l l p h o n e A N D h a d a v i o l a t i o n n u m b e r i n s t u d y w h o h a d a v i o l a t i o n i n t h e l a s t y e a r = 25 70 ≈ .3571 ( P e r s o n u s e s a c e l l p h o n e w h i l e d r i v i n g G I V E N t h e p e r s o n h a d a v i o l a t i o n i n t h e l a s t y e a r ) = n u m b e r w h o u s e d c e l l p h o n e A N D h a d a v i o l a t i o n n u m b e r i n s t u d y w h o h a d a v i o l a t i o n i n t h e l a s t y e a r = 25 70 ≈ .3571
f. For this conditional probability, consider only values in the row labeled “Does not use a cell phone while driving.”
P ( Person had no violation last year GIVEN person does not use cell phone while driving ) = 405 450 = .9 P ( Person had no violation last year GIVEN person does not use cell phone while driving ) = 405 450 = .9
Table 3.4 shows the number of athletes who stretch before exercising and how many had injuries within the past year.
Injury in Past Year | No Injury in Past Year | Total | |
---|---|---|---|
Stretches | 55 | 295 | 350 |
Does not stretch | 231 | 219 | 450 |
Total | 286 | 514 | 800 |
Table 3.5 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 | ___ | ___ |
a. Complete the table.
a. There are 45 females in the sample; 18 prefer the coastline and 16 prefer hiking near lakes and streams. So, we know there are 45 − 18 − 16 = 11 female students who prefer hiking on mountain peaks.
Continue reasoning in this way to complete the table.
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. Are the events being female and preferring the coastline independent events?
Let F = being female and let C = preferring the coastline.
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.
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.
Table 3.7 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 |
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 1 5 1 5 and the probability he is not caught is 4 5 4 5 . If he goes out the second door, the probability he gets caught by Alissa is 1 4 1 4 and the probability he is not caught is 3 4 3 4 . The probability that Alissa catches Muddy coming out of the third door is 1 2 1 2 and the probability she does not catch Muddy is 1 2 1 2 . It is equally likely that Muddy will choose any of the three doors, so the probability of choosing each door is 1 3 1 3 .
Caught or Not | Door One | Door Two | Door Three | Total |
---|---|---|---|---|
Caught | 1 15 1 15 | 1 12 1 12 | 1 6 1 6 | ____ |
Not Caught | 4 15 4 15 | 3 12 3 12 | 1 6 1 6 | ____ |
Total | ____ | ____ | ____ | 1 |
Verify the remaining entries.
a. Complete the probability contingency table. Calculate the entries for the totals. Verify that the lower-right corner entry is 1.
Caught or Not | Door One | Door Two | Door Three | Total |
---|---|---|---|---|
Caught | 1 15 1 15 | 1 12 1 12 | 1 6 1 6 | 19 60 19 60 |
Not Caught | 4 15 4 15 | 3 12 3 12 | 1 6 1 6 | 41 60 41 60 |
Total | 5 15 5 15 | 4 12 4 12 | 2 6 2 6 | 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?
c. This is a conditional probability, so consider only probabilities in the row labeled "Caught." Choosing Door One and choosing Door Two are mutually exclusive, so
P ( Choosing Door One OR Choosing Door Two AND Caught ) = 1 15 + 1 12 = 9 60 . P ( Choosing Door One OR Choosing Door Two AND Caught ) = 1 15 + 1 12 = 9 60 .
Use the formula for conditional probability P ( A | B ) = P ( A AND B ) P ( B ) . P ( A | B ) = P ( A AND B ) P ( B ) .
P ( Door One OR Door Two|Caught ) = P ( Door One OR Door Two AND Caught ) P ( Caught ) = 9 60 19 60 = 9 19. . P ( Door One OR Door Two|Caught ) = P ( Door One OR Door Two AND Caught ) P ( Caught ) = 9 60 19 60 = 9 19. .
Table 3.10 contains the number of crimes per 100,000 inhabitants from 2008 to 2011 in the United States.
Year | Crime A | Crime B | Crime C | Crime D | 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.
a. 133 .1 4,520 .7 133 .1 4,520 .7 = .0294, b. 701 4,520 .7 701 4,520 .7 = .1551, c. P(2010 OR Crime B) = P(2010) + P(Crime B) – P(2010 AND Crime B) = 1,087 .1 4,520 .7 1,087 .1 4,520 .7 + 2,852 .9 4,520 .7 2,852 .9 4,520 .7 − 701 4,520 .7 701 4,520 .7 = .7165, d. 113 .7 511 .8 113 .7 511 .8 = .2222, e. 314 .7 1,222 .2 314 .7 1,222 .2 = .2575
Table 3.11 relates the weights and heights of a group of individuals participating in an observational study.
Ages | Tall | Medium | Short | Totals |
---|---|---|---|---|
Under 18 | 18 | 28 | 14 | |
18–50 | 20 | 51 | 28 | |
51+ | 12 | 25 | 9 | |
Totals |
This book may not be used in the training of large language models or otherwise be ingested into large language models or generative AI offerings without OpenStax's permission.
Want to cite, share, or modify this book? This book uses the Creative Commons Attribution License and you must attribute Texas Education Agency (TEA). The original material is available at: https://www.texasgateway.org/book/tea-statistics . Changes were made to the original material, including updates to art, structure, and other content updates.
Access for free at https://openstax.org/books/statistics/pages/1-introduction
Access for free at https://openstax.org/books/statistics/pages/1-introduction
© Apr 16, 2024 Texas Education Agency (TEA). 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.
OpenStax is part of Rice University, which is a 501(c)(3) nonprofit. Give today and help us reach more students.