# Conditional probability: Refresher

$$\mathbb P(\text{left} \mid \text{right})$$ is the prob­a­bil­ity that the thing on the left is true as­sum­ing the thing on the right is true, and it’s defined as $$\frac{\mathbb P(\text{left} \land \text{right})}{\mathbb P(\text{right})}.$$

Thus, $$\mathbb P(yellow \mid banana)$$ is the prob­a­bil­ity that a ba­nana is yel­low (“the prob­a­bil­ity of yel­low­ness given ba­nana”), while $$\mathbb P(banana \mid yellow)$$ is the prob­a­bil­ity that a yel­low ob­ject is a ba­nana (“the prob­a­bil­ity of ba­nana, given yel­low­ness”).noteIn gen­eral, $$\mathbb P(v)$$ is an ab­bre­vi­a­tion of $$\mathbb P(V = v)$$ for some vari­able $$V$$, which is as­sumed to be known from the con­text. For ex­am­ple, $$\mathbb P(yellow)$$ might stand for $$\mathbb P({ColorOfNextObjectInBag}=yellow)$$ where $$ColorOfNextObjectInBag$$ is a vari­able in our prob­a­bil­ity dis­tri­bu­tion $$\mathbb P,$$ and $$yellow$$ is one of the val­ues that that vari­able can take on.

$$\mathbb P(x \land y)$$ is used to de­note the prob­a­bil­ity of both $$x$$ and $$y$$ be­ing true si­mul­ta­neously (ac­cord­ing to some prob­a­bil­ity dis­tri­bu­tion $$\mathbb P$$). $$\mathbb P(x\mid y)$$, pro­nounced “the con­di­tional prob­a­bil­ity of x, given y”, is defined to be the quantity

$$\frac{\mathbb P(x \wedge y)}{\mathbb P(y)}.$$

For ex­am­ple, in the Dise­a­sitis prob­lem, $$\mathbb P({sick}\mid {positive})$$ is the prob­a­bil­ity that a pa­tient is sick given a pos­i­tive test re­sult, and it’s calcu­lated by tak­ing the 18% pa­tients who are sick and have pos­i­tive test re­sults, and di­vid­ing by all 42% of the pa­tients who got pos­i­tive test re­sults. That is, $$\mathbb P({sick}\mid {positive})$$ $$=$$ $$\frac{\mathbb P({sick} \land {positive})}{\mathbb P({positive})}.$$

Us­ing a fre­quency di­a­gram, we can vi­su­al­ize $$\mathbb P(sick \mid positive)$$ as the prob­a­bil­ity of draw­ing a $$sick$$ re­sult from a bag of only those peo­ple in the pop­u­la­tion who got a $$positive$$ re­sult.  The “given” op­er­a­tor in $$\mathbb P(x\mid y)$$ tells us to as­sume that $$y$$ is true, to re­strict our at­ten­tion to only pos­si­ble cases where $$y$$ is true, and then ask about the prob­a­bil­ity of $$x$$ within those cases.

Note that $$\mathbb P(positive \mid sick)$$ is not the same as $$\mathbb P(sick \mid positive).$$ To find the prob­a­bil­ity that a pa­tient has a pos­i­tive re­sult given that they’re sick, we can vi­su­al­ize tak­ing the 20 sick pa­tients and putting them in a group, and then ask­ing the prob­a­bil­ity that a ran­domly se­lected one will have a pos­i­tive re­sult, which will be $$\frac{18}{20} = 0.9$$ — so $$\mathbb P(positive \mid sick) = 90\%,$$ while $$\mathbb P(sick \mid positive) \approx 43\%.$$ Mix­ing up which one is which is an un­for­tu­nate source of of many prac­ti­cal er­rors when you’re try­ing to do these calcu­la­tions us­ing only the for­mal no­ta­tion, at least un­til you get used to it. Just re­mem­ber that $$\mathbb P(\text{left} \mid \text{right})$$ is the prob­a­bil­ity of the thing on the left given that the thing on the right is true.

Parents:

• Conditional probability

The no­ta­tion for writ­ing “The prob­a­bil­ity that some­one has green eyes, if we know that they have red hair.”