A complement event contains every outcome excluded from an event A. Its probability is P(Aᶜ) = 1 − P(A), making it useful when the inverse event is easier to calculate. section 3.2.1
Use the complement rule to simplify probability calculations:
- Identify the desired event and its complement. section 3.2.1
- Calculate the complement, often with the multiplication rule for repeated independent outcomes. section 3.2.1
- Subtract the complement probability from 1 to obtain the desired probability. section 3.2.1 section 3.2.3
At least one four in two dice rolls
Instead of adding the cases containing one or two fours, calculate the complement: neither die shows a four, with probability (5/6)² = 25/36. Therefore, P(at least one four) = 1 − 25/36 = 11/36, or about 31%. A short calculation gives the complement probability as approximately 69.44%. section 3.2.1
>>> probability_not_4_both = pow(probability_not_4, 2)
Computes the probability that neither of two dice shows a four by squaring the single-roll complement probability. section 3.2.1
