Conditional Probability and the Multiplication Rule

Conditional probability — the probability of EE given that FF has occurred: P(EF)=P(EF)P(F),P(F)0P(E \mid F) = \frac{P(E \cap F)}{P(F)}, \qquad P(F) \neq 0 Conditioning shrinks the sample space to FF: count favourable outcomes inside FF only. Useful facts: P(FF)=1P(F \mid F) = 1, and P(EF)=1P(EF)P(E' \mid F) = 1 - P(E \mid F).

Multiplication rule (the same identity, rearranged): P(EF)=P(F)P(EF)=P(E)P(FE)P(E \cap F) = P(F)\,P(E \mid F) = P(E)\,P(F \mid E) This is the engine for without-replacement problems — multiply along the branches of the tree, updating the counts at each draw.

Independent Events

EE and FF are independent when knowing one changes nothing about the other: P(EF)=P(E)P(F)P(E \cap F) = P(E)\,P(F) equivalently P(EF)=P(E)P(E \mid F) = P(E). Test with numbers, never with intuition — compute both sides and compare. If AA and BB are independent, so are AA and BB', AA' and BB, and AA' and BB'.

Do not confuse independent with mutually exclusive: mutually exclusive events (EF=E \cap F = \varnothing) with nonzero probabilities are never independent — one occurring forbids the other.

Standard consequences for independent A,BA, B: P(AB)=P(A)+P(B)P(A)P(B)P(A \cup B) = P(A) + P(B) - P(A)P(B), and P(at least one)=1P(A)P(B)P(\text{at least one}) = 1 - P(A')P(B') — the complement route is nearly always shorter.

Total Probability and Bayes' Theorem

Let E1,E2,,EnE_1, E_2, \ldots, E_n be a partition of the sample space (mutually exclusive, exhaustive, nonzero probabilities) and AA any event.

Theorem of total probability — average the conditional probabilities, weighted by the partition: P(A)=i=1nP(Ei)P(AEi)P(A) = \sum_{i=1}^{n} P(E_i)\,P(A \mid E_i)

Bayes' theorem — reverse the conditioning: P(EkA)=P(Ek)P(AEk)i=1nP(Ei)P(AEi)P(E_k \mid A) = \frac{P(E_k)\,P(A \mid E_k)}{\sum_{i=1}^{n} P(E_i)\,P(A \mid E_i)} The recipe: name the hypotheses EiE_i (which bag, which machine, diseased or not), write their prior probabilities, write each P(AEi)P(A \mid E_i), and assemble. The denominator is always the total-probability sum — compute it once and reuse it.

Random Variables and Their Distributions

A random variable XX assigns a number to each outcome. Its probability distribution is the table of values xix_i with probabilities pip_i, where pi0,pi=1p_i \geq 0, \qquad \sum p_i = 1 The condition pi=1\sum p_i = 1 is how unknown constants in a distribution table are found — a guaranteed board question.

Mean (expectation): E(X)=μ=xipiE(X) = \mu = \sum x_i p_i Build the distribution table first, then add an xipix_i p_i row and sum it — tabulate, never improvise.

Worked Examples — Conditional Probability and Independence

Example 1 — The definition at work

Given P(E)=0.6P(E) = 0.6, P(F)=0.3P(F) = 0.3 and P(EF)=0.2P(E \cap F) = 0.2, find P(EF)P(E \mid F) and P(FE)P(F \mid E).

Step 1 — apply the formula both ways: P(EF)=0.20.3=23P(E \mid F) = \dfrac{0.2}{0.3} = \dfrac{2}{3} and P(FE)=0.20.6=13P(F \mid E) = \dfrac{0.2}{0.6} = \dfrac{1}{3}.

Answer: 23\dfrac{2}{3} and 13\dfrac{1}{3} — the two conditionals differ; the denominator is always the given event.

Example 2 — The two-children classic

A family has two children. Find the probability that both are boys, given that (i) at least one is a boy, (ii) the elder is a boy.

Step 1 — sample space: {BB,BG,GB,GG}\{BB, BG, GB, GG\}, equally likely.

Step 2 — case (i): given set {BB,BG,GB}\{BB, BG, GB\}, favourable {BB}\{BB\}: probability 13\dfrac{1}{3}.

Step 3 — case (ii): given set {BB,BG}\{BB, BG\}, favourable {BB}\{BB\}: probability 12\dfrac{1}{2}.

Answer: 13\dfrac{1}{3} and 12\dfrac{1}{2} — different information shrinks the sample space differently; this pair is the cleanest illustration of conditioning on the paper.

Example 3 — Conditioning on a dice sum

A die is thrown twice. Given that the sum is 66, find the probability that 44 appeared at least once.

Step 1 — the given event: sum =6= 6 means {(1,5),(2,4),(3,3),(4,2),(5,1)}\{(1,5), (2,4), (3,3), (4,2), (5,1)\} — five outcomes.

Step 2 — favourable inside it: (2,4)(2,4) and (4,2)(4,2).

Answer: 25\dfrac{2}{5} — count within the reduced sample space; the original 3636 never appears in the final ratio.

Example 4 — Without replacement

Two cards are drawn from a well-shuffled pack without replacement. Find the probability that both are kings.

Step 1 — multiply along the tree: P(first king)=452P(\text{first king}) = \dfrac{4}{52}, then P(second kingfirst king)=351P(\text{second king} \mid \text{first king}) = \dfrac{3}{51}.

Answer: 452351=1221\dfrac{4}{52}\cdot\dfrac{3}{51} = \dfrac{1}{221} — the multiplication rule is the tree diagram in symbols.

Example 5 — Testing independence with numbers

A die is thrown. EE = "the number is even", FF = "the number is at most 44". Are EE and FF independent?

Step 1 — the three probabilities: P(E)=12P(E) = \dfrac{1}{2}, P(F)=46=23P(F) = \dfrac{4}{6} = \dfrac{2}{3}, and EF={2,4}E \cap F = \{2, 4\} so P(EF)=13P(E \cap F) = \dfrac{1}{3}.

Step 2 — compare: P(E)P(F)=1223=13=P(EF)P(E)P(F) = \dfrac{1}{2}\cdot\dfrac{2}{3} = \dfrac{1}{3} = P(E \cap F).

Answer: independent — the product test decides, and it can surprise; always compute.

Example 6 — Union of independent events

AA and BB are independent with P(A)=0.3P(A) = 0.3 and P(B)=0.6P(B) = 0.6. Find P(AB)P(A \cup B) and P(AB)P(A \cap B').

Step 1 — union: P(AB)=0.3+0.6(0.3)(0.6)=0.72P(A \cup B) = 0.3 + 0.6 - (0.3)(0.6) = 0.72.

Step 2 — with the complement (independence passes to complements): P(AB)=P(A)P(B)=(0.3)(0.4)=0.12P(A \cap B') = P(A)P(B') = (0.3)(0.4) = 0.12.

Answer: 0.720.72 and 0.120.12.

Example 7 — At least one, via complements

A problem is given to two students who work independently. Their chances of solving it are 12\dfrac{1}{2} and 13\dfrac{1}{3}. Find the probability that (i) the problem is solved, (ii) exactly one of them solves it.

Step 1 — problem solved = at least one solves: 1P(both fail)=11223=231 - P(\text{both fail}) = 1 - \dfrac{1}{2}\cdot\dfrac{2}{3} = \dfrac{2}{3}.

Step 2 — exactly one: 1223+1213=13+16=12\dfrac{1}{2}\cdot\dfrac{2}{3} + \dfrac{1}{2}\cdot\dfrac{1}{3} = \dfrac{1}{3} + \dfrac{1}{6} = \dfrac{1}{2}.

Answer: 23\dfrac{2}{3} and 12\dfrac{1}{2} — "at least one" should trigger the complement route automatically.

Worked Examples — Total Probability, Bayes and Random Variables

Example 8 — Total probability

Bag I contains 33 red and 44 black balls; Bag II contains 55 red and 66 black. A bag is chosen at random and a ball drawn. Find the probability that it is red.

Step 1 — partition by bag: P(I)=P(II)=12P(\text{I}) = P(\text{II}) = \dfrac{1}{2}; P(RI)=37P(R \mid \text{I}) = \dfrac{3}{7}, P(RII)=511P(R \mid \text{II}) = \dfrac{5}{11}.

Step 2 — weighted average: P(R)=1237+12511=314+522=33+35154P(R) = \frac{1}{2}\cdot\frac{3}{7} + \frac{1}{2}\cdot\frac{5}{11} = \frac{3}{14} + \frac{5}{22} = \frac{33 + 35}{154}

Answer: 68154=3477\dfrac{68}{154} = \dfrac{34}{77}.

Example 9 — Bayes reverses Example 8

In the setup of Example 8, the drawn ball is red. Find the probability that it came from Bag I.

Step 1 — Bayes: P(IR)=P(I)P(RI)P(R)=3/1434/77P(\text{I} \mid R) = \dfrac{P(\text{I})\,P(R \mid \text{I})}{P(R)} = \dfrac{3/14}{34/77}.

Step 2 — simplify: 3147734=3368\dfrac{3}{14}\cdot\dfrac{77}{34} = \dfrac{33}{68}.

Answer: 3368\dfrac{33}{68} — the denominator is exactly the total probability already computed; never recompute it from scratch.

Example 10 — Bayes with machines

Machines AA and BB produce 60%60\% and 40%40\% of a factory's items; 2%2\% of AA's output and 1%1\% of BB's output is defective. An item drawn at random is defective. Find the probability it came from machine AA.

Step 1 — the two branches: P(A)P(DA)=0.6×0.02=0.012P(A)P(D \mid A) = 0.6 \times 0.02 = 0.012 and P(B)P(DB)=0.4×0.01=0.004P(B)P(D \mid B) = 0.4 \times 0.01 = 0.004.

Step 2 — Bayes: P(AD)=0.0120.012+0.004=1216P(A \mid D) = \dfrac{0.012}{0.012 + 0.004} = \dfrac{12}{16}.

Answer: 34\dfrac{3}{4} — lay out the prior-times-likelihood products first and the answer is one division.

Example 11 — Bayes against intuition

A disease affects 0.1%0.1\% of a population. A test detects it with probability 0.990.99 if present, but also gives a false positive with probability 0.0050.005 for a healthy person. Given a positive test, find the probability the person actually has the disease.

Step 1 — the two branches: diseased and positive: 0.001×0.99=0.000990.001 \times 0.99 = 0.00099; healthy and positive: 0.999×0.005=0.0049950.999 \times 0.005 = 0.004995.

Step 2 — Bayes: P(disease+)=0.000990.00099+0.004995=9905985=22133P(\text{disease} \mid +) = \frac{0.00099}{0.00099 + 0.004995} = \frac{990}{5985} = \frac{22}{133}

Answer: 221330.17\dfrac{22}{133} \approx 0.17 — a 99%99\%-accurate test, yet a positive result means the disease is still unlikely, because healthy people vastly outnumber diseased ones. Boards love asking for the interpretation sentence.

Example 12 — A probability distribution and its mean

Two fair coins are tossed. Let XX be the number of heads. Write the distribution of XX and find its mean.

Step 1 — the table: P(X=0)=14P(X = 0) = \dfrac{1}{4}, P(X=1)=12P(X = 1) = \dfrac{1}{2}, P(X=2)=14P(X = 2) = \dfrac{1}{4} (sum =1= 1).

Step 2 — mean: E(X)=014+112+214E(X) = 0\cdot\dfrac{1}{4} + 1\cdot\dfrac{1}{2} + 2\cdot\dfrac{1}{4}.

Answer: E(X)=1E(X) = 1 — exactly one head expected on average, as symmetry suggests.

Example 13 — Finding an unknown in a distribution

A random variable XX takes values 0,1,2,30, 1, 2, 3 with probabilities k,2k,3k,4kk, 2k, 3k, 4k. Find kk, P(X2)P(X \geq 2) and E(X)E(X).

Step 1 — probabilities sum to 11: k+2k+3k+4k=10k=1k + 2k + 3k + 4k = 10k = 1, so k=110k = \dfrac{1}{10}.

Step 2 — read off: P(X2)=3k+4k=710P(X \geq 2) = 3k + 4k = \dfrac{7}{10}.

Step 3 — mean: E(X)=0(k)+1(2k)+2(3k)+3(4k)=20k=2E(X) = 0(k) + 1(2k) + 2(3k) + 3(4k) = 20k = 2.

Answer: k=110k = \dfrac{1}{10}, P(X2)=710P(X \geq 2) = \dfrac{7}{10}, E(X)=2E(X) = 2 — the pi=1\sum p_i = 1 condition unlocks the whole question.