Conditional Probability

Master conditional probability: Bayes' theorem, dependent events, and probability trees through these 5 detailed exercises.

Conditional Probability Concepts & Formulas
\(P(A|B) = \frac{P(A \cap B)}{P(B)}\)
Conditional Probability Formula
\(P(A \cap B) = P(A) \cdot P(B|A) = P(B) \cdot P(A|B)\)
Multiplication Rule
\(P(A|B) = \frac{P(B|A) \cdot P(A)}{P(B)}\)
Bayes' Theorem
Key Definitions:

Conditional Probability: The probability of event A occurring given that event B has occurred.

Dependent Events: Events where the occurrence of one affects the probability of the other.

Independent Events: Events where the occurrence of one does not affect the probability of the other.

Bayes' Theorem: Formula to update probability based on new evidence.

Law of Total Probability: Method to calculate the probability of an event by considering all possible scenarios.

Key Relationships:
  1. Definition: \(P(A|B) = \frac{P(A \cap B)}{P(B)}\) when \(P(B) > 0\)
  2. Multiplication Rule: \(P(A \cap B) = P(A|B) \cdot P(B)\)
  3. Independence: \(P(A|B) = P(A)\) when A and B are independent
  4. Bayes' Theorem: \(P(A|B) = \frac{P(B|A) \cdot P(A)}{P(B)}\)
  5. Law of Total Probability: \(P(A) = \sum P(A|B_i) \cdot P(B_i)\)
Range: \(0 \leq P(A|B) \leq 1\) for any conditional probability.
Consistency: If \(P(A|B) = P(A)\), then A and B are independent.
Tip 1: Read "P(A|B)" as "probability of A given B".
Tip 2: Use tree diagrams for sequential conditional probabilities.
Tip 3: Always verify that the conditioning event has non-zero probability.
Solution: Exercises 1 to 3
1 Dice Roll
Exercise 1
A fair six-sided die is rolled. Find the probability that the number rolled is even given that it is greater than 3.
Define Events:

Let A = "number is even", B = "number is greater than 3"

Sample space: S = {1, 2, 3, 4, 5, 6}

Step 1: Identify relevant sets

A = {2, 4, 6} (even numbers)

B = {4, 5, 6} (numbers > 3)

A ∩ B = {4, 6} (even and > 3)

Step 2: Calculate probabilities

P(B) = P(number > 3) = \(\frac{3}{6} = \frac{1}{2}\)

P(A ∩ B) = P(even and > 3) = \(\frac{2}{6} = \frac{1}{3}\)

Step 3: Apply conditional probability formula

\(P(A|B) = \frac{P(A \cap B)}{P(B)} = \frac{\frac{1}{3}}{\frac{1}{2}} = \frac{1}{3} \cdot \frac{2}{1} = \frac{2}{3}\)

Step 4: Verify by counting

Given B occurred, possible outcomes: {4, 5, 6}

Favorable outcomes (even): {4, 6}

P(A|B) = \(\frac{2}{3}\) ✓

\(P(\text{even}|\text{> 3}) = \frac{2}{3}\)
Final Answer:

The probability that the number is even given it's greater than 3 is \(\frac{2}{3}\).

2 Two Coin Flips
Exercise 2
Two fair coins are flipped. Find the probability that both coins show heads given that at least one coin shows heads.
Define Events:

Let A = "both coins are heads", B = "at least one coin is heads"

Sample space: S = {HH, HT, TH, TT}

Step 1: Identify relevant sets

A = {HH}

B = {HH, HT, TH} (all except TT)

A ∩ B = {HH}

Step 2: Calculate probabilities

P(B) = P(at least one head) = \(\frac{3}{4}\)

P(A ∩ B) = P(both heads) = \(\frac{1}{4}\)

Step 3: Apply conditional probability formula

\(P(A|B) = \frac{P(A \cap B)}{P(B)} = \frac{\frac{1}{4}}{\frac{3}{4}} = \frac{1}{4} \cdot \frac{4}{3} = \frac{1}{3}\)

Step 4: Verify by counting

Given B occurred, possible outcomes: {HH, HT, TH}

Favorable outcomes (both heads): {HH}

P(A|B) = \(\frac{1}{3}\) ✓

\(P(\text{both heads}|\text{at least one head}) = \frac{1}{3}\)
Final Answer:

