I have to find the expected number of people required to find a pair with same birthday. This is what I tried:
Assume that there are $M$ possible birthdays, then following the definition for expected number: $$E[X] = \sum_{x=2}^{x=M+1} xP[X = x] = \sum_{x=2}^{x=M+1} x \left[ \frac{M!(x-1)}{(M-x+1)! M^{x}} \right]$$
However, this is completely different from what is mentioned here as .
$$E[X]=1+\sum_{k=1}^{M} \frac{M!}{(M-k)! M^k}.$$
Are these expressions equivalent ? How to prove it ?
Consider $$ A = \sum_{x=2}^{M+1} \frac{M!x(x-1)}{(M-x+1)! M^{x}},\qquad B=\sum_{k=1}^{M} \frac{M!}{(M-k)! M^k}. $$ Then, using $x-1=M-(M-x+1)$ in the numerators of $A$, one gets $A=C-D$ with $$ C= \sum_{x=2}^{M+1} \frac{M!x}{(M-x+1)! M^{x-1}},\qquad D=\sum_{x=2}^{M}\frac{M!x}{(M-x)! M^{x}}. $$ Using $x=M+1-(M-x+1)$ in $C$ and $x=M-(M-x)$ in $D$, one gets $C=E-F$ and $D=G-H$ with $$ E= \sum_{x=2}^{M+1} \frac{(M+1)!}{(M-x+1)! M^{x-1}},\qquad F=\sum_{x=2}^{M} \frac{M!M}{(M-x)! M^{x}}, $$ and $$ G=\sum_{x=2}^{M}\frac{M!M}{(M-x)! M^{x}},\qquad H=\sum_{x=2}^{M-1}\frac{M!}{(M-x-1)! M^{x}}. $$ Using $x=k+1$ in $E$ yields $$ E=(M+1)B. $$ Adding the $x=1$ term in $F=G$ and using $x=k$ yields $$ F=G=M(B-1). $$ Using $x=k-1$ in $H$ yields $$ H=\sum_{k=3}^{M}\frac{M!M}{(M-k)! M^{k}}=M\left(B-1-\frac{M-1}M\right)=M(B-2)+1. $$ Thus, $$ A=E-F-G+H=(M+1)B-2M(B-1)+M(B-2)+1=1+B. $$