Conditional Probability¶

Definition¶
Suppose we want to know the probability of getting a prime number if we pick from 1 to 100. Since there are 25 prime numbers from 1 to 100, then this probability is \(\frac{25}{100}\) or \(\frac{1}{4}\). Now, suppose we are given the information that the number we pick will always be odd. Because there are 24 odd prime numbers and 50 odd numbers, then the probability of picking a prime number, given that it is odd, is \(\frac{24}{50}\) or \(\frac{12}{25}\). The probability changed because of the new information! This is called conditioning.
We denote the conditional probability of \(A\), given that \(B\) occurred, by \(\mathbf{P}(A\vert B)\) and it is defined as
Example¶
We roll a 4-sided die twice. Let \(X\) be the outcome of the first roll and \(Y\) the outcome of the second roll. Moreover, let \(B\) be the event that the minimum of \(X\) and \(Y\) is 2, i.e., \(\min(X,Y)=2\). The event \(B\) is the shaded region in the figure below.

What is the probability that \(Y=1\) given that \(B\) occurred? Since \(\{Y=1\}\cap B=\varnothing\), then
What is the probability that \(Y\) is even given that \(B\) occurred? We have
Properties¶
Conditional probabilities share the properties of ordinary probabilities:
-
non-negativity: \(\mathbf{P}(A\lvert B)\geq0,\) assuming \(\mathbf{P}(B)>0\)
-
normalization: \(\mathbf{P}(\Omega\lvert B)=1\)
Proof: \(\mathbf{P}(\Omega\lvert B)=\dfrac{\mathbf{P}(\Omega\cap B)}{\mathbf{P}(B)}=\dfrac{\mathbf{P}(B)}{\mathbf{P}(B)}=1\)
We also have
\[\mathbf{P}(\Omega\lvert B)=\dfrac{\mathbf{P}(B\cap B)}{\mathbf{P}(B)}=\dfrac{\mathbf{P}(B)}{\mathbf{P}(B)}=1.\] -
countable additivity: If \(A\cap C=\varnothing\), then \(\mathbf{P}(A\cup C\,\lvert\,B)=\mathbf{P}(A\lvert B)+\mathbf{P}(C\lvert B).\)

Using the figure above, we have
\[\begin{align} \mathbf{P}(A\cup C\lvert B)&=\dfrac{\mathbf{P}\left((A\cup C)\cap B\right)}{\mathbf{P}(B)}\\ &=\dfrac{\mathbf{P}\left((A\cap B)\cup(C\cap B)\right)}{\mathbf{P}(B)}\\ &=\dfrac{\mathbf{P}\left(A\cap B\right)+\mathbf{P}\left(C\cap B\right)}{\mathbf{P}(B)}\\ &=\mathbf{P}(A|B)+\mathbf{P}(C|B). \end{align}\]
Note
In general, \(\mathbf{P}(A|B)\neq\mathbf{P}(B|A).\)
The Multiplication Rule¶
From the definition of conditional probability, we have \(\mathbf{P}(A\cap B)=\mathbf{P}(A\lvert B)\,\mathbf{P}(B).\) Moreover, since \(\mathbf{P}(A\cap B)=\mathbf{P}(B\cap A)=\mathbf{P}(B\lvert A)\,\mathbf{P}(A)\), then
Extending this to 3 sets, we have
In general, for sets \(A_1,A_2,\ldots,A_n\),