Difference between revisions of "Conditional probability"

(Different approaches)
m (Fixed)
 
(61 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Conditional probability is the probability of an event occurring, assuming that another event has already occurred. <math>P(B|A)</math> is said as the probability of event B given A
+
'''Conditional probability''' is the [[probability]] of an event occurring, assuming that another event has already occurred. <math>P(B|A)</math> is said as the probability of event B given A
  
  
 
==Example==
 
==Example==
Let us say that 2 fair 6 sided dice are rolled and their face up values sum is 6. What is the probability that the face up value of the one dice is 2?
+
Let us say that <math>2</math> fair <math>6</math> sided dice are rolled and their face up values sum is <math>6</math>. What is the probability that the face up value of the one dice is <math>2</math>?
  
 
==Solution==
 
==Solution==
Line 26: Line 26:
 
draw(circle((-1.5,0),3));
 
draw(circle((-1.5,0),3));
 
real radius = 3;
 
real radius = 3;
label("$(0,4)$",(0,4),NW);
+
label("$P(A)$",(-1,3),NW);
 
draw(circle((1.5,0),3));
 
draw(circle((1.5,0),3));
 
real radius = 3;
 
real radius = 3;
 +
label("$P(B)$",(1,3),NE);
 +
label("$P(A \cap B)$",(0,-3.5));
 +
</asy>
 +
 +
In the diagram above, it represents a diagram of the probabilities of A and B occurring, where event A doesn't have to happen, so that event B happens. For example, if we have a group of cats and dogs, and we pick two animals, and the first one is a dog, what is the probability that we pick a cat? Geometrically speaking, <math>P(A|B)</math> would be the ratio of <math>P(A \cap B)</math> to <math>P(A)</math>, since <math>P(B)</math> is <math>1</math>.
 +
 +
<asy>
 +
size(150);
 +
import graph;
 +
 +
draw(circle((0,0),3));
 +
real radius = 3;
 +
label("$P(B)$",(1,3),NE);
 +
filldraw(circle((0,-1.5),1), lightgray);
 +
real radius = 3;
 +
label("$P(A)$",(0,-3.5));
  
 
</asy>
 
</asy>
 +
 +
In this diagram the above <math>P(A)</math> (grey part) has to occur so that <math>P(B)</math> can occur. Let's take the cat and dog example, but instead we are given that the first pet chosen is a cat, and we want the probability of choosing a cat for the second one. Geometrically speaking, <math>P(A|B)</math> would be the <math>P(A)</math> since <math>P(B)</math> is <math>1</math>.
 +
 +
==Let's make a deal==
 +
 +
The Monty Hall problem is related to conditional probability. Monty Hall runs the show, "Let's Make a Deal." The problem states, Suppose you're on a game show, and you're given the choice of three doors: Behind one door is a car; behind the others, goats. You pick a door, and the host, who knows what's behind the doors, opens another door, which has a goat. He then says to you, "Do you want to pick door change your door?" Is it to your advantage to switch your choice?
 +
 +
The short answer is yes. The host doesn't just choose a door at random to reveal. He follows three rules, he doesn't reveal the door with a car, he doesn't reveal your door, and he always gives the option to switch. We start with a <math>\frac {1} {3}</math> chance of winning the car, and the host knowingly reveals a goat, which he always has the option to do, so why should your chance of winning increase to <math>\frac {1} {2}</math>. This is a bit skeptical, but we can use a sample space to see this.
 +
 +
<math>\begin{tabular}{c c c c}
 +
Door 1 & Door 2 & Door 3 \\
 +
car & goat & goat \\
 +
goat & car & goat \\
 +
goat & goat & car \\
 +
\end{tabular}</math>
 +
 +
Remember that the host can always reveal a goat.
 +
If we choose the car correctly on the first try, which happens at <math>\frac{1}{3}</math> chance, swapping would lose, but if we choose the goat on the first try, which happens at <math>\frac {2} {3}</math> chance, swapping would win.
 +
 +
 +
But how can we solve this using conditional probability? Let's look at 60 different cases with equal probability, where we choose Door 1. (We label the goat <math>G_1</math> and <math>G_2</math>) There are 20 cases where we choose <math>G_1</math> and the host reveals the other goat. There are 10 cases where we choose the car and the host reveals <math>G_1</math>. There are 10 cases where we choose the car and the host reveals <math>G_2</math>. There are 20 cases where we choose <math>G_2</math> and the host reveals the other goat. <math>P(A)</math> will be the probability that we win by switching, and <math>P(B)</math> will be the probability that we choose Door 1, which makes <math>P(B)</math> constant at <math>1</math>. Since there are 40 cases out of 60 cases, or <math>\frac {2} {3}</math> that we win, by choosing Door 1, by conditional probability, we have <math>\frac {\frac {2} {3}}{1} = \frac {2} {3}</math>.
  
 
==Review Problems==
 
==Review Problems==
Line 36: Line 73:
  
  
The probability that event A occurs is <math>\frac {3} {4}</math>, and the probability that event B occurs is <math>\frac {2} {3}</math>.
+
The probability that event A occurs is <math>\frac{3} {4}</math>, and the probability that event B occurs is <math>\frac {2} {3}</math>.
 
What are the minimum and maximum possible values of <math>P(A \cap B)</math>?
 
What are the minimum and maximum possible values of <math>P(A \cap B)</math>?
What are the minimum and maximum possible values of P(A|B) and P(B|A)?
+
What are the minimum and maximum possible values of <math>P(A|B)</math> and <math>P(B|A)</math>?
 +
(Source AMC)
 +
 
 +
What fraction of all permutations of the numbers <math>1, 2, 3, 4, 5, 6</math> such that the first term is not <math>1</math> and the third has <math>3</math>?
 
(Source AMC)
 
(Source AMC)
  
Line 46: Line 86:
 
[[Category:Combinatorics]]
 
[[Category:Combinatorics]]
 
[[Category:Definition]]
 
[[Category:Definition]]
 +
[[Category:Mathematics]]
 +
[[Category:Probability]]

Latest revision as of 11:01, 28 September 2024

Conditional probability is the probability of an event occurring, assuming that another event has already occurred. $P(B|A)$ is said as the probability of event B given A


Example

Let us say that $2$ fair $6$ sided dice are rolled and their face up values sum is $6$. What is the probability that the face up value of the one dice is $2$?

Solution

Let call the first dice $D_1$ and the second one $D_2$. There are 5 ways for $D_1 + D_2 = 6$ and 2 of those ways (distinct) includes a 2. Therefore, our answer is $\frac {2} {5}$.

Formula

The formula for conditional probability is \[P(A \cap B) = P(A) \cdot P(B|A)\] where $P(B|A)$ represents the conditional probability. $P(B|A)$ is also said as the probability of event B occurring given event A occurs. $P(A \cap B)$ is the probability $P(A) \cdot P(B)$. We can also represent $P(B|A)$ as \[P(B|A) = \frac {P(A \cap B)} {P(A)}\]

Different Problem

A fair standard die is tossed 3 times. Given that the sum of the first two tosses equals the third, what is the probability that at least one 2 is tossed? (Source AMC)


Solution: The probability that the sum of the first two die is equal to the 3rd die is just another way to also equivalent to the probability that the sum of the numbers on the first two die is less than 7, which is $\frac {5}{12}$. The probability that a two is rolled and that it meets the first condition is $\frac {2}{9}$. dividing gets us $\frac {8}{15}$.

Different approaches

[asy] size(150); import graph;  draw(circle((-1.5,0),3)); real radius = 3; label("$P(A)$",(-1,3),NW); draw(circle((1.5,0),3)); real radius = 3; label("$P(B)$",(1,3),NE); label("$P(A \cap B)$",(0,-3.5)); [/asy]

In the diagram above, it represents a diagram of the probabilities of A and B occurring, where event A doesn't have to happen, so that event B happens. For example, if we have a group of cats and dogs, and we pick two animals, and the first one is a dog, what is the probability that we pick a cat? Geometrically speaking, $P(A|B)$ would be the ratio of $P(A \cap B)$ to $P(A)$, since $P(B)$ is $1$.

[asy] size(150); import graph;  draw(circle((0,0),3)); real radius = 3; label("$P(B)$",(1,3),NE); filldraw(circle((0,-1.5),1), lightgray); real radius = 3; label("$P(A)$",(0,-3.5));  [/asy]

In this diagram the above $P(A)$ (grey part) has to occur so that $P(B)$ can occur. Let's take the cat and dog example, but instead we are given that the first pet chosen is a cat, and we want the probability of choosing a cat for the second one. Geometrically speaking, $P(A|B)$ would be the $P(A)$ since $P(B)$ is $1$.

Let's make a deal

The Monty Hall problem is related to conditional probability. Monty Hall runs the show, "Let's Make a Deal." The problem states, Suppose you're on a game show, and you're given the choice of three doors: Behind one door is a car; behind the others, goats. You pick a door, and the host, who knows what's behind the doors, opens another door, which has a goat. He then says to you, "Do you want to pick door change your door?" Is it to your advantage to switch your choice?

The short answer is yes. The host doesn't just choose a door at random to reveal. He follows three rules, he doesn't reveal the door with a car, he doesn't reveal your door, and he always gives the option to switch. We start with a $\frac {1} {3}$ chance of winning the car, and the host knowingly reveals a goat, which he always has the option to do, so why should your chance of winning increase to $\frac {1} {2}$. This is a bit skeptical, but we can use a sample space to see this.

$\begin{tabular}{c c c c}  Door 1 & Door 2 & Door 3 \\  car & goat & goat \\   goat & car & goat \\  goat & goat & car \\ \end{tabular}$

Remember that the host can always reveal a goat. If we choose the car correctly on the first try, which happens at $\frac{1}{3}$ chance, swapping would lose, but if we choose the goat on the first try, which happens at $\frac {2} {3}$ chance, swapping would win.


But how can we solve this using conditional probability? Let's look at 60 different cases with equal probability, where we choose Door 1. (We label the goat $G_1$ and $G_2$) There are 20 cases where we choose $G_1$ and the host reveals the other goat. There are 10 cases where we choose the car and the host reveals $G_1$. There are 10 cases where we choose the car and the host reveals $G_2$. There are 20 cases where we choose $G_2$ and the host reveals the other goat. $P(A)$ will be the probability that we win by switching, and $P(B)$ will be the probability that we choose Door 1, which makes $P(B)$ constant at $1$. Since there are 40 cases out of 60 cases, or $\frac {2} {3}$ that we win, by choosing Door 1, by conditional probability, we have $\frac {\frac {2} {3}}{1} = \frac {2} {3}$.

Review Problems

Two fair coins are simultaneously flipped. This is done repeatedly until at least one of the coins comes up heads, at which point the process stops, what is the probability that the other coin also comes up heads on the last flip? (Source HMMT)


The probability that event A occurs is $\frac{3} {4}$, and the probability that event B occurs is $\frac {2} {3}$. What are the minimum and maximum possible values of $P(A \cap B)$? What are the minimum and maximum possible values of $P(A|B)$ and $P(B|A)$? (Source AMC)

What fraction of all permutations of the numbers $1, 2, 3, 4, 5, 6$ such that the first term is not $1$ and the third has $3$? (Source AMC)

See also