3 Conditional Probability and Independence

A progressive guide to conditional probability, multiplication, partitions, Bayes’ theorem, and the distinctions among different forms of independence.

Reading conditional probabilities

Probability answers can change when additional information becomes available. If the condition is event BB, the relevant reference set is no longer the entire sample space but the outcomes contained in BB. Thus, for P(B)>0P(B)>0,

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

The notation is read “AA given BB.” The order matters: P(A∣B)P(A\mid B) generally differs from P(B∣A)P(B\mid A) because the denominators are different.

For example, suppose 40%40\% of students take statistics, 25%25\% take computer science, and 15%15\% take both. Then

P(statistics∣computer science)=0.150.25=0.60,P(\text{statistics}\mid\text{computer science})=\frac{0.15}{0.25}=0.60,

whereas

P(computer science∣statistics)=0.150.40=0.375.P(\text{computer science}\mid\text{statistics})=\frac{0.15}{0.40}=0.375.

Takeaway: Always identify the event after the conditioning bar and use that event’s probability as the denominator.

Building joint probabilities

The follows by rearranging the definition of :

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

Because intersection is commutative, the same joint probability can also be written as

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

For a box containing 5 red balls and 3 blue balls, the probability of drawing two red balls without replacement is

P(R1∩R2)=P(R1)P(R2∣R1)=58⋅47=514.P(R_1\cap R_2)=P(R_1)P(R_2\mid R_1)=\frac{5}{8}\cdot\frac{4}{7}=\frac{5}{14}.

The second draw has probability 47\frac{4}{7}, not 58\frac{5}{8}, because the first red ball is not replaced.

For a sequence of three events, the same idea gives

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

More generally, each factor conditions on all earlier events.

Takeaway: For sequential outcomes, multiply the probability of the first event by the appropriate at each later step.

Partitions and total probability

A divides the sample space into cases that do not overlap and together include every possible outcome. If B1,…,BkB_1,\ldots,B_k form a , then any event AA can be split into disjoint pieces:

A=(A∩B1)∪⋯∪(A∩Bk).A=(A\cap B_1)\cup\cdots\cup(A\cap B_k).

Adding the probabilities of these pieces and applying the produces the :

P(A)=∑i=1kP(A∣Bi)P(Bi).P(A)=\sum_{i=1}^{k}P(A\mid B_i)P(B_i).

Consider three factories. Factory 1 supplies 50%50\% of products with a 2%2\% defect rate, Factory 2 supplies 30%30\% with a 3%3\% defect rate, and Factory 3 supplies 20%20\% with a 5%5\% defect rate. If DD is the event that a product is defective, then

P(D)=(0.02)(0.50)+(0.03)(0.30)+(0.05)(0.20)=0.029.P(D)=(0.02)(0.50)+(0.03)(0.30)+(0.05)(0.20)=0.029.

The overall defect probability is therefore 2.9%2.9\%. This is a weighted average, not an unweighted average of the three defect rates.

Takeaway: When outcomes are divided into cases, calculate the contribution of each case and weight it by that case’s probability.

Reversing conditions with

reverses the direction of conditioning. Starting from the two forms of the joint probability,

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

and

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

equating them gives

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

Suppose the factory data above are known and a product is defective. The probability that it came from Factory 3 is

P(F3∣D)=P(D∣F3)P(F3)P(D)=(0.05)(0.20)0.029≈0.3448.P(F_3\mid D)=\frac{P(D\mid F_3)P(F_3)}{P(D)}=\frac{(0.05)(0.20)}{0.029}\approx 0.3448.

Factory 3 supplies only 20%20\% of products but accounts for about 34.5%34.5\% of defective products because its defect rate is highest. The calculation uses both the prior probability P(F3)P(F_3) and the conditional rate P(D∣F3)P(D\mid F_3).

A useful interpretation is

posterior probability∝likelihood×prior probability.\text{posterior probability}\propto\text{likelihood}\times\text{prior probability}.

Takeaway: Do not reverse a by intuition alone; use and include the base rate.

Testing independence

Independence means that information about one event does not change the probability of another. The central test is

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

When the relevant conditional probabilities exist, independence is also characterized by

P(A∣B)=P(A)P(A\mid B)=P(A)

or equivalently

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

For two tosses of a fair coin, let AA be “the first toss is heads” and BB be “the second toss is heads.” Then

P(A)=12,P(B)=12,P(A∩B)=14.P(A)=\frac{1}{2},\qquad P(B)=\frac{1}{2},\qquad P(A\cap B)=\frac{1}{4}.

Since

P(A∩B)=14=12⋅12=P(A)P(B),P(A\cap B)=\frac{1}{4}=\frac{1}{2}\cdot\frac{1}{2}=P(A)P(B),

the events are . Their complements are also in the corresponding pairings.

By contrast, satisfy P(A∩B)=0P(A\cap B)=0. If both have positive probability, then P(A)P(B)>0P(A)P(B)>0, so they cannot be . On one die roll, “the result is 1” and “the result is 2” are mutually exclusive and therefore dependent.

Takeaway: Independence is an equality to check, while mutual exclusivity describes an impossible intersection; positive-probability are not .

From pairwise to

For three events, checking every pair is not always enough. requires

P(A∩B)=P(A)P(B),P(A\cap B)=P(A)P(B),
P(A∩C)=P(A)P(C),P(A\cap C)=P(A)P(C),

and

P(B∩C)=P(B)P(C).P(B\cap C)=P(B)P(C).

requires these pairwise conditions and also the three-way condition

P(A∩B∩C)=P(A)P(B)P(C).P(A\cap B\cap C)=P(A)P(B)P(C).

Therefore, is weaker than . For a larger collection, requires the corresponding product rule for every nonempty subcollection, not merely for pairs.

A reliable workflow for probability problems is:

  1. Define each event clearly.

  2. Identify the direction of conditioning.

  3. Look for a into cases.

  4. Use the for sequences.

  5. Use when the requested reverses the given direction.

  6. Test independence instead of assuming it.

  7. Check that every probability lies between 00 and 11, and that probabilities over a complete sum to 11.

Final takeaway: changes the reference set, multiplication combines successive conditions, total probability combines partitioned cases, reverses conditioning, and independence must be established by factorization.