The probability that both coins show heads given that at least one shows heads is \(\frac{1}{3}\).

3 Card Drawing
Exercise 3
A card is drawn from a standard deck of 52 cards. Find the probability that the card is a face card given that it is a red card.
Define Events:

Let A = "card is a face card", B = "card is red"

Standard deck: 52 cards (26 red, 26 black)

Face cards: 12 total (3 per suit × 4 suits)

Step 1: Identify relevant counts

Red cards: 26 (hearts + diamonds)

Red face cards: 6 (J, Q, K of hearts and diamonds)

Step 2: Calculate probabilities

P(B) = P(red card) = \(\frac{26}{52} = \frac{1}{2}\)

P(A ∩ B) = P(red face card) = \(\frac{6}{52} = \frac{3}{26}\)

Step 3: Apply conditional probability formula

\(P(A|B) = \frac{P(A \cap B)}{P(B)} = \frac{\frac{3}{26}}{\frac{1}{2}} = \frac{3}{26} \cdot \frac{2}{1} = \frac{6}{26} = \frac{3}{13}\)

Step 4: Verify by counting

Given B occurred (red card), possible outcomes: 26

Favorable outcomes (red face cards): 6

P(A|B) = \(\frac{6}{26} = \frac{3}{13}\) ✓

\(P(\text{face card}|\text{red card}) = \frac{3}{13}\)
Final Answer:

The probability that the card is a face card given it's red is \(\frac{3}{13}\).

Solution: Exercises 4 to 5
4 Medical Testing
Exercise 4
A medical test for a disease has the following characteristics:
• 95% accurate when the person has the disease
• 90% accurate when the person doesn't have the disease
• 2% of the population has the disease
If a person tests positive, what is the probability they actually have the disease?
Define Events:

Let D = "person has disease", T = "test is positive"

Given: P(D) = 0.02, P(T|D) = 0.95, P(T|D') = 0.10

Step 1: Identify all given probabilities

P(D) = 0.02 (probability of having disease)

P(D') = 0.98 (probability of not having disease)

P(T|D) = 0.95 (probability of positive test given disease)

P(T|D') = 0.10 (probability of positive test given no disease)

Step 2: Apply Law of Total Probability to find P(T)

P(T) = P(T|D)·P(D) + P(T|D')·P(D')

P(T) = (0.95)(0.02) + (0.10)(0.98) = 0.019 + 0.098 = 0.117

Step 3: Apply Bayes' Theorem

\(P(D|T) = \frac{P(T|D) \cdot P(D)}{P(T)} = \frac{(0.95)(0.02)}{0.117} = \frac{0.019}{0.117} = \frac{19}{117} \approx 0.162\)

Step 4: Interpret the result

Even though the test is quite accurate, only about 16.2% of positive results are true positives.

This demonstrates the importance of considering base rates in medical testing.

\(P(\text{disease}|\text{positive test}) = \frac{19}{117} \approx 0.162\)
Final Answer:

The probability that a person who tests positive actually has the disease is approximately 16.2%.

5 Sequential Events
Exercise 5
A bag contains 4 red balls and 6 blue balls. Two balls are drawn without replacement.
Find the probability that:
a) The second ball is red given that the first ball was red
b) Both balls are red
c) The first ball was red given that the second ball is red
Setup:

Initial: 4 red, 6 blue → Total: 10 balls

Without replacement: composition changes after first draw

Part a: Second ball red given first was red

After drawing 1 red ball: 3 red, 6 blue → Total: 9 balls

\(P(R_2|R_1) = \frac{3}{9} = \frac{1}{3}\)

Part b: Both balls are red

Using multiplication rule: \(P(R_1 \cap R_2) = P(R_1) \cdot P(R_2|R_1)\)

\(P(R_1) = \frac{4}{10} = \frac{2}{5}\)

\(P(R_2|R_1) = \frac{3}{9} = \frac{1}{3}\)

\(P(R_1 \cap R_2) = \frac{2}{5} \cdot \frac{1}{3} = \frac{2}{15}\)

Part c: First red given second is red

Using Bayes' Theorem: \(P(R_1|R_2) = \frac{P(R_2|R_1) \cdot P(R_1)}{P(R_2)}\)

We need \(P(R_2)\): \(P(R_2) = P(R_2|R_1) \cdot P(R_1) + P(R_2|R_1') \cdot P(R_1')\)

