Randomness and probability
Random phenomena, the law of large numbers, three kinds of probability, the probability rules (complement, addition, multiplication), disjoint versus independent events, conditional probability, joint and marginal probabilities in a contingency table, and probability trees.
Textbook: Ch. 5 (without 5.9, Bayes' rule) · Sessions: Module 5, lecture 7, tutorial 7 · About 60 minutes
Random phenomena and the law of large numbersNeutral
A random phenomenon has outcomes we cannot predict one by one, but that show a regular pattern in the long run. Each attempt is a trial, each result an outcome, a set of outcomes an event, and the set of all possible outcomes the sample space S.
The law of large numbers: when trials are independent, the relative frequency of an event settles down to its probability as the number of trials grows. It says nothing about the short run: after five tails a fair coin is not "due" for heads (that mistaken belief is the gambler's fallacy).
| Kind of probability | Where it comes from | Example |
|---|---|---|
| Empirical | long-run relative frequency | 35,000 of 100,000 applicants qualified, so P ≈ 0.35 |
| Theoretical (model based) | equally likely outcomes: favourable / total | P(rolling a 4) = 1/6 |
| Personal (subjective) | a degree of belief | the chance that gold ends next year above some price |
The probability rulesImportant
| Rule | Formula | Condition |
|---|---|---|
| Range | 0 ≤ P(A) ≤ 1 | always |
| Total | P(S) = 1 | always |
| Complement | P(not A) = 1 − P(A) | always |
| Addition, disjoint events | P(A or B) = P(A) + P(B) | A and B cannot happen together |
| General addition | P(A or B) = P(A) + P(B) − P(A and B) | always |
| Multiplication, independent events | P(A and B) = P(A) × P(B) | A and B independent |
| General multiplication | P(A and B) = P(A) × P(B | A) | always |
At least one sale
A salesperson visits four customers. Each buys with probability 0.30, independently of the others. What is the probability of at least one sale?
Complement
No sale at one visit
No sale at all four (independent)
Answer
About a 76% chance of at least one sale. "At least one" is almost always quickest through the complement.
Conditional probability and independenceImportant
P(B | A) is the probability of B given that A has happened: the sample space shrinks to the cases in A. Events A and B are independent when knowing that A happened does not change the probability of B: P(B | A) = P(B), which is the same as P(A and B) = P(A) × P(B).
Newsletter readers and app users
Among a shop's customers, 35% read the newsletter (A), 50% use the app (B) and 20% do both.
Either one
Neither
App use among readers
Independence check
Newsletter readers use the app more often (57%) than customers in general (50%). The rules lab checks any three numbers.
Contingency tables and probability treesImportant
A contingency table of counts turns into probabilities by dividing by the grand total. A cell gives a joint probability P(A and B), a row or column total a marginal probability, and a cell divided by its row or column total a conditional probability, exactly the total, row and column percentages of chapter 2.
A probability tree lays out events in stages. The first branches carry P(A) and P(not A); the next branches carry conditional probabilities such as P(B | A). Multiply along a path for the joint probability (general multiplication rule) and add the paths that end in the same event.
A quality check
8% of parts are faulty (A). The automatic check flags 85% of faulty parts and wrongly flags 10% of good parts (B = flagged). What share of the flagged parts is actually faulty?
Paths into "flagged"
P(flagged)
Reverse the condition
Only 42.5% of flagged parts are faulty, because good parts are so much more common. This needs nothing beyond the tree and the definition of conditional probability.
Key takeaways
- Law of large numbers: long-run relative frequency approaches the probability.
- Complement: P(not A) = 1 − P(A); use it for "at least one".
- General addition: subtract P(A and B).
- General multiplication: P(A and B) = P(A) P(B | A).
- Independent: P(B | A) = P(B). Disjoint events are never independent (unless a probability is 0).
- Trees: multiply along a path, add paths with the same end.
Multiple choice (10)
P(A) = 0.4. P(not A) is...
P(A) = 0.5, P(B) = 0.3, P(A and B) = 0.1. P(A or B) =
With the same numbers, P(B | A) =
With the same numbers, are A and B independent?
Two independent machines each fail on a day with probability 0.05. P(both fail) =
Same machines: P(at least one fails) =
Two events with P(A) = 0.3 and P(B) = 0.4 are disjoint. Then...
A test detects a condition in 90% of users; 12% of non-users also test positive; 8% use. P(positive) =
Continuing: P(user | positive) is about...
After eight reds in a row on a fair roulette wheel, the chance of black on the next spin...
Exam-style open questions (2)
Probabilities from a contingency table
Of 400 employees, 160 are in sales; 100 of the sales staff and 90 of the other staff have a company car. Find P(car), P(car | sales) and decide whether "car" and "sales" are independent.
Show the worked outline
- Cars: 100 + 90 = 190; P(car) = 190/400 = 0.475.
- P(car | sales) = 100/160 = 0.625.
- 0.625 differs from 0.475, so having a car depends on working in sales.
A probability tree
A firm buys 60% of a component from supplier X and 40% from supplier Y. 3% of X's parts and 6% of Y's parts are defective. Find P(defective) and P(Y | defective).
Show the worked outline
- Paths: X and defective 0.6 × 0.03 = 0.018; Y and defective 0.4 × 0.06 = 0.024.
- P(defective) = 0.042.
- P(Y | defective) = 0.024/0.042 ≈ 0.571.
LabProbability rules lab
The default numbers are the newsletter example.
LabProbability tree lab
The default numbers are the quality check example.