Skip to content

Probability (Extended)

Probability (Extended Treatment)

This document extends the core probability material with rigorous treatments of conditional Probability, independence, Venn diagrams, tree diagrams, and Bayes’ theorem.

:::info Probability problems reward careful notation and clear event definitions. Always define your events Explicitly before writing any equations. :::


1. Conditional Probability

1.1 Definition

The conditional probability of event AA given that event BB has occurred is:

P(AB)=LBP(AB)RB◆◆LBP(B)RBP(A \mid B) = \frac◆LB◆P(A \cap B)◆RB◆◆LB◆P(B)◆RB◆

Provided P(B)>0P(B) \gt 0.

Interpretation. P(AB)P(A \mid B) is the probability of AA within the “reduced sample space” BB.

1.2 Multiplication rule

For any two events AA and BB:

P(AB)=P(A)P(BA)=P(B)P(AB)P(A \cap B) = P(A) \cdot P(B \mid A) = P(B) \cdot P(A \mid B)

Extension to three events:

P(ABC)=P(A)P(BA)P(CAB)P(A \cap B \cap C) = P(A) \cdot P(B \mid A) \cdot P(C \mid A \cap B)

1.3 Worked example

Problem. A bag contains 5 red and 3 blue balls. Two balls are drawn without replacement. Find The probability that both are red.

Let R1R_1 = “first ball is red”, R2R_2 = “second ball is red”.

P(R1R2)=P(R1)P(R2R1)=58×47=2056=514P(R_1 \cap R_2) = P(R_1) \cdot P(R_2 \mid R_1) = \frac{5}{8} \times \frac{4}{7} = \frac{20}{56} = \frac{5}{14}

1.4 The Law of Total Probability

If {B1,B2,,Bn}\{B_1, B_2, \ldots, B_n\} is a partition of the sample space (mutually exclusive and exhaustive), Then for any event AA:

P(A)=i=1nP(ABi)P(Bi)\boxed{P(A) = \sum_{i=1}^{n} P(A \mid B_i)\,P(B_i)}

Proof. Since the BiB_i partition Ω\Omega:

A=AΩ=A ⁣(i=1nBi)=i=1n(ABi)A = A \cap \Omega = A \cap \!\left(\bigcup_{i=1}^n B_i\right) = \bigcup_{i=1}^n (A \cap B_i)

The sets ABiA \cap B_i are mutually exclusive, so:

P(A)=i=1nP(ABi)=i=1nP(ABi)P(Bi)P(A) = \sum_{i=1}^n P(A \cap B_i) = \sum_{i=1}^n P(A \mid B_i)\,P(B_i) \quad \blacksquare

1.5 Worked example: law of total probability

Problem. In a factory, Machine AA produces 60% of items and Machine BB produces 40%. Machine AA has a defect rate of 2% and Machine BB has a defect rate of 5%. Find the probability that a Randomly selected item is defective.

Let DD = “item is defective”.

P(D)=P(DA)P(A)+P(DB)P(B)=0.02×0.6+0.05×0.4=0.012+0.020=0.032P(D) = P(D \mid A)\,P(A) + P(D \mid B)\,P(B) = 0.02 \times 0.6 + 0.05 \times 0.4 = 0.012 + 0.020 = 0.032


2. Bayes’ Theorem

2.1 Statement

Bayes’ Theorem. For events AA and BB with P(B)>0P(B) \gt 0:

P(AB)=LBP(BA)P(A)RB◆◆LBP(B)RB\boxed{P(A \mid B) = \frac◆LB◆P(B \mid A)\,P(A)◆RB◆◆LB◆P(B)◆RB◆}

Using the law of total probability in the denominator, for a partition {A1,,An}\{A_1, \ldots, A_n\}:

P(AiB)=LBP(BAi)P(Ai)RB◆◆LBj=1nP(BAj)P(Aj)RBP(A_i \mid B) = \frac◆LB◆P(B \mid A_i)\,P(A_i)◆RB◆◆LB◆\sum_{j=1}^{n} P(B \mid A_j)\,P(A_j)◆RB◆

2.2 Proof

P(AB)=LBP(AB)RB◆◆LBP(B)RB=LBP(BA)P(A)RB◆◆LBP(B)RBP(A \mid B) = \frac◆LB◆P(A \cap B)◆RB◆◆LB◆P(B)◆RB◆ = \frac◆LB◆P(B \mid A)\,P(A)◆RB◆◆LB◆P(B)◆RB◆

