How does conditional probability work?

Conditional probability is the math of updating your expectations based on new information. It calculates the chance of an event happening, assuming that another specific event has already occurred. Think of it like guessing the weather. If you want to know the probability that it will rain today, you might look at the overall climate. But if you look out the window and see dark clouds, your probability of rain changes. The dark clouds are the 'condition' that updates your calculation.

What it is: The Formula

In probability, we write 'the probability of event A given that event B has happened' as P(AB)P(A|B). The vertical line is read as 'given'. The mathematical formula is P(AB)=P(A and B)/P(B)P(A|B) = P(A \text{ and } B) / P(B). This means you take the probability of both events happening together and divide it by the probability of the condition happening.

Why it works: Shrinking the Sample Space

Normally, probabilities are calculated out of all possible outcomes (the whole sample space). Conditional probability works by shrinking that sample space. Once you know event B has happened, you can throw away any outcomes where B did not happen. You are now only calculating the probability of A within the smaller universe of B.

Where students slip: Confusing A|B and B|A

A very common mistake is assuming that P(AB)P(A|B) is the same as P(BA)P(B|A). They represent very different scenarios! For example, the probability that a person is a teenager given that they are in high school is very high. But the probability that a person is in high school given that they are a teenager is much lower, since many teenagers are in middle school or college.

Worked through

In a class of 30 students, 15 play soccer, 10 play basketball, and 5 play both sports. If a student is chosen at random and we know they play basketball, what is the probability they also play soccer?

Let event A be playing soccer, and event B be playing basketball. We are looking for P(AB)P(A|B). We know the number of students who play basketball is 10, so P(B)=10/30P(B) = 10/30. The number of students who play both is 5, so P(A and B)=5/30P(A \text{ and } B) = 5/30. Using our formula: P(AB)=P(A and B)/P(B)=(5/30)/(10/30)=5/10=0.5P(A|B) = P(A \text{ and } B) / P(B) = (5/30) / (10/30) = 5/10 = 0.5. There is a 50% chance the student plays soccer.

Questions students ask

Ask about this topic

Where this comes from: OpenStax Introductory Statistics, Chapter 3: Probability Topics · Khan Academy: Conditional Probability

See also