Unit 3 CLO 2 6 lecture hours

Probability & Bayes' Theorem

Probability is just "how many good outcomes out of all outcomes", written in the shortest way possible. Once you can see the two rules (add, multiply) as OR and AND, everything else is a variation.

The whole unit in two words

ADD for "or". MULTIPLY for "and".

Every formula in this unit is one of those two, possibly with a condition attached. If you remember nothing else, this will get you most of the marks.

1. Terminology and Definition

TermMeaning
Random experimentAn activity with an uncertain result (roll a die, draw a card)
Sample space (S)The set of all possible outcomes
Event (A)Any subset of the sample space — a collection of outcomes you care about
Favourable outcomesThe elements of the event A
P(A)Probability of A = favourable ÷ total
Complement ĀEverything except A
Certain eventP = 1 (the whole sample space)
Impossible eventP = 0 (the empty set ∅)
Equally likely outcomesNeeded for the basic formula to be valid
Classical definition (only valid when all outcomes are equally likely) P(A) = |A| / |S| = number of favourable outcomes / total number of outcomes
S — all possible outcomes A Ī = complement everything that is NOT in A P(A) = 3/8 the slice — you want this P(Ī) = 5/8 the rest of the circle Worked example: One die. Let A = {1, 2, 3}. P(A) = 3/6 = 1/2, so P(Ī) = 1/2. Two dice: the sample space has 36 outcomes, not 12 — (1,2) and (2,1) are different outcomes. P(A) + P(Ī) = 1  ·  always. This one line solves half of Unit 3.
Sample space S, with an event A cut out of it. The leftover is the complement Ā.
The complement rule — the most useful line in probability P(Ā) = 1 − P(A)    and    P(A) + P(Ā) = 1
Example — the complement trick

Question: two dice are thrown. What is the probability of getting a total of 7?

Bad way: list the 6 winning pairs. Good way:

P(total 7) = 1 − P(total ≠ 7) = 1 − 30/36 = 6/36 = 1/6

Longer question: "probability of getting at least one six in 3 throws".

P(at least one 6) = 1 − P(no sixes) = 1 − (5/6)³ = 1 − 125/216 = 91/216
91/216. Always attack "at least one" and "not" questions with the complement rule.
Trick — the phrases that beg for the complement

"at least one", "at least a", "not", "no", "none", "more than", "fewer than", "everything except", "impossible" → rewrite as 1 − P(the simpler opposite).

"Not getting a 6" is easier than "getting a 6"? Both are easy. But "at least one 6 in 10 throws" is horrible directly and trivial by complement. That is the whole point.

2. Mutually Exclusive vs Non-Mutually Exclusive

Two events are mutually exclusive if they cannot both happen at once — they share no outcome at all. Overlap = 0.

Mutually exclusive: A ∩ B = ∅ P(A ∪ B) = P(A) + P(B)   (just add)
MUTUALLY EXCLUSIVE A B no overlap → P(A∪B) = P(A)+P(B)
You cannot roll a 1 and a 6 on one die.
NOT MUTUALLY EXCLUSIVE A B A∩B overlap exists → must subtract it
You can draw a heart and a face card at once.
The single most common error in the whole course

Adding P(A) + P(B) when A and B can both happen double counts the overlap. Always ask: "can this happen twice at once?" If yes, you need the general formula.

3. Dependent vs Independent Events

DefinitionTestExample
Independent One event does not change the other's probability P(A∩B) = P(A)·P(B) Two dice. Rolling the first tells you nothing about the second.
Dependent
(conditional)
One event changes the other's probability P(A∩B) ≠ P(A)·P(B) Two cards from one deck. The first card changes what is left.
INDEPENDENT vs DEPENDENT INDEPENDENT draw a card, put it back, draw again P(ace) = 4/52 before and after P(A and B) = P(A) × P(B) = (4/52)(4/52) = 16/2704 "replace the card" → always say this in the question to signal independence DEPENDENT draw a card, DO NOT replace, draw again P(ace 2nd) = 3/51 because one ace is gone P(A and B) = P(A) × P(B | A) = (4/52)(3/51) = 12/2652 Look for "without replacement", "no putting it back", "used" — then it is dependent
Replacement is the switch that flips independence on and off. Train yourself to hunt for that word.
Trick — three questions, in order
  1. Can they happen together? Yes → not mutually exclusive, so subtract the overlap on the way in.
  2. Does the first change the second? No (replacement / separate trials) → independent, multiply the plain probabilities.
  3. Is it conditional? "Given that", "if we know", "suppose" → write P(B | A), never P(B).

