What is Conditional Probability?

Conditional probability is the probability of an event occurring given that another event has already occurred. It represents how probabilities change when we have additional information.

Definition: The conditional probability of event A given that event B has occurred is denoted by P(A|B) and is calculated as:
P(A|B) = \frac{P(A \cap B)}{P(B)}

where:

  • P(A|B) is the conditional probability of event A given event B has occurred
  • P(A ∩ B) is the probability of both events A and B occurring (intersection)
  • P(B) is the probability of event B occurring (which must be greater than zero)

Intuitive Understanding

Conditional probability helps us update our beliefs when we receive new information. If we know that event B has occurred, we're no longer considering the entire sample space—we're restricting our attention to only those outcomes where B occurred. Within this restricted sample space, we want to find the proportion of outcomes where A also occurs.

Before Knowledge

Without any additional information, we calculate P(A) using the entire sample space.

After Knowledge

With the knowledge that B has occurred, we calculate P(A|B) using only the part of the sample space where B occurred.

Visual Representation

Conditional probability can be visualized using Venn diagrams, which help us understand the relationship between events.

Venn Diagram for Conditional Probability

B
A
A∩B

For P(A|B), we are calculating: P(A|B) = P(A∩B) / P(B)

This is the ratio of the green intersection area (A∩B) to the purple circle area (B).

Properties of Conditional Probability

Multiplicative Rule

We can rewrite the conditional probability formula to get:

P(A \cap B) = P(B) \cdot P(A|B)

Chain Rule

For multiple events, we can extend the multiplicative rule:

P(A \cap B \cap C) = P(A) \cdot P(B|A) \cdot P(C|A \cap B)

Examples of Conditional Probability

Example 1: Card Drawing

Consider drawing a card from a standard deck of 52 cards.

Question: What is the probability of drawing a king given that the card drawn is a face card?

Let's define our events:

  • A = "drawing a king" (there are 4 kings in the deck)
  • B = "drawing a face card" (there are 12 face cards: jacks, queens, and kings)

Solution:

We need to find P(A|B), which is the probability of drawing a king given that we've drawn a face card.

Using the conditional probability formula:

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

First, let's calculate P(A ∩ B):

  • A ∩ B = "drawing a card that is both a king and a face card"
  • All kings are face cards, so A ∩ B = A
  • P(A ∩ B) = P(A) = 4/52 = 1/13

Next, let's calculate P(B):

  • P(B) = 12/52 = 3/13

Now, we can calculate P(A|B):

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

Therefore, the probability of drawing a king given that the card is a face card is 1/3 or approximately 0.333.

Example 2: Medical Testing

Consider a medical test for a disease that affects 1% of the population. The test has the following characteristics:

  • If a person has the disease, the test will be positive 95% of the time (sensitivity).
  • If a person does not have the disease, the test will be negative 90% of the time (specificity).

Question: If a person tests positive, what is the probability that they actually have the disease?

Solution:

Let's define our events:

  • D = "person has the disease"
  • T = "test is positive"

We need to find P(D|T), which is the probability the person has the disease given that they tested positive.

Using the conditional probability formula:

P(D|T) = \frac{P(D \cap T)}{P(T)}

We know:

  • P(D) = 0.01 (1% of the population has the disease)
  • P(T|D) = 0.95 (sensitivity)
  • P(T|Dc) = 0.10 (1 - specificity)

First, let's calculate P(D ∩ T) using the multiplication rule:

P(D \cap T) = P(D) \cdot P(T|D) = 0.01 \cdot 0.95 = 0.0095

Next, let's calculate P(T) using the law of total probability:

P(T) = P(D) \cdot P(T|D) + P(D^c) \cdot P(T|D^c)
P(T) = 0.01 \cdot 0.95 + 0.99 \cdot 0.10 = 0.0095 + 0.099 = 0.1085

Now, we can calculate P(D|T):

P(D|T) = \frac{0.0095}{0.1085} \approx 0.0876

Therefore, the probability that a person has the disease given a positive test result is approximately 0.0876 or 8.76%.

This example illustrates the importance of considering the base rate (prior probability) in interpreting test results, especially for rare conditions.

Conditional Probability Calculator

Enter a value between 0 and 1.
Enter a value between 0 and 1.
Enter a value between 0 and min(P(A), P(B)).
Enter a value between 0 and 1.
Probability of positive test given disease.
Probability of negative test given no disease.
Must be less than or equal to both event A and event B outcomes.

Practice Problems

Test your understanding of conditional probability with these practice problems.

Problem 1

A family has two children. What is the probability that both children are girls, given that at least one of them is a girl?

Assume that boys and girls are equally likely and that the gender of the second child is independent of the first.

Problem 2

In a certain population, 5% of people have a particular disease. A test for this disease has a sensitivity of 90% (P(positive test | disease)) and a specificity of 80% (P(negative test | no disease)). If a person tests positive, what is the probability that they actually have the disease?

Related Concepts

Law of Total Probability

If events B₁, B₂, ..., Bₙ form a partition of the sample space (they are mutually exclusive and exhaustive), then for any event A:

P(A) = \sum_{i=1}^{n} P(A|B_i) \cdot P(B_i)

This is useful for calculating the total probability of an event that can occur in multiple ways.

Bayes' Theorem

Bayes' theorem allows us to reverse the conditioning in conditional probability:

P(A|B) = \frac{P(B|A) \cdot P(A)}{P(B)}

This is particularly useful when we know P(B|A) but need to find P(A|B), such as in medical diagnosis where we know the sensitivity of a test but need to find the probability of disease given a positive test.

Learn more about Bayes' Theorem

Further Reading

To deepen your understanding of conditional probability and related concepts, explore these topics:

Sample Space & Events

Learn about the foundation of probability theory and how to define events.

Learn More

Bayes' Theorem

Discover how to update probabilities based on new evidence.

Learn More

Independence

Understand when events don't affect each other's probabilities.

Learn More