Three rules let you combine probabilities instead of counting every outcome.
Not: the complement
P(not A) = 1 − P(A). It is often easier to find the chance that something never happens. "At least one six in four rolls" is 1 − P(no six in four rolls).
And: independent events multiply
Two events are independent when one tells you nothing about the other, like two separate dice. Then P(A and B) = P(A) × P(B). So P(no six in four rolls) = (5/6)⁴.
Or: add, then remove the overlap
P(A or B) = P(A) + P(B) − P(A and B). Adding alone counts outcomes in both events twice. Drawing one card: P(king or heart) = 4/52 + 13/52 − 1/52, because the king of hearts is in both.
from fractions import Fraction
no_six = Fraction(5, 6) ** 4
print("P(no six in 4 rolls) =", no_six)
print("P(at least one six) =", 1 - no_six, "≈", round(float(1 - no_six), 3))
king, heart, both = Fraction(4, 52), Fraction(13, 52), Fraction(1, 52)
print("P(king or heart) =", king + heart - both)Common mistakes
- Adding probabilities of events that overlap (you get more than the truth, sometimes more than 1).
- Multiplying probabilities of events that are not independent, such as two cards drawn without putting the first back. That needs conditional probability, the next lesson.
Quick check
Practice problems for this lesson
My notes
Write down what you want to remember from this lesson. Notes are saved on this device as you type, and appear on your dashboard.