probrules() — Probability rules

Works out the chance of A or B, A and B, and if they affect each other.

P(A∪B) = P(A) + P(B) − P(A∩B)

Key idea

Definition

chance of each event
chance both happen (the overlap)
chance A or B happens

In plain words

Some kids like pizza, some like ice cream, some like both. The two circles show who likes what, and where they overlap is the "both" group.

Where you'd use it

Worked example 4

If P(A) = 0.5, P(B) = 0.4, and P(A∩B) = 0.2, then A or B happens 70% of the time, and the two are independent.

Frequently asked questions

When do I add vs multiply probabilities?
Add for OR (subtract the overlap unless mutually exclusive); multiply for AND when events are independent.
Mutually exclusive vs independent?
Exclusive = can’t both happen (overlap 0). Independent = one doesn’t affect the other. They’re different ideas.