ExplorationsWhy any matching pair is a different question from matching you

Birthday Matches in a Small Room

Provedprobabilitycombinationssamplingcurious

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 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.

365 equally likely days0 of 23 people

The room as people arrive

Person 1-Not revealed
Person 2-Not revealed
Person 3-Not revealed
Person 4-Not revealed
Person 5-Not revealed
Person 6-Not revealed
Person 7-Not revealed
Person 8-Not revealed
Person 9-Not revealed
Person 10-Not revealed
Person 11-Not revealed
Person 12-Not revealed
Person 13-Not revealed
Person 14-Not revealed
Person 15-Not revealed
Person 16-Not revealed
Person 17-Not revealed
Person 18-Not revealed
Person 19-Not revealed
Person 20-Not revealed
Person 21-Not revealed
Person 22-Not revealed
Person 23-Not revealed

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%

Group and model

Possible days

All assignments are independent and each day is equally likely. Real birthday populations need not follow this model.

Step by step

Use Step for one change you can inspect, or Run to watch the changes accumulate.

Speed

Reproducible room

Changing the seed makes a new sampled group. Its outcome does not change the theoretical probability.

Cases worth seeing

Try this

Before revealing person five, how many new pairs will that arrival create?

1/2

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.

Worked by handFor three people and three equally likely days, begin with 1 before anyone arrives, then track the chance that all birthdays stay distinct and take its complement.
  1. 11 × 3/31The first person cannot match anyone already present.
  2. 11 × 2/32/3Two of the three days avoid the first person’s date.
  3. 2/32/3 × 1/32/9If the first two dates differ, only one day avoids both.
  4. 2/91 − 2/97/9Subtracting the no-match gives the probability of at least one match.
The room view assigns day labels to people. Its matches are particular outcomes of the same model whose the working counts.
There are 27 ordered three-person assignments in this small model, and only six use all three days. The other 21 contain a match, giving 21/27 = 7/9.
01

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.

02

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 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.

03

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 . 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 from one gives the event we wanted.

04

Formal statement

Uniformity and independence belong in the statement

For to equally likely dates, with ,

For , the is one by the . 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.

05

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 . 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 , independently, giving the second formula. The test suite also enumerates small date spaces and compares their counts with the first formula.

06

Limits and further questions

A 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 ; 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.

Proved

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
Proved

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
Proved

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.

  1. The birthday problem, Solution to Week 46, Harvard University Department of Physics, 2003. Link

    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.

Connected by how they work, not by sharing a topic label.