Home     Archive     Tags     About        RSS
Conditional Probability with Dice

Suppose the weather forecast is for a 60 percent chance of rain but as you get ready to leave the building you see someone come in dripping wet. Has this additional piece of information changed the probability of rain? Surely the probability is now closer to 100 percent.

If an event \(B\) provides information on the outcome of \(A\) then it will also affect the probability of \(A\). The probability of \(A\) given \(B\) is usually written as \(P(A|B)\) and is called a conditional probability. The following equation can be used to calculate a conditional probability:

\[P(A|B)=\frac{P(A\cap B)}{P(B)}\]

where \(P(A\cap B)\) is the joint probability of \(A\) and \(B\). The equation is equivalent to saying that when \(B\) has occurred then the probability of \(A\) can be calculated in the smaller \(B\) subspace.

It is possible for the conditional probability to be the same as the unconditional probability. When this happens \(P(A\cap B)/P(B)=P(A)\) or \(P(A\cap B)=P(A)P(B)\) and \(A\) and \(B\) are said to be independent, meaning that one has no effect on the other.

Here is an example involving dice that shows how extra information can have a big effect on probability. When you roll 2 dice the probability of getting the same number on both dice is \(1/6\). Now suppose you are told whether each roll was even or odd. Does this affect the probability of the numbers being equal? Obviously if one number is even and the other odd then they can't be equal. But what if they're both even or both odd, does this change the probability of them being equal?

Let the random variables for the dice be \(x_1\) and \(x_2\) and let \(\pi(x_i)\) be a function that returns the parity of \(x_i\) (0 for even, 1 for odd), then we want the conditional probability:

\[P(x_1=x_2|\pi(x_1)=\pi(x_2))=\frac{P(x_1=x_2 \cap \pi(x_1)=\pi(x_2))}{P(\pi(x_1)=\pi(x_2))}\]

The event \(x_1=x_2\) is a subset of the event \(\pi(x_1)=\pi(x_2)\) therefor \(P(x_1=x_2 \cap \pi(x_1)=\pi(x_2))=P(x_1=x_2)=1/6\) and the above equation simplifies to


The number of ways the numbers can have the same parity is \(3^2+3^2=18\) so \(P(\pi(x_1)=\pi(x_2))=18/36=1/2\) and the conditional probability is \(P(x_1=x_2|\pi(x_1)=\pi(x_2))=(1/6)/(1/2)=1/3\). Knowing the numbers have the same parity has increased the probability of them being equal from \(1/6\) to \(1/3\). Has it changed the probability of them not being equal? There are only two possibilities, the numbers are either equal or not, so \(P(x_1\ne x_2|\pi(x_1)=\pi(x_2))=1-1/3=2/3\). The probability of them not being equal has decreased from \(5/6\) to \(2/3\).

© 2010-2012 Stefan Hollos and Richard Hollos

blog comments powered by Disqus