question: why the probability of two people having the same birthday in a room of 20 people is like 50%, and not far lower.
comment: The probability that two specific people in a room share a birthday is 1 in 365 (ignoring leap years). With 21 people in a room, you check each person against every other person. That's 21x20 = 420 times you check. Note each pair is repeated, so there are 210 unique pairs of people. In order for there to be no people sharing a birthday, all of those 210 pairs of people must have different birthdays. So it's far more likely that some set of two people in the room will share a birthday than two specific, predetermined people will.
passages: The probability of any two people not having the same birthday is . In a room containing "n" people, there are pairs of people, i.e. events. The probability of no two people sharing the same birthday can be approximated by assuming that these events are independent and hence by multiplying their probability together. In short can be multiplied by itself times, which gives us
  
  Since this is the probability of no one having the same birthday, then the probability of someone sharing a birthday is
  
  Section::::Approximations.:Poisson approximation.
  
  Applying the Poisson approximation for the binomial on the group of 23 people,
   It may well seem surprising that a group of just 23 individuals is required to reach a probability of 50% that two individuals in the group have the same birthday: this result is perhaps made more plausible by considering that the comparisons of birthday will actually be made between every possible pair of individuals = 23 × 22/2 = 253 comparisons, which is well over half the number of days in a year (183 at most), as opposed to fixing on one individual and comparing their birthday to everyone else's birthday.
   The birthday problem asks, for a set of randomly chosen people, what is the probability that some pair of them will have the same birthday? By the pigeonhole principle, if there are 367 people in the room, we know that there is at least one pair who share the same birthday, as there are only 366 possible birthdays to choose from (including February 29, if present). 
   Voracek, Tran and Formann showed that the majority of people markedly overestimate the number of people that is necessary to achieve a given probability of people having the same birthday, and markedly underestimate the probability of people having the same birthday when a specific sample size is given. Further results were that psychology students and women did better on the task than casino visitors/personnel or men, but were less confident about their estimates.
  
  Section::::Partition problem.
   Actual birth records show that different numbers of people are born on different days. In this case, it can be shown that the number of people required to reach the 50 percent threshold is 23 "or fewer". For example, if half the people were born on one day and the other half on another day, then any "two" people would have a 50 percent chance of sharing a birthday.
   The goal is to compute , the probability that at least two people in the room have the same birthday. However, it is simpler to calculate , the probability that no two people in the room have the same birthday. Then, because and are the only two possibilities and are also mutually exclusive, 
   Birthday problem
  
  In probability theory, the birthday problem or birthday paradox concerns the probability that, in a set of randomly chosen people, some pair of them will have the same birthday. By the pigeonhole principle, the probability reaches 100% when the number of people reaches 367 (since there are only 366 possible birthdays, including February 29). However, 99.9% probability is reached with just 70 people, and 50% probability with 23 people. These conclusions are based on the assumption that each day of the year (excluding February 29) is equally probable for a birthday.
   The birthday "paradox" refers to the result that even if the group is as small as 23 individuals, the probability that there is a pair of people with the same birthday is still above 50%. While at first glance this may seem surprising, it intuitively makes sense when considering that a comparison will actually be made between every possible pair of people rather than fixing one individual and comparing them solely to the rest of the group.
  
  Section::::Examples.:Team tournament.
   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. Note that 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.
   The equation expresses the fact that the first person has no one to share a birthday, the second person cannot have the same birthday as the first (), the third cannot have the same birthday as either of the first two (), and in general the th birthday cannot be the same as any of the preceding birthdays.
  
  The event of at least two of the persons having the same birthday is complementary to all birthdays being different. Therefore, its probability is
   Note that in the birthday problem, neither of the two people is chosen in advance. By way of 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
   According to the approximation, the same approach can be applied to any number of "people" and "days". If rather than 365 days there are , if there are persons, and if , then using the same approach as above we achieve the result that if is the probability that at least two out of people share the same birthday from a set of available days, then:
  
  Section::::Approximations.:A simple exponentiation.
   Arthur C. Clarke's novel "A Fall of Moondust", published in 1961, contains a section where the main characters, trapped underground for an indefinite amount of time, are celebrating a birthday and find themselves discussing the validity of the birthday problem. As stated by a physicist passenger: "If you have a group of more than twenty-four people, the odds are better than even that two of them have the same birthday." Eventually, out of 22 present, it is revealed that two characters share the same birthday, May 23.
  
  Section::::External links.
  
  BULLET::::- The Birthday Paradox accounting for leap year birthdays
   In an alternative formulation of the birthday problem, one asks the "average" number of people required to find a pair with the same birthday. If we consider the probability function Pr[ people have at least one shared birthday], this "average" is determining the Mean of the distribution, as opposed to the customary formulation which determines the Median. The problem is relevant to several hashing algorithms analyzed by Donald Knuth in his book "The Art of Computer Programming". It may be shown that if one samples uniformly, with replacement, from a population of size , the number of trials required for the first repeated sampling of "some" individual has expected value , where
   The following table shows the probability for some other values of (this table ignores the existence of leap years, as described above, as well as assuming that each birthday is equally likely):
  
  Leap years. If we substitute 366 for 365 in the formula for formula_3, a similar calculation shows that for leap years, the number of people required for the probability of a match to be more than 50% is also 23; the probability of a match in this case is 50.6%.
  
  Section::::Approximations.
  
  The Taylor series expansion of the exponential function (the constant )
   In deference to widely published solutions concluding that 23 is the minimum number of people necessary to have a that is greater than 50%, the following calculation of will use 23 people as an example. If one numbers the 23 people from 1 to 23, the event that all 23 people have different birthdays is the same as the event that person 2 does not have the same birthday as person 1, and that person 3 does not have the same birthday as either person 1 or person 2, and so on, and finally that person 23 does not have the same birthday as any of persons 1 through 22. Let these events respectively be called "Event 2", "Event 3", and so on. One may also add an "Event 1", corresponding to the event of person 1 having a birthday, which occurs with probability 1. This conjunction of events may be computed using conditional probability: the probability of Event 2 is 364/365, as person 2 may have any birthday other than the birthday of person 1. Similarly, the probability of Event 3 given that Event 2 occurred is 363/365, as person 3 may have any of the birthdays not already taken by persons 1 and 2. This continues until finally the probability of Event 23 given that all preceding events occurred is 343/365. Finally, the principle of conditional probability implies that is equal to the product of these individual probabilities:
   The problem is to compute an approximate probability that in a group of people at least two have the same birthday. For simplicity, variations in the distribution, such as leap years, twins, seasonal, or weekday variations are disregarded, and it is assumed that all 365 possible birthdays are equally likely. (Real-life birthday distributions are not uniform, since not all dates are equally likely, but these irregularities have little effect on the analysis.)
   The basic problem considers all trials to be of one "type". The birthday problem has been generalized to consider an arbitrary number of types. In the simplest extension there are two types of people, say men and women, and the problem becomes characterizing the probability of a shared birthday between at least one man and one woman. (Shared birthdays between two men or two women do not count.) The probability of no shared birthdays here is
  
  where and are Stirling numbers of the second kind. Consequently, the desired probability is .
   so
  
  The result is over 50% as previous descriptions. This approximation is the same as the one above based on the Taylor expansion that uses formula_17.
  
  Section::::Approximations.:Square approximation.
  
  A good rule of thumb which can be used for mental calculation is the relation
  
  which can also be written as
  
  which works well for probabilities less than or equal to . In these equations, is the number of days in a year.
  
  For instance, to estimate the number of people required for a chance of a shared birthday, we get
  
  Which is not too far from the correct answer of 23.
   It is not a coincidence that ; a similar approximate pattern can be found using a number of possibilities different from 365, or a target probability different from 50%.
  
  Section::::Other birthday problems.:Near matches.
  
  Another generalization is to ask what is the probability of finding at least one pair in a group of people with birthdays within calendar days of each other's, 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:
   Section::::Approximations.:Approximation of number of people.
  
  This can also be approximated using the following formula for the "number" of people necessary to have at least a chance of matching:
  
  This is a result of the good approximation that an event with probability will have a chance of occurring at least once if it is repeated times.
  
  Section::::Approximations.:Probability table.
   The coalescent is a mathematical model that describes the ancestry of a sample of nonrecombining gene copies.
  
  In modeling the coalescent process, time is usually considered to flow backwards from the present.
  
  In a selectively neutral population of constant size formula_6 and nonoverlapping generations (the Wright Fisher model),
  
  the expected time for a sample of two gene copies to "coalesce" (i.e., find a common ancestor) is formula_6 generations.
  
  More generally, the waiting time for two members of a sample of formula_8 gene copies to share a common ancestor is exponentially distributed, with rate
   Thus in a group of just seven random people, it is more likely than not that two of them will have a birthday within a week of each other.
  
  Section::::Other birthday problems.:Collision counting.
  
  The probability that the th integer randomly chosen from will repeat at least one previous choice equals above. The expected total number of times a selection will repeat a previous selection as such integers are chosen equals
  
  Section::::Other birthday problems.:Average number of people.
   As an example, consider the scenario in which a teacher with a class of 30 students (n = 30) asks for everybody's birthday (for simplicity, ignore leap years) to determine whether any two students have the same birthday (corresponding to a hash collision as described further). Intuitively, this chance may seem small. If the teacher picked a specific day (say, 16 September), then the chance that at least one student was born on that specific day is formula_4, about 7.9%. However, counter-intuitively, the probability that at least one student has the same birthday as "any" other student on any day is around 70% (for n = 30), from the formula formula_5.
   This variation of the birthday problem is interesting because there is not a unique solution for the total number of people . For example, the usual 50% probability value is realized for both a 32-member group of 16 men and 16 women and a 49-member group of 43 women and 6 men.
  
  Section::::Other birthday problems.
  
  Section::::Other birthday problems.:Reverse problem.
  
  For a fixed probability :
  
  BULLET::::- Find the greatest for which the probability is smaller than the given , or
  
  BULLET::::- Find the smallest for which the probability is greater than the given .
  
  Taking the above formula for we have:
  
raw_presuppositions: Sharing birthdays should be uncommon.
raw_corrections: There are a lot of chances for it to happen so it does. 