Compute simple and combined probabilities with the complement, addition and multiplication rules.
Why this matters
Probability is the language statistics uses to talk about uncertainty. A quality engineer asks how likely a batch is to contain a defect, an actuary prices the chance of a claim, a data scientist estimates how often a model is wrong. You do not need advanced math for most of it. Four rules, applied carefully, cover a surprising amount of real work.
The basics
An experiment is anything with an uncertain result: rolling a die, testing a part, a customer visiting a page. The sample space is the set of all possible outcomes. An event is a set of outcomes you care about.
When all outcomes are equally likely:
P(event) = (number of outcomes in the event) / (total number of outcomes)
Rolling a fair six-sided die, P(even) = 3/6 = 0.5, because {2, 4, 6} are three of six outcomes.
Probabilities are always between 0 (impossible) and 1 (certain). You can write them as fractions, decimals or percents: 1/4 = 0.25 = 25%.
When outcomes are not equally likely, use relative frequency: the share of times the event happened in a long record. If 37 of the last 1,000 shipped units were returned, P(return) is about 0.037.
Rule 1: the complement
The probability that an event does not happen is one minus the probability that it does.
P(not A) = 1 - P(A)
This is often the easy way in. "What is the chance of at least one defect in 3 parts?" is hard directly but easy as 1 − P(no defects).
Rule 2: addition (A or B)
P(A or B) = P(A) + P(B) - P(A and B)
You subtract P(A and B) because outcomes in both events were counted twice.
Worked example: draw one card from a standard 52-card deck. What is P(heart or king)?
P(heart) = 13/52
P(king) = 4/52
P(heart and king) = 1/52 (the king of hearts)
P(heart or king) = 13/52 + 4/52 - 1/52 = 16/52 ≈ 0.308
If two events cannot both happen (they are mutually exclusive), P(A and B) = 0 and the rule becomes plain addition. Rolling a 1 or a 6 on one die: 1/6 + 1/6 = 1/3.
Rule 3: multiplication for independent events (A and B)
Two events are independent when one happening does not change the probability of the other. Separate coin flips, separate dice, parts from a stable process.
P(A and B) = P(A) * P(B) (independent events only)
Worked example: a process makes 2% defective parts, independently. Pick 3 parts.
P(no defect in one part) = 0.98
P(no defects in 3 parts) = 0.98 * 0.98 * 0.98 ≈ 0.941
P(at least one defect) = 1 - 0.941 = 0.059
That combines the multiplication rule with the complement rule, the most common pattern in practice.
Rule 4: dependent events
If events are not independent, multiply by the probability of the second event given the first:
P(A and B) = P(A) * P(B given A)
Draw two cards without putting the first back. P(both aces) = 4/52 × 3/51 ≈ 0.0045, because after one ace is gone only 3 aces remain among 51 cards. The next lesson is all about this "given" idea.
Checking with simulation
When a calculation feels slippery, simulate it. Python's random module with a fixed seed gives the same "random" results every run, which makes results reproducible:
import random
random.seed(42)
trials = 100_000
hits = 0
for _ in range(trials):
a, b = random.randint(1, 6), random.randint(1, 6)
if a == 6 or b == 6:
hits += 1
print(hits / trials) # close to 11/36 ≈ 0.306
The exact answer: P(at least one six in two rolls) = 1 − (5/6)² = 11/36 ≈ 0.306. The simulation agrees to two or three decimal places, and more trials bring it closer.
Common mistakes
- Adding probabilities of events that overlap without subtracting the overlap.
- Multiplying probabilities of events that are not independent.
- Treating "three heads in a row" as making tails "due". Independent flips have no memory: this is the gambler's fallacy.
- Getting a probability above 1 or below 0. That is always a sign of an error.
Quick recap
- Equally likely outcomes: favourable / total.
- Complement: P(not A) = 1 − P(A).
- Addition: P(A or B) = P(A) + P(B) − P(A and B).
- Multiplication: P(A and B) = P(A) × P(B) when independent; otherwise use P(B given A).
- Simulate with a fixed seed to check your reasoning.
Try it
In the Do tab, write the addition rule and compare it with a simulation.