The first step is the definition of conditional probability. The second step applies the Multiplication rule to the numerator. \blacksquare

2.3 Worked example

Problem. A disease affects 1% of a population. A test for the disease has a 95% true positive Rate (P(positivedisease)=0.95P(\mathrm{positive} \mid \mathrm{disease}) = 0.95) and a 10% false positive rate (P(positiveno disease)=0.10P(\mathrm{positive} \mid \mathrm{no\ disease}) = 0.10). If a person tests positive, what is the Probability they actually have the disease?

Let DD = “has disease”, T+T^+ = “tests positive”.

P(DT+)=LBP(T+D)P(D)RB◆◆LBP(T+D)P(D)+P(T+D)P(D)RBP(D \mid T^+) = \frac◆LB◆P(T^+ \mid D)\,P(D)◆RB◆◆LB◆P(T^+ \mid D)\,P(D) + P(T^+ \mid D')\,P(D')◆RB◆

=LB0.95×0.01RB◆◆LB0.95×0.01+0.10×0.99RB=0.00950.0095+0.099=0.00950.10850.0876= \frac◆LB◆0.95 \times 0.01◆RB◆◆LB◆0.95 \times 0.01 + 0.10 \times 0.99◆RB◆ = \frac{0.0095}{0.0095 + 0.099} = \frac{0.0095}{0.1085} \approx 0.0876

So even with a positive test, there is only about an 8.8% chance of having the disease.

:::caution Warning This counterintuitive result arises because the disease is rare. The number of false positives far Exceeds the number of true positives. This is the base rate fallacy — ignoring the prior Probability of the condition. :::

2.4 Worked example: factory with three machines

Problem. A factory has three machines producing bolts. Machine 1 produces 50%, Machine 2 produces 30%, and Machine 3 produces 20%. Defect rates are 1%, 2%, and 3% respectively. A bolt is found to Be defective. What is the probability it came from Machine 3?

P(M3D)=LBP(DM3)P(M3)RB◆◆LBP(DM1)P(M1)+P(DM2)P(M2)+P(DM3)P(M3)RBP(M_3 \mid D) = \frac◆LB◆P(D \mid M_3)\,P(M_3)◆RB◆◆LB◆P(D \mid M_1)\,P(M_1) + P(D \mid M_2)\,P(M_2) + P(D \mid M_3)\,P(M_3)◆RB◆

=LB0.03×0.20RB◆◆LB0.01×0.50+0.02×0.30+0.03×0.20RB= \frac◆LB◆0.03 \times 0.20◆RB◆◆LB◆0.01 \times 0.50 + 0.02 \times 0.30 + 0.03 \times 0.20◆RB◆

=0.0060.005+0.006+0.006=0.0060.0170.353= \frac{0.006}{0.005 + 0.006 + 0.006} = \frac{0.006}{0.017} \approx 0.353


3. Venn Diagrams

3.1 Notation and regions

For two events AA and BBThe Venn diagram has four regions:

RegionDescriptionProbability
ABA \cap BIn both AA and BBP(AB)P(A \cap B)
ABA \cap B'In AA but not in BBP(A)P(AB)P(A) - P(A \cap B)
ABA' \cap BIn BB but not in AAP(B)P(AB)P(B) - P(A \cap B)
ABA' \cap B'In neither AA nor BB1P(AB)1 - P(A \cup B)

3.2 Worked example

Problem. In a group of 100 students, 45 study Maths, 30 study Physics, and 15 study both. A Student is chosen at random. Find: (a) the probability they study at least one subject; (b) the Probability they study Maths given they study Physics.

P(M)=0.45,P(P)=0.30,P(MP)=0.15P(M) = 0.45, \quad P(P) = 0.30, \quad P(M \cap P) = 0.15

(a) P(MP)=0.45+0.300.15=0.60P(M \cup P) = 0.45 + 0.30 - 0.15 = 0.60

(b) P(MP)=LBP(MP)RB◆◆LBP(P)RB=0.150.30=0.50P(M \mid P) = \dfrac◆LB◆P(M \cap P)◆RB◆◆LB◆P(P)◆RB◆ = \dfrac{0.15}{0.30} = 0.50

3.3 Three-event Venn diagrams

For three events AA, BB, CCThe inclusion-exclusion formula gives:

P(ABC)=P(A)+P(B)+P(C)P(AB)P(AC)P(BC)+P(ABC)P(A \cup B \cup C) = P(A) + P(B) + P(C) - P(A \cap B) - P(A \cap C) - P(B \cap C) + P(A \cap B \cap C)

