ExplorationsWhy any matching pair is a different question from matching you
Birthday Matches in a Small Room
Add people to a room and compare their birthdays, looking for any two with the same date. If each person independently receives one of 365 equally likely dates, 23 people give a little over a 50% chance of a matching pair. The model probabilityDefinition: Probability measures how strongly an outcome is expected within a specified random model. describes repeated groups, not a guarantee that a particular room contains a match.
Current view: The room
Reveal each person’s day and mark the repeats that actually occur in this seeded group.
The room as people arrive
P(any match) = 0.00%
There are no pairs to compare before anyone arrives.
- day label
- the simulated birthday assigned to one person
- match
- two or more revealed people share this day
Each card is one person and its number is an assigned day, not an age. Cards sharing a day are explicitly marked as matches. Empty places are not yet revealed; a matching room is one outcome, not a probability estimate.
The room is empty. Each step adds one person with an independently assigned, equally likely day; the model probability and the sampled room are kept separate.
- Possible pairs
- 0
- Matching pairs in this room
- 0
- Any-match probability
- 0.00%
Cases worth seeing
Try this
Before revealing person five, how many new pairs will that arrival create?
What is going on
Each explanation begins with a worked example and follows the same operation through intuition, formal statements and proofs. Later sections distinguish what is established from questions that remain open, so you can follow the level of detail useful to you.
- 11 × 3/31The first person cannot match anyone already present.
- 11 × 2/32/3Two of the three days avoid the first person’s date.
- 2/32/3 × 1/32/9If the first two dates differ, only one day avoids both.
- 2/91 − 2/97/9Subtracting the no-match probabilityDefinition: Probability measures how strongly an outcome is expected within a specified random model. gives the probability of at least one match.
What you are seeing
A person brings a day label into the room
Each card represents a person whose birthday is assigned to one of the possible days. Run adds people gradually; Step lets you inspect each arrival. When a day label repeats, every revealed card with that label is marked as a match. The room starts empty so the first comparisons remain visible.
The usual version uses 365 dates, with no leap day, and makes every date equally likely. The seven-day setting is a deliberately smaller model, not a week-long year. The seed makes the simulated assignments repeatable, so a shared link reproduces the same group.
Why it starts to make sense
Every arrival creates more than one possible comparison
The second person creates one pair. The third creates two more, because they can match either earlier person. By the time there are 23 people, there are 23 × 22 / 2 = 253 possible pairs. The question concerns a match in any one of them, not just a match to a person selected in advance.
Pair counting explains why the chance grows quickly, but dividing 253 by 365 does not give the probabilityDefinition: Probability measures how strongly an outcome is expected within a specified random model. of at least one match. That quotient is the expected number of matching pairs. A single room can contribute several pairs, so expected pair count and match probability differ.
The key idea
Count the outcome that is easier to describe
Instead of counting all the ways a match could occur, count the ways everyone could have a different day. The first person has all 365 dates available. If they remain distinct, the second must avoid one date, the third must avoid two, and each later arrival has fewer unused dates.
These are conditional probabilitiesDefinition: Conditional probability is the chance of an event when some other event is known to have happened.. We multiply them along the path where no previous match has occurred. We are not asserting that all the pair comparisons are mutually independent. Subtracting the resulting no-match probabilityDefinition: Probability measures how strongly an outcome is expected within a specified random model. from one gives the event we wanted.
Formal statement
Uniformity and independence belong in the statement
For independent assignmentsDefinition: Two events are statistically independent when the probability that both occur equals the product of their individual probabilities. to equally likely dates, with ,
For , the probabilityDefinition: Probability measures how strongly an outcome is expected within a specified random model. is one by the pigeonhole principleDefinition: If more objects than boxes are placed into those boxes, at least one box must contain more than one object.. For zero or one person it is zero. If the question instead asks whether anyone else matches the first person in the group, then
At and , these are approximately 50.73% and 5.86%. The two curves describe different events under the same model, so there is no contradiction between them.
Proof
An ordered counting argument checks the conditional calculation
There are ordered assignments of dates to distinguishable people. Under the stated model they all have equal probabilityDefinition: Probability measures how strongly an outcome is expected within a specified random model.. If , precisely assignments have distinct dates: choose any date for the first person, any unused one for the second, and continue. Dividing by gives the no-match product.
For a match to the first person, condition on their assigned day. Each of the other people avoids that particular date with probabilityDefinition: Probability measures how strongly an outcome is expected within a specified random model. , independently, giving the second formula. The test suite also enumerates small date spaces and compares their counts with the first formula.
Limits and further questions
A probabilityDefinition: Probability measures how strongly an outcome is expected within a specified random model. model is not a guarantee about one group
A 23-person room can have no match even though the model chance exceeds one half. That outcome does not refute the formula, and one room with a match does not verify it. The formula is proved by counting, not inferred from the visible room.
Real birthday dates are not perfectly uniform, and some groups contain dependence, for example twins. Applying the formula to those populations requires considering those assumptions. The page displays at most 80 people and shows rounded probabilitiesDefinition: Probability measures how strongly an outcome is expected within a specified random model.; it does not estimate a real population distribution or claim the seed is a source of truly random birthdays.
What is actually established
Every statement on this page, with its status, its exact scope, and the date that status was last checked.
The probability of at least one match is one minus the product of the successive distinct-day probabilities.
- Scope
- n independent assignments to d equally likely days; for n ≤ d, P(match) = 1 − ∏ from i = 0 to n − 1 of (1 − i/d), and for n > d it is 1.
- Why
- Conditional on all previous dates being distinct, person i + 1 avoids them with probability (d − i)/d. Multiplying the conditional probabilities gives the complement event. Pair-match events must not all be treated as mutually independent.
- Status checked
With 365 possible dates, 23 is the first group size whose match probability exceeds one half.
- Scope
- The independent uniform 365-day model, not an empirical population.
- Why
- The formula gives approximately 47.57% for 22 people and 50.73% for 23, and match probability increases with group size. The displayed decimals are rounded.
- Status checked
More people than possible days guarantees at least one shared day.
- Scope
- Any assignment of n people to d days with n > d, even without uniformity or independence.
- Why
- If no day held two people, at most d people could have been assigned. This is the pigeonhole principle.
- Status checked
Sources
Review notes show which bibliographic details Mathomaly has checked and which remain unresolved. Checking a publication record does not independently verify its proof.
University-hosted solution deriving the probability of no repeated birthday and discussing the assumptions. The formula is derived again on this page and checked by enumerating small sample spaces.
Bibliographic record checked. This is not an independent verification of the proof.
Bibliographic review:
AI-assisted bibliographic audit. Evidence type: source text.
University PDF confirms Week 46, 28 July 2003, title and probability formula.
Related by mechanism
Connected by how they work, not by sharing a topic label.