\(P(R_2|R_1) = \frac{3}{9}\), \(P(R_1) = \frac{4}{10}\)

\(P(R_2|R_1') = \frac{4}{9}\) (after drawing 1 blue: 4 red, 5 blue)

\(P(R_1') = \frac{6}{10}\)

\(P(R_2) = \frac{3}{9} \cdot \frac{4}{10} + \frac{4}{9} \cdot \frac{6}{10} = \frac{12}{90} + \frac{24}{90} = \frac{36}{90} = \frac{2}{5}\)

\(P(R_1|R_2) = \frac{\frac{3}{9} \cdot \frac{4}{10}}{\frac{2}{5}} = \frac{\frac{12}{90}}{\frac{2}{5}} = \frac{12}{90} \cdot \frac{5}{2} = \frac{60}{180} = \frac{1}{3}\)

a) \(\frac{1}{3}\)     b) \(\frac{2}{15}\)     c) \(\frac{1}{3}\)
Final Answer:

a) \(P(R_2|R_1) = \frac{1}{3}\), b) \(P(R_1 \cap R_2) = \frac{2}{15}\), c) \(P(R_1|R_2) = \frac{1}{3}\)

Comprehensive Summary: Conditional Probability
Core Concepts:

Conditional Probability: The probability of an event A given that event B has occurred, denoted as P(A|B).

Dependence: When knowledge of one event changes the probability of another event.

Bayes' Theorem: A formula for updating probabilities based on new evidence.

Essential Formulas:
  1. Conditional Probability: \(P(A|B) = \frac{P(A \cap B)}{P(B)}\)
  2. Multiplication Rule: \(P(A \cap B) = P(A|B) \cdot P(B)\)
  3. Bayes' Theorem: \(P(A|B) = \frac{P(B|A) \cdot P(A)}{P(B)}\)
  4. Law of Total Probability: \(P(A) = \sum P(A|B_i) \cdot P(B_i)\)
  5. Independence Check: \(P(A|B) = P(A)\) if A and B are independent
Important Principles:

Base Rate Fallacy: Ignoring prior probabilities when interpreting conditional probabilities.

Time Order: The conditioning event comes first in sequence.

Normalization: Conditional probability is calculated within the reduced sample space.

Memory Tip: "Given" means we restrict our attention to the conditioning event
Strategy Tip: Use tree diagrams for multi-stage conditional problems
Visualization Tip: Think of conditional probability as shrinking the sample space
Verification Tip: Check that P(A|B) + P(A'|B) = 1
Conditional Probability Problem-Solving
1
Identify Events
2
Determine What's Given
3
Choose Formula
4
Calculate & Interpret

Questions & Answers

Question: What's the difference between P(A|B) and P(B|A)?

Answer: These are fundamentally different probabilities:

  • \(P(A|B)\): Probability of A happening given that B has happened
  • \(P(B|A)\): Probability of B happening given that A has happened

For example, if A = "rain" and B = "cloudy sky":

  • \(P(\text{rain}|\text{cloudy})\): Probability it rains given the sky is cloudy
  • \(P(\text{cloudy}|\text{rain})\): Probability the sky is cloudy given that it's raining

These probabilities can be very different. Bayes' theorem relates them: \(P(A|B) = \frac{P(B|A) \cdot P(A)}{P(B)}\)

Question: When should I use Bayes' theorem?

Answer: Use Bayes' theorem when you need to "reverse" a conditional probability:

  • You know P(B|A) but need P(A|B)
  • You have prior knowledge that needs updating with new evidence
  • You're dealing with medical testing, spam detection, or similar diagnostic scenarios
  • You want to find the probability of a cause given an observed effect

The key insight is that Bayes' theorem allows you to update your beliefs based on new information, incorporating both the likelihood of the evidence and the prior probability of the hypothesis.

Question: How do I handle conditional probability with more than two events?

Answer: For multiple events, you can extend the basic principles:

  • Chain Rule: \(P(A \cap B \cap C) = P(A) \cdot P(B|A) \cdot P(C|A \cap B)\)
  • Extended Bayes: For multiple hypotheses, use partitioning
  • Tree Diagrams: Very helpful for sequential events

For example, with three events: \(P(A|B \cap C) = \frac{P(A \cap B \cap C)}{P(B \cap C)}\)

The key is to systematically apply the definition and consider the reduced sample space at each step.