# Math Insight

### Conditional probability

Names:
1. Imagine that you randomly pick an object from a collection of 1 white square, 4 black squares, 4 white triangles, and 1 black triangle. We assume that each object has an equal likelihood of being selected.
1. What is the probability of selecting a white square?

What is the probability of selecting a black square?

What is the probability of selecting a white triangle?

What is the probability of selecting a black triangle?

2. What is the probability of picking a square?

What is the probability of picking a triangle?

What is the probability of picking a white object?

What is the probability of picking a black object?

What is the probability of picking white square, a black square, a white triangle, or a black triangle?

3. Organize the results in a contingency table. In each cell, enter the probability of selecting an object that matches the description of both the column and row heading. Your answers will be the same nine numbers you calculated above.
whiteblackTotal
square

triangle

Total

4. Let's express these results using probability notation. Let $S$ be the event that you selected a square, $T$ be the event that you selected a triangle, $W$ be the event that selected a white object and $B$ be the event that you selected a black object.

The four simple events, containing one outcome each, are the combinations of color and shape. We use the notation $P(B,T)$ to be the probability of the event $B$ and the event $T$, i.e., the probability of selecting a black triangle.

$P(B,T) =$

$P(B,S) =$

$P(W,T) =$

$P(W,S) =$

The simpler looking events (such as $T$, the event of selecting a triangle) are actually compound events consisting of two possible outcomes (such as a black triangle and a white triangle)..

$P(T) = P(B,T) + P(W,T) =$

$P(S) = P(B,S) + P(W,S) =$

$P(W) = P(W,T) + P(W,S) =$

$P(B) = P(B,S) + P(B,T) =$

Fill in the contingency table, this time not with numbers, but with the mathematical expressions, such as $P(B)$ or $P(W,S)$.

whiteblackTotal
square

triangle

Total

$1$

2. In the previous question, we looked at the probabilities when randomly picking an object from a collection of 1 white square, 4 black squares, 4 white triangles, and 1 black triangle. Next, we look at conditional probabilities, i.e., how we update probabilities when we know additional information.
1. Imagine that after picking on object, your friend looks at it (without you seeing the object) and tells you that the object is a square. Given this new information, you can completely ignore the fact that there were triangles. Instead, you can imagine that you were just picking from a collection of 1 white square and 4 black squares. This new information effectively lets you shrink your universe of possibilities to just those that are squares.

Given the information that you picked a square

• what is the probability that you picked a white square?
• what is the probability that you picked a black square?
• what is the probability that you picked a white triangle?
(dumb question)
• what is the probability that you picked a black triangle?
(dumb question)

Since you know that you picked a square, a white square is the only white object that you could pick. Therefore,

• the probability that you picked a white object given that you picked a square is
.
• the probability that you picked a black object given that you picked a square is
.

Here's another dumb question, but which will be relevant below: given that you know you picked a square, what is the probability you picked a square?

We write conditional probabilities using a bar $|$. We denote the probability of event $A$ conditioned on the fact that event $B$ occurred as $P(A\,|\,B)$. In this notation, the results are:
$P(B\,|\, S) =$

$P(W\,|\,S) =$
.

2. It turns out we can express a conditional probability (such as $P(B\,|\,S)$) in terms of the original probability of the combined event (in this case, $P(B,S)$) along with the probability of the additional information (in this case, $P(S)$). Let's explore the relationship between these three probabilities.

Before you knew that the object was a square, how many total objects were you picking from?
As each object was equally likely, the probability of picking any particular one of those $＿$ objects was
.

But, once you knew that you had picked a square, the universe of possible objects had shrunk to only
objects. With this new information, you could know that the probability you had actually picked any particular one of those $＿$ remaining objects had increased to
.

This increase in probability is directly related to the probability of picking a square. Before your friend gave you any information about the object, what was the probability that the object was a square? $P(S) =$
. Once your friend informed you that you had a square, the probability of a square increased to
. This increase in probability corresponds to
the probability $P(S)=＿$.

This division by $P(S)$ captures exactly how probabilities increase upon the knowledge that the object is a square, as the information decreases the universe of possible outcomes down to a set of outcomes that originally occurred with probability $P(S)$. Indeed, if you take the original probability per object of $＿$ and divide by $P(S)=＿$, you get
, which should match your previous calculation for the probability for any particular one of the $＿$ objects that were squares.

Verify that the probabilities of getting a black or white object conditioned on obtaining a square follow this pattern.
$P(B\,|\,S) = P(B, S)/P(S) =$
$/$
$=$

$P(W\,|\,S) = P(W, S)/P(S) =$
$/$
$=$

One more way to see the effect of conditioning on probabilities is through the contingency table. One you receive the information that the object was a square, the universe of possible outcomes shrinks to the row corresponding to the square. Since we know the row had to occur, its total probability must increase to
. Dividing by the original total probability for that row, $P(S)=$
, the contingency table, conditioned on the fact that the object was a square, becomes the following table. (Fill in this table with numbers for the conditional probabilities.)

whiteblackTotal
Given that object is a square

