Conditional Probability Formula

The conditional probability P(A|B) is the probability of event A occurring given that event B has already occurred.

The Formula

P(A∣B)=P(A and B)P(B)

Ask yourself: Has some information already been revealed that shrinks the set of possible outcomes?

Quick example

P(draw red∣already drew one red) changes because there's one fewer red.

Notation

P(A∣B) reads 'the probability of A given B'; the vertical bar means 'given that' — it names the event you already know happened. P(A∩B) is the chance both happen, and P(B) is the new, smaller denominator (once B is given, only B's outcomes are left to count). P(A∣B) and P(B∣A) usually differ because they divide by different totals: with 12 sport, 8 music, 5 both, P(sport∣music)=5/8 but P(music∣sport)=5/12.

What this formula means

The conditional probability P(A∣B) is the probability of event A occurring given that event B has already occurred.

Conditioning is a search filter. Filter a deck to red cards and 26 remain; hearts are half of what is on screen, so P(heart∣red)=12. Filter to hearts instead and every result is red, so P(red∣heart)=1. Swapping the filter changes the answer.

Formal view

P(A∣B)=P(A∩B)P(B) where P(B)>0

Worked examples

Example 1

medium
In a class of 30 students, 18 play soccer, 12 play basketball, and 6 play both. If a student plays soccer, what is the probability they also play basketball?
Show solution

Answer

P(B∣S)=13

First step

1.
We need P(B∣S)=P(B∩S)P(S).

See the full worked solution + why-it-works coaching

SetupKey insightWhy it worksCommon pitfallConnection

Free: full solutions on 3 topics a day. No card.

Every topic, every day: the Family plan

Example 2

hard
A test for a disease is 95% accurate (true positive rate) with a 3% false positive rate. If 1% of the population has the disease, what is the probability a person who tests positive actually has the disease?

Example 3

medium
Of 200 surveyed, 120 own a dog and 80 own a cat; 50 own both. P(cat∣dog)=?

Common mistakes

  • Dividing by the whole sample space — divide by P(B), the known condition, which shrinks the denominator.
  • Swapping P(A∣B) and P(B∣A) — read carefully which event is the 'given.'
  • Assuming independence to skip the formula — only set P(A∣B)=P(A) if you have verified the events are independent.

Why this formula matters

Conditional probability is how evidence changes a chance. It explains why a positive result on a fairly accurate test for a rare disease can still leave the disease unlikely, and why P(positive∣disease) and P(disease∣positive) are different numbers. Mixing the two up leads to wrong conclusions in medicine, courtrooms and spam filters.

Frequently asked questions

What is the Conditional Probability formula?

The conditional probability P(A∣B) is the probability of event A occurring given that event B has already occurred.

How do you use the Conditional Probability formula?

Use conditional probability when a problem says given, if we know, 'among those who' or 'of the students who', or when new information arrives: a test result, a peek at a card, a first draw already made. The denominator becomes the group that meets the condition. If nothing is given and the question asks for the chance that both things happen, it is a joint probability over the whole sample space. Always check which event sits after the bar.

What do the symbols mean in the Conditional Probability formula?

P(A∣B) reads 'the probability of A given B'; the vertical bar means 'given that' — it names the event you already know happened. P(A∩B) is the chance both happen, and P(B) is the new, smaller denominator (once B is given, only B's outcomes are left to count). P(A∣B) and P(B∣A) usually differ because they divide by different totals: with 12 sport, 8 music, 5 both, P(sport∣music)=5/8 but P(music∣sport)=5/12.

Why is the Conditional Probability formula important in Math?

Conditional probability is how evidence changes a chance. It explains why a positive result on a fairly accurate test for a rare disease can still leave the disease unlikely, and why P(positive∣disease) and P(disease∣positive) are different numbers. Mixing the two up leads to wrong conclusions in medicine, courtrooms and spam filters.

What do students get wrong about Conditional Probability?

The procedure for conditional probability is the easy part; the trap is dividing by the whole sample space. Asking "Has some information already been revealed that shrinks the set of possible outcomes?" first is what keeps a correct-looking calculation from being attached to the wrong concept.

What should I learn before the Conditional Probability formula?

Before studying the Conditional Probability formula, you should understand: probability, independent events.