How to calculate the chance of two persons sharing the same birthday I am reading a book and they state that "in a group of 23 people, the probability is 50.7% that two people share the same birthday"
How can this be?
Could somebody point to me how to calculate the 50.7% figure?
Many thanks in advance 
 A: We let $S$ be a set of $N$ people and let $B$ be the set of dates in a year.
Let us then create the birthday function $b: S \longmapsto B$ which states that everyone in $S$ has a unique birthday provided that our function is injective.
Once we have all this figured out, we wish to consider how many functions and how many injective functions that exist between $S$ and $B$. Since we have $|S| = N$ and $|B| = 365$ we can easily see that there are $365^{N}$ possible functions and thus $\frac{365!}{(365-N)!}$ injective functions.
Now, let us go into some actual probability. We define a statement $X$ to: "Everyone in the set $S$ has a unique birthday". What is then the probability that everyone in our set $S$ has a unique birthday? $$ P(A) = \frac{365!}{365^{N}(365-N)!}$$
Does this remind you of anything? Right, it is the the injective functions divided by all possible functions. As you remember everyone in $S$ only has a unique birthday provided that our function is injective.
However, we wish to declare another statement, namely $A'$ which is the statement that there is not only one person assigned to each birthdate. 
Thus, $$ P(A') = 1-P(A)$$ and you can simply replace $P(A)$ with our previous equation and then solve for $n = 23$ and you'll see that $P(A')$ will be approximately $50,7$ percent.


*

*This is basically the approach you will see from any book in probability.

