Conditional Probability

Example (3.2.1)

Say we pick two cards from a standard deck of 52. What is the probability both are Aces? The answer is

\[\frac{{4\choose 2}}{{{52}\choose{2}}}=\frac{4!50!2!}{2!2!52!}=\frac{4\times3}{ 52\times 51}=0.0045\]

Now assume we know that one of the cards is an Ace. What is the probability that the other one is also an Ace? Clearly it is \(3/51=0.0588\).

This kind of probability is called a conditional probability.

Definition (3.2.2)

if P(B)>0 we have

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

Multiplication Rule

A simple manipulation of the equation above yields

\[P(A \cap B) = P(A|B)P(B)\]

Example (3.2.3)

You draw two cards from a standard 52-card deck. What is the probability to draw 2 Aces?

Solution:

Let A = “First card drawn is an ace”
Let B = “Second card drawn is an ace”

Then

\[P(A\cap B)= P(A)P(B|A) = \frac4{52}\frac{3}{51}\]

It’s easy to extend this to more than two events: What is the probability of drawing 4 aces when drawing 4 cards?

Let Ai = ith card drawn is an ace"

Then

\[P(A_1\cap A_2\cap A_3\cap A_4)=\] \[P(A_1)P(A_2|A_1)P(A_3|A_1,A_2)P(A_4|A_1,A_2,A_3)=\] \[\frac4{52}\frac{3}{51}\frac{2}{50}\frac{1}{49}\]

Law of Total Probability and Bayes Rule

Definition (3.2.4)

A set of events \(\{A_i\}\) is called a partition of the sample space if

\[ \begin{aligned} &A_i \cap A_j = \emptyset \text{ if }i \ne j\\ &\bigcup_{i=1}^{n}A_i = S \end{aligned} \]

Example (3.2.5)

a student is selected at random from all the undergraduate students at the Colegio

A1 = “Student is female”, A2 = “Student is male”

or maybe

A1 = “Student is freshman”, .., A4 = “Student is senior”

Theorem (3.2.6)

law of total probability

Let B be any event and \(\{A_i\}\) a partition, then

\[P(B)= \sum_{i=1}^n P(B|A_i)P(A_i)\]

Example (3.2.7)

A company has 452 employees, 210 men and 242 women. 15% of the men and 10% of the women have a managerial position. What is the probability that a randomly selected person in this company has a managerial position?

Let A1 = “person is female”, A2 = “person is male”

Let B = “person has a managerial position”

Then P(A1)=242/452, P(A2)=210/452, P(B|A1)=0.1 and P(B|A2)=0.15, so

\[ \begin{aligned} &P(B) = P(B|A_1)P(A_1)+P(B|A_2)P(A_2) = \\ &0.1\times 242/452+0.15\times 210/452 = 0.123\\ \end{aligned} \]

Theorem (3.2.8)

Bayes’ Formula

Let B be any event and \(\{A_i\}\) a partition, then

\[P(A_k|B) =\frac{P(B|A_k)P(A_k)}{\sum_{i=1}^n P(B|A_i)P(A_i)}\]

Notice that the denominator is just the law of total probability.

Example (3.2.9)

In the company above a person is randomly selected, and that person is in a managerial position. What is the probability the person is female?

\[ \begin{aligned} &P(A_1\vert B) = \frac{P(B|A_1)P(A_1)}{P(B|A_1)P(A_1)+P(B|A_2)P(A_2)} = \\ &\frac{0.1\times 242/452}{0.123} = 0.434\\ \end{aligned} \]

Bayes’ Rule plays a very important role in Statistics and in Science in general. It provides a natural method for updating you knowledge based on data.

Independence

Sometimes knowing that one event occurred does not effect the probability of another event. For example if you throw a red and a blue die, knowing that the red die shows a “6” will not change the probability that the blue die shows a “2”.

Theorem (3.2.10)

Say A and B are two events, then A and B are said to be independent iff

\[P(A \cap B) =P(A)P(B)\]

Example (3.2.11)

Say you flip a fair coin 5 times. What is the probability of 5 “heads”?

Let Ai = ith flip is heads

Now it is reasonable to assume that the Ai’s are independent and so

\[ \begin{aligned} &P(A_1\cap .. \cap A_5) = \\ &P(A_1)\times .. \times P(A_5) = \\ &\frac12\times .. \times \frac12 = \frac1{2^5}\\ \end{aligned} \]