Mathwords logoMathwords

Conditional Probability — Definition, Formula & Examples

Conditional Probability

A probability that is computed based on the assumption that some event has already occurred. The probability of event B given that event A has occurred is written P(B|A).

Formula: P(B∣A)=P(A and B)P(A)\displaystyle P(B|A) = \frac{P(A \text{ and } B)}{P(A)}

Example: Suppose a bag contains two red balls and two green balls, all of which are identical except for color. One ball is drawn at random and set aside. Then a second ball is drawn at random. Given the events
AA = the first ball is red
BB = the second ball is red,
find P(B∣A).P(B|A)\text{.}

Answer: P(B∣A)=13.\displaystyle P(B|A) = \frac{1}{3}\text{.} Why? After a red ball is removed, there are two green balls left and only one red ball.

Alternatively, we could use the formula above.P(B∣A)=P(A and B)P(A)=P(both are red)P(first is red)=1/61/2=13.P(B|A) = \frac{P(A \text{ and } B)}{P(A)} = \frac{P(\text{both are red})}{P(\text{first is red})} = \frac{1/6}{1/2} = \frac{1}{3}.

Key Formula

P(B∣A)=P(A and B)P(A)P(B|A) = \frac{P(A \text{ and } B)}{P(A)}
Where:
  • P(B∣A)P(B|A) = The probability of event B occurring given that event A has occurred
  • P(A and B)P(A \text{ and } B) = The probability that both events A and B occur
  • P(A)P(A) = The probability of event A occurring (must be greater than 0)

Worked Example

Problem: A standard deck has 52 cards. You draw one card and learn it is a face card (Jack, Queen, or King). What is the probability that it is a King?
Identify the events: Let A = drawing a face card. Let B = drawing a King. Since every King is a face card, "A and B" simply means drawing a King.
Find the probabilities: There are 12 face cards and 4 Kings in a deck of 52 cards.
P(A)=1252,P(A and B)=452P(A) = \frac{12}{52}, \quad P(A \text{ and } B) = \frac{4}{52}
Apply the formula: Divide the probability of both events by the probability of the given event.
P(B∣A)=P(A and B)P(A)=4/5212/52=412=13P(B|A) = \frac{P(A \text{ and } B)}{P(A)} = \frac{4/52}{12/52} = \frac{4}{12} = \frac{1}{3}
Answer: Given that the card is a face card, the probability it is a King is 13\frac{1}{3}.

Why It Matters

Conditional probability is essential whenever new information changes how likely an outcome is. It underpins medical testing (e.g., the probability you have a disease given a positive test), weather forecasting, and spam filters. It also forms the basis of Bayes' theorem, one of the most widely used results in statistics.

Common Mistakes

Mistake: Confusing P(B|A) with P(A|B).
Correction: These are generally not equal. The probability of rain given clouds is different from the probability of clouds given rain. Always check which event is the "given" condition.

Related Terms

  • Probability — The broader concept conditional probability builds on
  • Event — An outcome or set of outcomes in probability
  • Independent Events — Events where conditioning does not change the probability
  • Bayes' Theorem — Uses conditional probability to reverse the condition