Learning

open
close

Contingency Tables and Probability Trees

September 9, 2024 | by Bloom Code Studio

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.

Example 3.20

Suppose a study of speeding violations and drivers who use cell phones produced the following fictional data:

Speeding violation in the last yearNo speeding violation in the last yearTotal
Uses cell phone while driving25280305
Does not use cell phone while driving45405450
Total70685755
Table 3.3

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.

Problem

  1. Find P(Driver is a cell phone user).
  2. Find P(Driver had no violation in the last year).
  3. Find P(Driver had no violation in the last year ∩∩ was a cell phone user).
  4. Find P(Driver is a cell phone user ∪∪ driver had no violation in the last year).
  5. Find P(Driver is a cell phone user || driver had a violation in the last year).
  6. Find P(Driver had no violation last year || driver was not a cell phone user)

Solution

  1. number of cell phone userstotal number in study = 305755number of cell phone userstotal number in study = 305755
  2. number that had no violationtotal number in study = 685755number that had no violationtotal number in study = 685755
  3. 280755280755
  4. (305755 + 685755) − 280755 = 710755(305755 + 685755) − 280755 = 710755
  5. 25702570 (The sample space is reduced to the number of drivers who had a violation.)
  6. 405450405450 (The sample space is reduced to the number of drivers who were not cell phone users.)

Try It 3.20

Table 3.4 shows the number of athletes who stretch before exercising and how many had injuries within the past year.

Injury in last yearNo injury in last yearTotal
Stretches55295350
Does not stretch231219450
Total286514800
Table 3.4
  1. What is P(athlete stretches before exercising)?
  2. What is P(athlete stretches before exercising||no injury in the last year)?

Example 3.21

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

SexThe coastlineNear lakes and streamsOn mountain peaksTotal
Women1816___45
Men______1455
Total___41______
Table 3.5 Hiking Area Preference

Problem

a. Complete the table.

Solution

a.

SexThe coastlineNear lakes and streamsOn mountain peaksTotal
Women18161145
Men16251455
Total344125100
Table 3.6 Hiking Area Preference

Problem

b. Are the events “being a woman” and “preferring the coastline” independent events?

