Count, then divide
When every outcome is equally likely, a probability is a ratio of counts: . Most counting questions reduce to four building blocks.
| Situation | Count |
|---|---|
| Ordered, from , with repetition | |
| Ordered, from , no repetition | |
| Unordered, from , no repetition | |
| Unordered, from , with repetition |
The multiplication principle glues them together: if a choice is made in stages, and stage has options whatever happened before, the total is .
Arranging objects where there are identical copies of one kind, of another and so on gives the multinomial coefficient .
Worked example
a full house
You are dealt 5 cards from a standard 52-card deck. What is the probability of a full house (three cards of one rank and two of another)?
Show solutionHide solution
Build the hand in stages. Choose the rank of the triple (13 ways) and its three suits (). Choose a different rank for the pair (12 ways) and its two suits ():
There are hands, so , about 1 in 694.
Note that the triple's rank and the pair's rank play different roles, so we use rather than .
The complement is often easier
"At least one" questions are usually solved through "none". For people with uniform birthdays,
using . The exponent counts the pairs, each matching with probability . That is why matches appear so quickly: the number of pairs grows like .
Worked example
someone shares your birthday
How many other people do you need before there is a better-than-even chance that at least one of them shares your birthday?
Show solutionHide solution
Now each person matches a fixed day with probability , independently. We need , i.e.
so . Compare this with the classic birthday problem: there, any of the pairs can match, so far fewer people are needed.
Stars and bars
The number of ways to write as an ordered sum of non-negative integers, , is
Picture stars and bars in a row: each arrangement splits the stars into groups. For positive integers, give each variable one star first, leaving .
Stars and bars counts multisets, which are generally not equally likely. Three dice are 3 stars in 6 bins, so there are possible multisets of faces, but has probability while has . Use it to count, not to assign probabilities.
Inclusion–exclusion
For events ,
The classic application is derangements, permutations with no fixed point. With = "element is fixed", the intersection of any of them has probability , and there are such intersections, so
The count of derangements is , giving , , .
Knowledge check
How many distinct arrangements are there of the letters in MISSISSIPPI?
Knowledge check
How many solutions does have in non-negative integers?
Knowledge check
Five people put their coats in a pile and each takes one back at random. What is the probability that nobody gets their own coat?
Practice problems
Finished reading?
Answer the 3 knowledge checks to complete this lesson (0 done).