Sub topic 4
The Complement Rule and 'At Least One'
This chapter assumes you can compute a classical probability as favourable over total outcomes, and that you can use combinations such as C(n, r). Both were covered earlier in this tutorial. Here you learn the first shortcut that cuts a long counting job down to one subtraction.
The rule
The complement of an event A is the event "A does not happen". It is written A' (or "not A"). Every outcome in the sample space is either in A or in A', and never in both. So the two probabilities add up to 1:
P(A) + P(A') = 1, which gives P(A') = 1 - P(A)
The rule always holds, because A and A' split the sample space with no overlap and no gaps. It pays off when A' is much easier to describe or count than A.
Recognising when to use it
Certain phrases signal that the complement is the shorter path. The table pairs each phrase with the event you should compute first.
| Wording in the problem | Complement to compute | Answer is |
|---|---|---|
| at least one success | no successes | 1 - P(none) |
| at least k successes | at most k - 1 successes | 1 - P(at most k - 1) |
| at most k successes | at least k + 1 successes | 1 - P(at least k + 1) |
| not all are the same | all are the same | 1 - P(all same) |
| at least one of each kind | one kind is missing entirely | 1 - P(some kind missing) |
The main idea is that "at least one" covers many cases (exactly 1, exactly 2, and so on up to n), while "none" is a single case. Computing one case and subtracting beats adding up many cases.
Worked example 1: independent trials
A fair die is rolled 3 times. What is the probability of at least one six?
The complement is "no six in any roll". Each roll avoids a six with probability 5/6. The rolls are independent, so the probabilities multiply:
P(no six) = (5/6)^3 = 125/216
P(at least one six) = 1 - 125/216 = 91/216
A direct count would need cases for exactly one, two or three sixes. The complement needs one product. You can confirm the result by brute force:
from fractions import Fraction
from itertools import product
rolls = list(product(range(1, 7), repeat=3))
direct = Fraction(sum(1 for r in rolls if 6 in r), len(rolls))
by_complement = 1 - Fraction(5, 6) ** 3
print(direct, by_complement) # 91/216 91/216The same idea gives a quick answer to "how many rolls are needed for a better-than-even chance of a six?" You look for the smallest n with 1 - (5/6)^n of at least 1/2.
from fractions import Fraction
n = 1
while 1 - Fraction(5, 6) ** n < Fraction(1, 2):
n += 1
print(n) # 4After 4 rolls, (5/6)^4 = 625/1296, so the chance of at least one six is 671/1296, which is about 0.518.
Worked example 2: selecting from a group
A committee of 4 is chosen at random from 6 men and 4 women. What is the probability that it has at least one woman?
The complement is "no woman", which means all 4 members are men.
- Ways to choose 4 men from 6: C(6, 4) = 15
- Ways to choose any 4 from 10: C(10, 4) = 210
P(no woman) = 15/210 = 1/14
P(at least one woman) = 1 - 1/14 = 13/14
Going directly would mean computing four cases (1, 2, 3 or 4 women) and adding them. The complement is a single ratio.
Worked example 3: drawing without replacement
A bag has 5 red and 3 blue balls. Two balls are drawn without replacement. What is the probability that at least one is blue?
The complement is "both red":
P(both red) = C(5, 2) / C(8, 2) = 10/28 = 5/14
P(at least one blue) = 1 - 5/14 = 9/14
You can get the same value with sequential probabilities: (5/8) × (4/7) = 20/56 = 5/14. Notice that the factors change between draws because nothing is replaced. The complement idea does not care which counting method you use for P(A'). It only asks that you compute the "none" case correctly.
Worked example 4: a compound event
Three fair coins are tossed. What is the probability of getting at least one head and at least one tail?
Taking the complement of an "and" statement needs care. The event fails if at least one of its two requirements fails. That means either there is no head (all tails) or there is no tail (all heads). These two failures cannot happen together, so you can add their probabilities:
P(all heads or all tails) = 1/8 + 1/8 = 1/4
P(at least one of each) = 1 - 1/4 = 3/4
This follows a general pattern. The complement of "A and B" is "not A, or not B". The complement of "A or B" is "not A, and not B". These are De Morgan's laws.
Worked example 5: a famous case
How likely is it that, among 23 people, at least two share a birthday? Assume 365 equally likely birthdays, no leap days, and independent people.
The complement is "all 23 birthdays are different". Person 1 can have any birthday. Person 2 must avoid 1 date, person 3 must avoid 2 dates, and so on:
P(all different) = (365/365) × (364/365) × ... × (343/365)
p_all_different = 1.0
for i in range(23):
p_all_different *= (365 - i) / 365
print(round(1 - p_all_different, 4)) # 0.5073The answer is slightly above 50%. Counting directly, which means pairs, triples and overlapping groups, would be extremely hard. The complement turns it into one product. CAT questions of this type usually use small numbers, so you would not need a calculator.
Edge cases and traps
The complement rule is simple, but exam problems exploit a few predictable mistakes.
Getting the complement wrong
The most common error is negating the event incorrectly. Check each of these:
- The complement of "at least one" is "none", not "exactly one" and not "all".
- The complement of "at most 2" is "3 or more", not "2 or more".
- The complement of "all are red" is "at least one is not red", not "all are blue". "Not red" may cover more than one colour.
- The complement of "greater than 7" on a roll of two dice is "7 or less". The boundary value belongs to the complement.
A quick check is to ask whether the event and your proposed complement together cover every outcome, with no overlap. If a case is missing or counted twice, the complement is wrong.
Using it when it does not help
The complement is not always shorter. If the question asks for "exactly 2 of 4" or "exactly one", the complement is a long list of other cases. In that situation, count the event directly. A useful test is to compare the number of cases in A with the number in A'. Pick the smaller side.
Checking the answer
Because P(A) and P(A') sum to 1, you can use the rule as a sanity check. If a direct count and a complement count disagree, one has an error. Also, a probability must lie between 0 and 1. If your complement step gives a negative number, you subtracted from the wrong total or counted the "none" case too large.
Solving for the number of trials
Some CAT problems ask for the smallest n so that the chance of at least one success reaches a target. Set up 1 - q^n ≥ target, where q is the failure probability, then rearrange to q^n ≤ 1 - target. Because q is less than 1, q^n shrinks as n grows. Try values of n in turn until the inequality holds. Do not forget to round up, since n must be a whole number.
A short decision routine
- Write the event in words and look for "at least", "at most", "not all", or "both kinds".
- Write the exact negation, and check that the event and its negation cover every outcome with no overlap.
- Compare the effort: count or compute whichever of the event and its complement has fewer cases.
- Compute the probability of the easier one using the counting method that fits (combinations, or a product of sequential probabilities).
- Subtract from 1 if you computed the complement, and check that the result is between 0 and 1.
Practice
Exercise
A box holds 4 defective and 8 good bulbs. Three bulbs are picked at random without replacement. What is the probability that at least one is defective?
Show answer
The complement is that all three are good. P(all good) = C(8, 3) / C(12, 3) = 56/220 = 14/55. So P(at least one defective) = 1 - 14/55 = 41/55.
Exercise
A shooter hits a target with probability 0.3 on each independent shot. What is the smallest number of shots that gives at least a 90% chance of at least one hit?
Show answer
The chance of no hit in n shots is 0.7^n. We need 1 - 0.7^n ≥ 0.9, so 0.7^n ≤ 0.1. Now 0.7^6 ≈ 0.1176, which is too large, and 0.7^7 ≈ 0.0824, which works. So n = 7.
Exercise
Two fair dice are rolled. What is the probability that the sum is at least 3?
Show answer
The complement is a sum below 3, which means only the sum 2, from the single outcome (1, 1). P(sum = 2) = 1/36. So the probability of a sum of at least 3 is 1 - 1/36 = 35/36.
Exercise
Four fair coins are tossed. What is the probability of getting at least one head and at least one tail?
Show answer
The complement is all heads or all tails. Each has probability 1/16, and they are mutually exclusive, so the complement has probability 2/16 = 1/8. The answer is 1 - 1/8 = 7/8.