4. Laws of Probability

Addition law

General (when overlap is possible) P(A ∪ B) = P(A) + P(B) − P(A ∩ B)
A only A ∩ B B only P(A) P(B) the part that gets counted twice P(A) = left + middle P(B) = right + middle sum = left + right + 2×middle ✗ subtract middle once ✓ P(A ∪ B) = P(A) + P(B) − P(A ∩ B) That is the whole reason for the minus sign. Nothing mysterious about it.
That is the whole reason for the minus sign. Nothing mysterious.
Example — two cards, overlap required

Question: two cards drawn from a 52-card deck. P(both are aces)?

Method 1 — sequential (cleanest):

P(A and B) = 4/52 × 3/51 = 12/2652 = 1/221

Method 2 — with the addition law (shows the structure):

P(1st is ace) = 4/52
P(2nd is ace) = 4/52  (the second card is a different card, so do not use 3/51 here)
P(both) = 4/52 + 4/52 − P(1st ace AND 2nd ace)
      = 8/52 − (4/52)(4/52) = 0.1538 − 0.00592 = 1/221 ✓
1/221

Multiplication law

General (conditional form) P(A ∩ B) = P(A) · P(B | A)     =     P(B) · P(A | B)
Given event: A ∪ B or A ∩ B ? either one both ADD P(A)+P(B)−P(A∩B) no minus if exclusive MULTIPLY P(A)·P(B|A) just P(A)·P(B) if independent
"or" → add. "and" → multiply. The overlap subtraction and the condition are the only refinements.

Two results that always help

(a) For a set of mutually exclusive events that fill the sample space P(A₁) + P(A₂) + … + P(Aₙ) = 1

(b) Independent events, any number of them P(A₁ ∩ A₂ ∩ … ∩ Aₙ) = P(A₁)P(A₂)…P(Aₙ)
Example — independent multi-step

Question: a coin is tossed 4 times. What is the probability of getting exactly 3 heads?

Each toss is independent. The number 3 can land in any of the 4 positions (that is ⁴C 3 = 4 — this is where Unit 2 comes back):

P = ⁴C 3 × (1/2)³ × (1/2)¹ = 4 × 1/8 × 1/2 = 4/16 = 1/4
1/4. This is exactly the binomial formula from Unit 4, derived by hand. Recognise the pattern.

5. Conditional Probability

P(A | B) = "probability of A, GIVEN that B has already happened" P(A | B) = P(A ∩ B) / P(B)     with P(B) > 0

Visually, you shrink the sample space down to B and then ask what fraction of that new space is A.

S B has happened The orange circle is now your WHOLE world. Everything outside it is impossible under B, so it no longer counts towards the total. P(A | B) = (shaded part) / (orange part) = P(A ∩ B) / P(B) You never divide by a bare P(B) in practice — always by the number of outcomes that survive the condition. Example: P(6 on die 2 | sum = 7) = 1/6, not 1/36
Conditional probability is a re-basing: the denominator becomes the new "total".
Example — conditional probability on dice

Question: two dice are thrown. Given that the sum is 8, what is P(both are even)?

Step 1 — shrink the space. Outcomes summing to 8: (2,6) (3,5) (4,4) (5,3) (6,2) → 5 outcomes.

Step 2 — count the good ones. Both even: (2,6), (4,4), (6,2) → 3 outcomes.

P(both even | sum = 8) = 3/5
3/5. Drawing the table of all 36 outcomes and crossing out the ones that cannot happen is worth 2 marks on its own.
Trick — the given-event shrink

For any conditional question, write out the new sample space in full (a small table or list), cross out everything the condition rules out, and then count. It is slower but it is almost never wrong, and it shows the examiner you understand the definition.

