line is 20th. Same birthday as you In the birthday problem, neither of the two people is chosen in advance. By contrast, the probability that someone in a room of other people has the same birthday as a particular person (for example, you) is given by and for general by In the standard case of , substituting gives about 6.1%, which is less than 1 chance in 16. For a greater than 50% chance that one person in a roomful of people has the same birthday as you, would need to be at least 253. This number is significantly higher than : the reason is that it is likely that there are some birthday matches among the other people in the room. Number of people with a shared birthday For any one person in a group of n people the probability that he or she shares his birthday with someone else is , as explained above. The expected number of people with a shared (non-unique) birthday can now be calculated easily by multiplying that probability by the number of people (n), so it is: (This multiplication can be done this way because of the linearity of the expected value of indicator variables). This implies that the expected number of people with a non-shared (unique) birthday is: Similar formulas can be derived for the expected number of people who share with three, four, etc. other people. Number of people until every birthday is achieved The expected number of people needed until every birthday is achieved is called the Coupon collector's problem. It can be calculated by , where is the th harmonic number. For 365 possible dates (the birthday problem), the answer is 2365. Near matches Another generalization is to ask for the probability of finding at least one pair in a group of people with birthdays within calendar days of each other, if there are equally likely birthdays. The number of people required so that the probability that some pair will have a birthday separated by days or fewer will be higher than 50% is given in the following table: {| class="wikitable" style="text-align: center" ! !! for |- |0 || 23 |- |1 || 14 |- |2 || 11 |- |3 || 9 |- |4 || 8 |- |5 || 8 |- |6 || 7 |- |7 || 7 |} Thus in a group of just seven random people, it