Let F = being a woman and let C = preferring the coastline.

  1. Find P(F∩C)P(F∩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.

Solution

b.

  1. P(F∩C)=18100P(F∩C)=18100 = 0.18
  2. P(F)P(C) = (45100)(34100)(45100)(34100) = (0.45)(0.34) = 0.153

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

Problem

c. Find the probability that a person is a man given that the person prefers hiking near lakes and streams. Let M = being a man, 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?

Solution

c.

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

Problem

d. Find the probability that a person is a woman or prefers hiking on mountain peaks. Let F = being a woman, and let P = prefers mountain peaks.

  1. Find P(F).
  2. Find P(P).
  3. Find P(F∩P)P(F∩P).
  4. Find P(F∪P)P(F∪P).

Solution

d.

  1. P(F) = 4510045100
  2. P(P) = 2510025100
  3. P(F∩P)P(F∩P) = 1110011100
  4. P(F∪P)P(F∪P) = 4510045100 + 2510025100 – 1110011100 = 5910059100

Try It 3.21

Table 3.7 shows a random sample of 200 cyclists and the routes they prefer. Let O = older and H = hilly path.

Age GroupLake PathHilly PathWooded PathTotal
Younger453827110
Older26521290
Total719039200
Table 3.7
  1. Out of the older group, what is the probability that the cyclist prefers a hilly path?
  2. Are the events “being older” and “preferring the hilly path” independent events?

Example 3.22

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 1515 and the probability he is not caught is 4545. If he goes out the second door, the probability he gets caught by Alissa is 1414 and the probability he is not caught is 3434. The probability that Alissa catches Muddy coming out of the third door is 1212 and the probability she does not catch Muddy is 1212. It is equally likely that Muddy will choose any of the three doors so the probability of choosing each door is 1313.

Caught or notDoor oneDoor twoDoor threeTotal
Caught1151151121121616____
Not caught4154153123121616____
Total____________1
Table 3.8 Door Choice
  • The first entry 115=(15)(13)115=(15)(13) is P(Door One∩Caught)P(Door One∩Caught)
  • The entry 415=(45)(13)415=(45)(13) is P(Door One∩Not Caught)P(Door One∩Not Caught)

Verify the remaining entries.

Problem

a. Complete the probability contingency table. Calculate the entries for the totals. Verify that the lower-right corner entry is 1.

Solution

a.

Caught or notDoor oneDoor twoDoor threeTotal
Caught115115112112161619601960
Not caught415415312312161641604160
Total51551541241226261
Table 3.9 Door Choice

Problem

b. What is the probability that Alissa does not catch Muddy?

Solution

b. 41604160

Problem

c. What is the probability that Muddy chooses Door One ∪∪ Door Two given that Muddy is caught by Alissa?

Solution

c. 919919

Try It 3.22

Fred’s preference to drink coffee or iced tea depends on the season. When it is summer, Fred’s preference to drink coffee is 14,14, and his preference to drink iced tea is 34. 34. When it is rainy season, Fred’s preference to drink coffee is 12, 12, and his preference to drink iced tea is 12.12. When it is winter, Fred’s preference to drink coffee is 15,15, and his preference to drink iced tea is 15.15. A day randomly selected in a year has a probability of 1313 for each season. The event here is selection of a day randomly in a year.

SeasonSummerRainyWinterTotal
Coffee1121121616415415__
Iced tea14141616115115__
Total______1
Table 3.10
  • The first entry is (14)(13)=112.1413=112.
  • The second entry is (34)(13)=14.3413=14.

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 Fred will drink iced tea?
  3. What is the probability that the day is in summer or rainy season given that Fred drinks iced tea?

Example 3.23

Table 3.11 contains the number of crimes per 100,000 inhabitants in the United States over the span of several years.

YearRobberyBurglaryVandalismVehicleTotal
1145.7732.129.7314.7
2133.1717.729.1259.2
3119.370127.7239.1
4113.7702.226.8229.6
Total
Table 3.11 United States Crime Index Rates Per 100,000 Inhabitants

Problem

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

  1. Find P(Year 2 AND Robbery).
  2. Find P(Year 3 AND Burglary).
  3. Find P(Year 3 OR Burglary).
  4. Find P(Year 4 | Vandalism).
  5. Find P(Vehicle | Year 1).

Solution

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

Try It 3.23

Table 3.12 relates the weights and heights of a group of individuals participating in an observational study.

Weight/heightTallMediumShortTotals
Overweight182814
Typical Weight Range205128
Underweight12259
Totals
Table 3.12
  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 Overweight and Tall.
  4. Find the probability that a randomly chosen individual from this group is Tall given that the individual is Overweight.
  5. Find the probability that a randomly chosen individual from this group is Overweight 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 Overweight and Tall independent?

Tree Diagrams

Sometimes, when the probability problems are complex, it can be helpful to graph the situation. Tree diagrams can be used to visualize and solve conditional probabilities.

Tree Diagrams

tree diagram is a special type of graph used to determine the outcomes of an experiment. It consists of “branches” that are labeled with either frequencies or probabilities. Tree diagrams can make some probability problems easier to visualize and solve. The following example illustrates how to use a tree diagram.

Example 3.24

In an urn, there are 11 balls. Three balls are red (R) and eight balls are blue (B). Draw two balls, one at a time, with replacement. “With replacement” means that you put the first ball back in the urn before you select the second ball. The tree diagram using frequencies that show all the possible outcomes follows.

This is a tree diagram with branches showing frequencies of each draw. The first branch shows two lines: 8B and 3R. The second branch has a set of two lines (8B and 3R) for each line of the first branch. Multiply along each line to find 64BB, 24BR, 24RB, and 9RR.

Figure 3.2 Total = 64 + 24 + 24 + 9 = 121

The first set of branches represents the first draw. The second set of branches represents the second draw. Each of the outcomes is distinct. In fact, we can list each red ball as R1, R2, and R3 and each blue ball as B1, B2, B3, B4, B5, B6, B7, and B8. Then the nine RR outcomes can be written as:

R1R1; R1R2; R1R3; R2R1; R2R2; R2R3; R3R1; R3R2; R3R3

The other outcomes are similar.

There are a total of 11 balls in the urn. Draw two balls, one at a time, with replacement. There are 11(11) = 121 outcomes, the size of the sample space.

Problem

a. List the 24 BR outcomes: B1R1, B1R2, B1R3, …

Solution

a. B1R1; B1R2; B1R3; B2R1; B2R2; B2R3; B3R1; B3R2; B3R3; B4R1; B4R2; B4R3; B5R1; B5R2; B5R3; B6R1; B6R2; B6R3; B7R1; B7R2; B7R3; B8R1; B8R2; B8R3

Problem

b. Using the tree diagram, calculate P(RR).

Solution

b. P(RR) = (311)(311)(311)(311) = 91219121

Problem

c. Using the tree diagram, calculate P(RB∪BR)P(RB∪BR).

Solution

c. P(RB∪BR)P(RB∪BR) = (311)(811)(311)(811) + (811)(311)(811)(311) = 4812148121

Problem

d. Using the tree diagram, calculate P(Ron 1st draw∩Bon 2nd draw)P(Ron 1st draw∩Bon 2nd draw).

Solution

d. P(Ron 1st draw∩Bon 2nd draw)P(Ron 1st draw∩Bon 2nd draw) = (311)(811)(311)(811) = 2412124121

Problem

e. Using the tree diagram, calculate P(R on 2nd draw||B on 1st draw).

Solution

e. P(R on 2nd draw||B on 1st draw) = P(R on 2nd||B on 1st) = 24882488 = 311311

This problem is a conditional one. The sample space has been reduced to those outcomes that already have a blue on the first draw. There are 24 + 64 = 88 possible outcomes (24 BR and 64 BB). Twenty-four of the 88 possible outcomes are BR. 24882488 = 311311.

Problem

f. Using the tree diagram, calculate P(BB).

Solution

f. P(BB) = 6412164121

Problem

g. Using the tree diagram, calculate P(B on the 2nd draw||R on the first draw).

Solution

g. P(B on 2nd draw||R on 1st draw) = 811811

There are 9 + 24 outcomes that have R on the first draw (9 RR and 24 RB). The sample space is then 9 + 24 = 33. 24 of the 33 outcomes have B on the second draw. The probability is then 24332433.

Try It 3.24

In a standard deck, there are 52 cards. 12 cards are face cards (event F) and 40 cards are not face cards (event N). Draw two cards, one at a time, with replacement. All possible outcomes are shown in the tree diagram as frequencies. Using the tree diagram, calculate P(FF).

This is a tree diagram with branches showing frequencies of each draw. The first branch shows two lines: 12F and 40N. The second branch has a set of two lines (12F and 40N) for each line of the first branch. Multiply along each line to find 144FF, 480FN, 480NF, and 1,600NN.

Figure 3.3

Example 3.25

An urn has three red marbles and eight blue marbles in it. Draw two marbles, one at a time, this time without replacement, from the urn. “Without replacement” means that you do not put the first ball back before you select the second marble. Following is a tree diagram for this situation. The branches are labeled with probabilities instead of frequencies. The numbers at the ends of the branches are calculated by multiplying the numbers on the two corresponding branches, for example, (311)(210)=6110(311)(210)=6110.

This is a tree diagram with branches showing probabilities of each draw. The first branch shows 2 lines: B 8/11 and R 3/11. The second branch has a set of 2 lines for each first branch line. Below B 8/11 are B 7/10 and R 3/10. Below R 3/11 are B 8/10 and R 2/10. Multiply along each line to find BB 56/110, BR 24/110, RB 24/110, and RR 6/110.

Figure 3.4 Total = 56+24+24+6110=110110=156+24+24+6110=110110=1

NOTE

If you draw a red on the first draw from the three red possibilities, there are two red marbles left to draw on the second draw. You do not put back or replace the first marble after you have drawn it. You draw without replacement, so that on the second draw there are ten marbles left in the urn.


Calculate the following probabilities using the tree diagram.

Problem

a. P(RR) = ________

Solution

a. P(RR) = (311)(210)=6110(311)(210)=6110

Problem

b. Fill in the blanks:

P(RB∪BR)P(RB∪BR) = (311)(810) + (___)(___) = 48110(311)(810) + (___)(___) = 48110

Solution

b. P(RB∪BR)P(RB∪BR) = (311)(810)(311)(810) + (811)(310)(811)(310) = 4811048110

Problem

c. P(R on 2nd||B on 1st) =

Solution

c. P(R on 2nd||B on 1st) = 310310

Problem

d. Fill in the blanks.

P(Ron 1st∩Bon 2nd)P(Ron 1st∩Bon 2nd) = (___)(___) = 2411024110

Solution

d. P(Ron 1st∩Bon 2nd)P(Ron 1st∩Bon 2nd) = (311)(810)(311)(810) = 2411024110

Problem

e. Find P(BB).

Solution

e. P(BB) = (811)(710)(811)(710)

Problem

f. Find P(B on 2nd||R on 1st).

Solution

f. Using the tree diagram, P(B on 2nd||R on 1st) = P(R||B) = 810810.

If we are using probabilities, we can label the tree in the following general way.This is a tree diagram for a two-step experiment. The first branch shows first outcome: P(B) and P(R). The second branch has a set of 2 lines for each line of the first branch: the probability of B given B = P(BB), the probability of R given B = P(RB), the probability of B given R = P(BR), and the probability of R given R = P(RR).

  • P(R||R) here means P(R on 2nd||R on 1st)
  • P(B||R) here means P(B on 2nd||R on 1st)
  • P(R||B) here means P(R on 2nd||B on 1st)
  • P(B||B) here means P(B on 2nd||B on 1st)

Try It 3.25

In a standard deck, there are 52 cards. Twelve cards are face cards (F) and 40 cards are not face cards (N). Draw two cards, one at a time, without replacement. The tree diagram is labeled with all possible probabilities.

This is a tree diagram with branches showing frequencies of each draw. The first branch shows 2 lines: F 12/52 and N 40/52. The second branch has a set of 2 lines (F 11/52 and N 40/51) for each line of the first branch. Multiply along each line to find FF 121/2652, FN 480/2652, NF 480/2652, and NN 1560/2652.

Figure 3.5

  1. Find P(FN∪NF)P(FN∪NF).
  2. Find P(N||F).
  3. Find P(at most one face card).
    Hint: “At most one face card” means zero or one face card.
  4. Find P(at least one face card).
    Hint: “At least one face card” means one or two face cards.

Example 3.26

A litter of kittens available for adoption at the Humane Society has four tabby kittens and five black kittens. A family comes in and randomly selects two kittens (without replacement) for adoption.This is a tree diagram with branches showing probabilities of kitten choices. The first branch shows two lines: T 4/9 and B 5/9. The second branch has a set of 2 lines for each first branch line. Below T 4/9 are T 3/8 and B 5/8. Below B 5/9 are T 4/8 and B 4/8. Multiply along each line to find probabilities of possible combinations.

Problem

  1. What is the probability that both kittens are tabby?

    a.(12)(12)(12)(12) b.(49)(49)(49)(49) c.(49)(38)(49)(38) d.(49)(59)(49)(59)
  2. What is the probability that one kitten of each coloring is selected?

    a.(49)(59)(49)(59) b.(49)(58)(49)(58) c.(49)(59)+(59)(49)(49)(59)+(59)(49) d.(49)(58)+(59)(48)(49)(58)+(59)(48)
  3. What is the probability that a tabby is chosen as the second kitten when a black kitten was chosen as the first?
  4. What is the probability of choosing two kittens of the same color?

Solution

a. c, b. d, c. 4848, d. 32723272

Try It 3.26

Suppose there are four red balls and three yellow balls in a box. Two balls are drawn from the box without replacement. What is the probability that one ball of each coloring is selected?

RELATED POSTS

View all

view all