intermediate 12 minutes

Conditional Probability and Independence

Read conditional probabilities with the right denominator. Use a two-way table to distinguish reversed questions and independence.

•
On This Page

Conditioning changes the reference group

P(A | B) means the probability of A given that B occurs. For P(B) > 0:

P(A∣B)=P(A∩B)P(B).P(A\mid B)=\frac{P(A\cap B)}{P(B)}.

The denominator restricts the sample space to B. P(A | B) generally differs from P(B | A), even though both share the intersection A ∩ B. Reading the phrase after “given” identifies the denominator.

Worked example: orders and express shipping

Consider 100 hypothetical orders:

GiftNot giftTotal
Express152540
Standard154560
Total3070100

Among express orders, 15 of 40 are gifts: P(gift | express) = 0.375. Among gift orders, 15 of 30 are express: P(express | gift) = 0.5. Among all orders, 15 of 100 are both: P(gift and express) = 0.15.

These are three different questions. Writing a count-based sentence before calculating prevents accidentally reversing the conditioning. The conditional percentages describe these recorded orders; generalizing to future orders needs assumptions about selection and stability.

Recover an intersection by multiplication

Rearranging the definition gives:

P(A∩B)=P(B)P(A∣B)=P(A)P(B∣A).P(A\cap B)=P(B)P(A\mid B)=P(A)P(B\mid A).

In the table, 0.40 × 0.375 = 0.30 × 0.50 = 0.15. You cannot replace a conditional probability with its marginal unless independence is justified.

Under a probability model, A and B are independent when P(A ∩ B) = P(A)P(B). Here the empirical joint share is 0.15 while 0.30 × 0.40 = 0.12, so the events are not independent in the empirical distribution. That difference alone is not a proof about a population relationship: sample proportions fluctuate.

Partition the population to find a total probability

If B and Bᶜ divide all possibilities, then:

P(A)=P(A∣B)P(B)+P(A∣Bc)P(Bc).P(A)=P(A\mid B)P(B)+P(A\mid B^c)P(B^c).

Gift probability among standard orders is 15/60 = 0.25. Weighting the two conditional probabilities gives 0.375 × 0.40 + 0.25 × 0.60 = 0.30. Averaging them without their group weights would give the wrong total when groups differ in size.

Watch the event definition and timing

Conditioning on something that occurs after an intervention may change the comparison population. “Among people who finished onboarding” excludes non-completers and can undermine a causal comparison between assigned versions. The denominator should match the claim.

Mutually exclusive events cannot both occur. If each has positive probability, they are dependent: knowing one occurred makes the other impossible. Zero-probability exceptions and continuous conditional models need more careful definitions than the elementary ratio.

Practice

Of 200 users, 50 subscribe and 30 of those subscribers use mobile. What is P(mobile | subscriber)? Can you find P(subscriber | mobile)?

Show the explanation

P(mobile | subscriber) = 30/50 = 0.60. The reverse probability needs the total number of mobile users, which is not given. Reusing 0.60 would reverse the question without its denominator.

Continue

Use Bayes’ theorem to reverse a conditional probability with the needed base rate. OpenStax explains conditional probability.

Did this explanation help?

Your response helps us identify lessons that need more work.