3.4 Worked example: three events

Problem. In a survey, 60% of people like tea, 50% like coffee, 40% like chocolate, 30% like Tea and coffee, 25% like tea and chocolate, 20% like coffee and chocolate, and 10% like all three. What proportion likes none of these?

P(TCH)=0.6+0.5+0.40.30.250.2+0.1=0.85P(T \cup C \cup H) = 0.6 + 0.5 + 0.4 - 0.3 - 0.25 - 0.2 + 0.1 = 0.85

P(none)=10.85=0.15P(\mathrm{none}) = 1 - 0.85 = 0.15


4. Tree Diagrams

4.1 Structure

A tree diagram represents a sequence of events. Each branch represents a possible outcome with its Probability. The probability of any path through the tree is the product of the probabilities along That path.

4.2 Rules

  1. The probabilities on branches from any single node must sum to 1.
  2. The probability of an outcome is the product of probabilities along the path to that outcome.
  3. To find the probability of a compound event, add the probabilities of all paths leading to that event.

4.3 Worked example: two-stage selection

Problem. A box contains 7 red and 5 green counters. Two counters are drawn at random without Replacement. Find the probability that: (a) both are the same colour; (b) exactly one is red.

(a) P(both red)=712×611=42132=722P(\mathrm{both\ red}) = \dfrac{7}{12} \times \dfrac{6}{11} = \dfrac{42}{132} = \dfrac{7}{22}

P(both green)=512×411=20132=533P(\mathrm{both\ green}) = \dfrac{5}{12} \times \dfrac{4}{11} = \dfrac{20}{132} = \dfrac{5}{33}

P(same colour)=722+533=21+1066=3166P(\mathrm{same\ colour}) = \dfrac{7}{22} + \dfrac{5}{33} = \dfrac{21 + 10}{66} = \dfrac{31}{66}

(b) P(one red)=712×511+512×711=35132+35132=70132=3566P(\mathrm{one\ red}) = \dfrac{7}{12} \times \dfrac{5}{11} + \dfrac{5}{12} \times \dfrac{7}{11} = \dfrac{35}{132} + \dfrac{35}{132} = \dfrac{70}{132} = \dfrac{35}{66}

4.4 Worked example: with replacement

Problem. Two dice are rolled. Find the probability that the sum is at least 9, given that the First die shows at least 4.

Let AA = “sum 9\geq 9” and BB = “first die 4\geq 4”.

P(B)=36=12P(B) = \frac{3}{6} = \frac{1}{2}

P(AB):First die=4:need second5    2 outcomesP(A \cap B): \mathrm{First\ die} = 4: \mathrm{need\ second} \geq 5 \implies 2\ \mathrm{outcomes}

First die=5:need second4    3 outcomes\mathrm{First\ die} = 5: \mathrm{need\ second} \geq 4 \implies 3\ \mathrm{outcomes}

First die=6:need second3    4 outcomes\mathrm{First\ die} = 6: \mathrm{need\ second} \geq 3 \implies 4\ \mathrm{outcomes}

P(AB)=2+3+436=936=14P(A \cap B) = \frac{2 + 3 + 4}{36} = \frac{9}{36} = \frac{1}{4}

P(AB)=LBP(AB)RB◆◆LBP(B)RB=1/41/2=12P(A \mid B) = \frac◆LB◆P(A \cap B)◆RB◆◆LB◆P(B)◆RB◆ = \frac{1/4}{1/2} = \frac{1}{2}


5. Independence

5.1 Definition

Events AA and BB are independent if and only if:

P(AB)=P(A)P(B)P(A \cap B) = P(A) \cdot P(B)

Equivalently: P(AB)=P(A)P(A \mid B) = P(A)Or P(BA)=P(B)P(B \mid A) = P(B).

Interpretation. Knowing that BB occurred provides no information about whether AA occurred.

5.2 Pairwise vs mutual independence

For three events AA, BB, CC:

  • Pairwise independence means each pair is independent.
  • Mutual independence means pairwise independence and P(ABC)=P(A)P(B)P(C)P(A \cap B \cap C) = P(A)\,P(B)\,P(C).

Mutual independence is a stronger condition. Pairwise independence does not imply mutual Independence.

5.3 Worked example

