How many people must be in a room before two of them probably share a birthday? Most people guess about 180. The answer is 23. The calculation uses the complement rule and the counting from probability with counting, and it shows why "at least one" questions are usually answered through their complement.
Idea clave
Por qué funciona
Why 23 is enough: matches can happen between any two people, and 23 people form $\binom{23}{2} = 253$ pairs. Each pair matches with chance $\frac{1}{365}$. Using $1 - \frac{i}{365} \approx e^{-i/365}$, the product is about $$e^{-(0 + 1 + \cdots + 22)/365} = e^{-253/365} \approx 0.50$$
| People $n$ | 5 | 10 | 20 | 23 | 30 | 40 | 50 | 57 |
|---|---|---|---|---|---|---|---|---|
| $P(\text{a shared birthday})$ | 0.027 | 0.117 | 0.411 | 0.507 | 0.706 | 0.891 | 0.970 | 0.990 |
Worked examples
Ejemplo resuelto: Birth months
- All different: $$\frac{12}{12} \cdot \frac{11}{12} \cdot \frac{10}{12} \cdot \frac{9}{12} = \frac{11880}{20736} = \frac{55}{96}$$
- At least two match: $1 - \frac{55}{96} = \frac{41}{96} \approx 0.427$.
Respuesta: $\frac{41}{96}$
Ejemplo resuelto: Matching you, or matching anyone
- Someone matches you: each of the 22 misses your birthday with probability $\frac{364}{365}$, independently, so $1 - \left(\frac{364}{365}\right)^{22} \approx 0.059$.
- Any match among the 23 people: from the table, about $0.507$.
- The second is much larger because it counts all 253 pairs, not only the 22 pairs that include you.
Respuesta: About $0.059$ against about $0.507$.
Ejemplo resuelto: How many people for a digit match?
- $n = 4$: all different with probability $\frac{10 \cdot 9 \cdot 8 \cdot 7}{10^{4}} = 0.504$, so a match has chance $0.496$.
- $n = 5$: all different with probability $0.504 \cdot \frac{6}{10} = 0.3024$, so a match has chance $0.6976$.
Respuesta: 5 people.
Error común