3. Imagine, instead, that your friend told you that the object was white. What are the probabilities of the object being a square or a triangle conditioned on that information? You can take the column of the contingency table corresponding to white objects and rescale it so that the total is $1$ (given that the allowable universe of outcomes are just those in that column).

Fill in the numbers for this rescaled contingency table.

Given that the object was white
square
triangle
Total

What quantity did you divide the column by to rescale it? (Enter the mathematical expression for the probability, not the actual number itself.)

The first two numbers of the contingency table were $P(S\,|\,W)$ and $P(T\,|\,W)$. Write the formula for these conditional probabilities in terms of the expressions for the original probabilities for the events (such as $P(B,S)$ or $P(W,T)$) along with the expression $＿$ you used to rescale these quantities.
$P(S\,|\,W) =$
$= ＿$
$P(T\,|\,W) =$
$= ＿$

4. Calculate the probability of the object being black or white conditioned on the information that the object was a triangle. For each conditional probability, enter a mathematical expression (in terms of quantities like $P(W,T)$, etc.) in the first blank and enter a number in the second blank.

$P(B\,|\,T) =$
$=$

$P(W\,|\,T) =$
$=$

3. A game of chance is played with four decks of cards, labeled X, A, B, and C. To play this game, a player begins by picking a card from deck X, looking to see if the card is an A, B or C. The player then picks a card from the deck labeled by the chosen first card. This second card will be either a W (for win) or a L (for lose). (The odds of winning this game can, of course, be changed by altering the cards in the four decks.)

Let $A$, $B$, and $C$ be the event that the first card has an A, B, or C, respectively. Let $L$ and $W$ be the event that the second card has an $L$ or a $W$, respectively. The game has six possible outcomes, which are the six possible pairings of $A$, $B$, and $C$ with $L$ and $W$.

1. After playing the game many times with a particular set of four decks, you determine the following probabilities of the six outcomes. $P(A,W)=0.27$, $P(A,L)=0.03$, $P(B,W)=0.02$, $P(B,L) = 0.18$, $P(C,W)=0.1$, and $P(C,L)=0.4$.

For these cards, what is the probability of winning? $P(W)=$

What is the probability of losing? $P(L) =$

What is the probability of selecting an $A$? $P(A)=$

What is the probability of winning given that you selected an $A$? $P(W\,|\,A)=$

What is the probability of losing given that you selected an $A$? $P(L\,|\,A)=$

Given that you won, what is the probability that you had selected an $A$? $P(A\,|\,W)=$

Given that you won, what is the probability that you had selected a $B$? $P(B\,|\,W)=$

Given that you won, what is the probability that you had selected a $C$? $P(C\,|\,W)=$

Given that you lost, what is the probability that you had selected an $A$? $P(A\,|\,L)=$

Given that you lost, what is the probability that you had selected a $B$? $P(B\,|\,L)=$

Given that you lost, what is the probability that you had selected a $C$? $P(C\,|\,L)=$

2. You play with a different set of the four decks. This time, you observe the probabilities for each separate deck. For deck X, you observe the probabilities of getting an A, B, or C. These probabilities are $P(A)=0.7$, $P(B)=0.1$, and $P(C)=0.2$. Then, you separately observe the probabilities of winning and losing for each of the three lettered decks. These probabilities are $P(W\,|\,A) = 0.1$, $P(L\,|\,A) = 0.9$, $P(W\,|\,B) = 0.5$, $P(L\,|\,B) = 0.5$, $P(W\,|\,C) = 0.7$, and $P(L\,|\,C) = 0.3$.

For these cards, what are the probabilities of the six possible outcomes? $P(A,W)=$
, $P(A,L) =$
, $P(B,W)=$
, $P(B,L) =$
, $P(C,W)=$
, and $P(C,L) =$
.

What is the probability of winning? $P(W) =$

What is the probability of losing? $P(L) =$

Given that you won, what is the probability that you had selected an $A$? $P(A\,|\,W)=$

Given that you won, what is the probability that you had selected a $B$? $P(B\,|\,W)=$

Given that you won, what is the probability that you had selected a $C$? $P(C\,|\,W)=$

3. For yet another set of the four decks of cards, you discover exactly what the decks contain. Deck X contains a total of 20 cards: 10 cards with an A, 2 cards with a B, and 8 cards with a C. Deck A contains a total of 45 cards: 9 cards with a W and 36 cards with an L. Deck B contains a total of 400 cards: 120 cards with a W and 280 cards with an L. Deck C contains a total of 2 cards: 1 card with a W and 1 card with an L.
ABCTotal
W

L

Total

What is the probability of winning given that you selected an $A$? $P(W\,|\,A)=$

What is the probability of winning given that you selected a $B$? $P(W\,|\,B)=$

What is the probability of winning given that you selected a $C$? $P(W\,|\,C)=$

Given that you won, what is the probability that you had selected an $A$? $P(A\,|\,W)=$

Given that you won, what is the probability that you had selected a $B$? $P(B\,|\,W)=$

Given that you won, what is the probability that you had selected a $C$? $P(C\,|\,W)=$