Problem. Events AA and BB are independent with P(A)=0.4P(A) = 0.4 and P(B)=0.7P(B) = 0.7. Find: (a) P(AB)P(A \cap B); (b) P(AB)P(A \cup B); (c) P(AB)P(A \mid B); (d) P(AB)P(A' \cap B').

(a) P(AB)=0.4×0.7=0.28P(A \cap B) = 0.4 \times 0.7 = 0.28

(b) P(AB)=0.4+0.70.28=0.82P(A \cup B) = 0.4 + 0.7 - 0.28 = 0.82

(c) P(AB)=P(A)=0.4P(A \mid B) = P(A) = 0.4 (by independence)

(d) P(AB)=P((AB))=10.82=0.18P(A' \cap B') = P((A \cup B)') = 1 - 0.82 = 0.18

Note: P(AB)=P(A)P(B)=0.6×0.3=0.18P(A' \cap B') = P(A') \cdot P(B') = 0.6 \times 0.3 = 0.18 confirms the complements are Also independent.

5.4 Theorem: complements of independent events are independent

Theorem. If AA and BB are independent, then AA' and BB' are also independent.

Proof.

P(AB)=P((AB))=1P(AB)=1P(A)P(B)+P(A)P(B)P(A' \cap B') = P((A \cup B)') = 1 - P(A \cup B) = 1 - P(A) - P(B) + P(A)P(B)

=(1P(A))(1P(B))=P(A)P(B)= (1 - P(A))(1 - P(B)) = P(A') \cdot P(B') \quad \blacksquare

:::caution Warning “Independent” and “mutually exclusive” are different concepts. In fact, if AA and BB are both Non-trivial (positive probability) and mutually exclusive, they cannot be independent: P(AB)=0P(A)P(B)P(A \cap B) = 0 \neq P(A)P(B).


6. Practice Problems

Problem 1

In a class of 40 students, 25 play football, 18 play cricket, and 5 play neither. A student is Chosen at random. Given that they play football, find the probability they also play cricket.

Solution

P(F) = 25/40 = 0.625$$P(C) = 18/40 = 0.45$$P(F \cup C) = 35/40 = 0.875.

P(FC)=0.625+0.450.875=0.20P(F \cap C) = 0.625 + 0.45 - 0.875 = 0.20.

P(CF)=0.20/0.625=0.32P(C \mid F) = 0.20 / 0.625 = 0.32.

Problem 2

A test for a condition has sensitivity 92% (true positive rate) and specificity 96% (true negative Rate). The condition prevalence is 3%. Find: (a) P(conditionpositive)P(\mathrm{condition} \mid \mathrm{positive}); (b) P(conditionnegative)P(\mathrm{condition} \mid \mathrm{negative}).

Solution

P(T^+ \mid C) = 0.92$$P(T^- \mid C') = 0.96$$P(C) = 0.03.

(a) P(CT+)=LB0.92×0.03RB◆◆LB0.92×0.03+0.04×0.97RB=0.02760.0276+0.0388=0.02760.06640.416P(C \mid T^+) = \dfrac◆LB◆0.92 \times 0.03◆RB◆◆LB◆0.92 \times 0.03 + 0.04 \times 0.97◆RB◆ = \dfrac{0.0276}{0.0276 + 0.0388} = \dfrac{0.0276}{0.0664} \approx 0.416

(b) P(CT)=LB0.08×0.03RB◆◆LB0.08×0.03+0.96×0.97RB=0.00240.0024+0.9312=0.00240.93360.00257P(C \mid T^-) = \dfrac◆LB◆0.08 \times 0.03◆RB◆◆LB◆0.08 \times 0.03 + 0.96 \times 0.97◆RB◆ = \dfrac{0.0024}{0.0024 + 0.9312} = \dfrac{0.0024}{0.9336} \approx 0.00257

Problem 3

Events AA and BB are independent with P(A)=13P(A) = \dfrac{1}{3} and P(AB)=34P(A \cup B) = \dfrac{3}{4}. Find P(B)P(B).

Solution

P(AB)=P(A)+P(B)P(A)P(B)P(A \cup B) = P(A) + P(B) - P(A)P(B).

34=13+P(B)13P(B)\dfrac{3}{4} = \dfrac{1}{3} + P(B) - \dfrac{1}{3}P(B).

3413=23P(B)\dfrac{3}{4} - \dfrac{1}{3} = \dfrac{2}{3}P(B).

512=23P(B)    P(B)=58\dfrac{5}{12} = \dfrac{2}{3}P(B) \implies P(B) = \dfrac{5}{8}.

Problem 4

A bag contains 4 red, 6 green, and 5 blue balls. Three balls are drawn without replacement. Find The probability that they are all different colours.

Solution

Total balls =15= 15. Ways to draw one of each colour:

Number of ways =(41)(61)(51)=120= \binom{4}{1}\binom{6}{1}\binom{5}{1} = 120.

Total ways to draw 3 from 15 =(153)=455= \binom{15}{3} = 455.

P=120455=24910.264P = \dfrac{120}{455} = \dfrac{24}{91} \approx 0.264.

Alternatively, using conditional probability:

P=415×614×513×6=7202730=2491P = \dfrac{4}{15} \times \dfrac{6}{14} \times \dfrac{5}{13} \times 6 = \dfrac{720}{2730} = \dfrac{24}{91}.

(The factor of 6 accounts for the 3!=63! = 6 orderings of the three colours.)

Common Pitfalls

  1. Misreading the question, particularly with ‘hence’ vs ‘hence or otherwise’ — the former requires using previous work.

  2. Confusing the domain and range of functions, or not considering restrictions (e.g., denominator cannot be zero).

  3. Dropping negative signs during algebraic manipulation — substitute back to verify your answer.

  4. Losing marks by not showing sufficient working — always write out each step, especially in proof questions.

Worked Examples

Example 1: Bayes’ Theorem

Problem. A disease affects 1% of the population. A test has 95% sensitivity (P(+disease)=0.95P(\text{+}|\text{disease}) = 0.95) and 90% specificity (P(-no disease)=0.90P(\text{-}|\text{no disease}) = 0.90). Find the probability a person has the disease given a positive test.

Solution. By Bayes’ theorem:

P(D+)=P(+D)P(D)P(+D)P(D)+P(+Dc)P(Dc)=0.95×0.010.95×0.01+0.10×0.99P(D|+) = \frac{P(+|D)P(D)}{P(+|D)P(D) + P(+|D^c)P(D^c)} = \frac{0.95 \times 0.01}{0.95 \times 0.01 + 0.10 \times 0.99}

P(D+)=0.00950.0095+0.099=0.00950.10850.0876P(D|+) = \frac{0.0095}{0.0095 + 0.099} = \frac{0.0095}{0.1085} \approx 0.0876

Despite the positive test, there is only an 8.8% chance of having the disease, due to the low prevalence.

\blacksquare

Example 2: Conditional Probability and Tree Diagrams

Problem. Bag A contains 4 red and 6 blue balls. Bag B contains 7 red and 3 blue balls. A fair die is rolled: if it shows 1 or 2, a ball is drawn from Bag A; otherwise from Bag B. Find the probability the ball is red, and the probability Bag A was chosen given the ball is red.

Solution. P(A)=26=13P(A) = \frac{2}{6} = \frac{1}{3}, P(B)=23P(B) = \frac{2}{3}.

P(RA)=410=0.4P(R|A) = \frac{4}{10} = 0.4, P(RB)=710=0.7P(R|B) = \frac{7}{10} = 0.7.

P(R)=P(RA)P(A)+P(RB)P(B)=0.4×13+0.7×23=0.4+1.43=1.83=0.6P(R) = P(R|A)P(A) + P(R|B)P(B) = 0.4 \times \frac{1}{3} + 0.7 \times \frac{2}{3} = \frac{0.4 + 1.4}{3} = \frac{1.8}{3} = 0.6.

P(AR)=P(RA)P(A)P(R)=0.4×130.6=0.13330.60.222P(A|R) = \frac{P(R|A)P(A)}{P(R)} = \frac{0.4 \times \frac{1}{3}}{0.6} = \frac{0.1333}{0.6} \approx 0.222

\blacksquare

Summary

  • P(AB)=P(AB)P(B)P(A|B) = \frac{P(A \cap B)}{P(B)}; multiplication rule: P(AB)=P(AB)P(B)P(A \cap B) = P(A|B)P(B).
  • Independence: AA and BB are independent iff P(AB)=P(A)P(B)P(A \cap B) = P(A)P(B).
  • Bayes’ theorem: P(AB)=P(BA)P(A)P(B)P(A|B) = \frac{P(B|A)P(A)}{P(B)} inverts conditional probabilities.
  • Total probability: P(B)=P(BAi)P(Ai)P(B) = \sum P(B|A_i)P(A_i) partitions the sample space.
  • Tree diagrams organise multi-stage probability calculations systematically.

:::