6. Bayes' Theorem

Bayes flips a conditional probability backwards. It answers: "I already know the test result — now what is the real chance?"

Bayes' theorem P(A | B) = P(B | A) · P(A) / P(B)
Expanded form (for computing P(B) by the addition law) P(B | A) = P(B|A)P(A) / [ P(B|A)P(A) + P(B|Ā)P(Ā) ]
BAYES FLIPS THE QUESTION AROUND GIVEN (the hard direction) "Given that the person has the disease, what is P(test positive)?" P(positive | disease) = 0.99 P(disease) = 0.01 This is easy — a straight multiply. But is it the question being asked? Bayes WANTED (the real question) "The test is positive. Does the person actually have the disease?" P(disease | positive) = 0.50 0.99 × 0.01 ──────────────────── 0.0099 + 0.99×0.99 99% accurate test, but only 50% chance!
Bayes is what makes "false positive rate" intuitive. The base rate dominates.
Full worked example — the medical test

Given: 1% of people have a disease (P(D) = 0.01). The test is 99% accurate (P(+|D) = 0.99 and P(−|D̄) = 0.99).

Step 1 — what we want.

P(D | +) = ?

Step 2 — find the pieces.

P(+|D) = 0.99   (test catches 99% of real cases)
P(−|D̄) = 0.99  →  P(+|D̄) = 0.01   (1% false alarms)
P(D) = 0.01,   P(D̄) = 0.99

Step 3 — build the total for "positive" using the addition law.

P(+) = P(+|D)P(D) + P(+|D̄)P(D̄)
      = (0.99)(0.01) + (0.01)(0.99)
      = 0.0099 + 0.0099 = 0.0198

Step 4 — divide.

P(D | +) = (0.99 × 0.01) / 0.0198 = 0.0099 / 0.0198 = 0.5 = 50%
50%. A 99%-accurate test on a rare disease does not mean you are 99% likely to be sick. The two failure modes were equally probable.
Trick — Bayes in three lines, every time
  1. Write the target P(A | B) at the top. Find the two numbers on the right that you already know.
  2. Work out the denominator P(B) by splitting B into "A part" and "not-A part" and adding: P(B) = P(B|A)P(A) + P(B|Ā)P(Ā)
  3. Divide. Never leave a bare P(B) in the denominator — the examiner is looking for that split.

Mnemonic for the pattern: "target on top, split below, divide last."

Careful with these words
  • Independent events can still overlap — two dice can both show 6. Independent and mutually exclusive are different questions, and both can be true at once.
  • P(A|B) ≠ P(B|A) except when P(A) = P(B). This is the classic trap in exams.
  • "Mutually exclusive" is a stronger claim than "independent." Two events with P = 0 are independent and mutually exclusive. Positive-probability events cannot be both.

Self-check

Open to see the answers

1. One card is drawn from a standard deck. P(a heart OR a face card)?

Hearts = 13, face cards (J,Q,K) = 12, hearts that are face cards = 3 (J,Q,K of hearts)
P = 13/52 + 12/52 − 3/52 = 22/52 = 11/26
Note the −3/52: without it you would count J♥, Q♥, K♥ twice.

2. A bag has 3 red and 5 blue. Two drawn without replacement. P(both red)?

Dependent → use conditional: (3/8) × (2/7) = 6/56 = 3/28

3. A factory: 60% of items come from machine A which makes 2% defective. Machine B makes 40%, 5% defective. A random item is defective — from which machine?

P(A ∩ def) = 0.60 × 0.02 = 0.012
P(B ∩ def) = 0.40 × 0.05 = 0.020
P(def) = 0.012 + 0.020 = 0.032
P(A | def) = 0.012 / 0.032 = 0.375 = 37.5%

4. P(A) = 0.6, P(B) = 0.5, P(A∩B) = 0.2. What is P(A or B)? Are A and B independent?

P(A∪B) = 0.6 + 0.5 − 0.2 = 0.9
Independent? P(A)P(B) = 0.6 × 0.5 = 0.30, but P(A∩B) = 0.20 → not independent