[Math] probability that at least $2$ people have same birthday from group of $N$ people

permutationsprobabilityprobability distributions

Question is not that simple.

There are also leap year included.Leap year will be $366$ days and normal year will be $365$ days.

There is a statement in question that : there are exactly $\lfloor{\dfrac{n}{4}}\rfloor$ people who born in leap year.

Now we have to find probability of at least $2$ people having same birthday from group of $N$ people .

Edit : sorry i forgot a word to add!

Any help or hints and calculation and edit in questions are appreciated. Thanks..

Best Answer

Let's rephrase the question.

Find the probability that any $2$ people have their birthday in the same day of the year in a group $4n$ people, of which $n$ born were in the leap year and $3n$ people were born in the regular year.

The complement of the event "any 2 people have their birthday" is "all people have birthday on different days of the year".

Consider two mutually exclusive possibilites: $\mathcal{A}_1$ - one of these birthdays falls on "Feb. 29", and $\mathcal{A}_2$ -- none of these birthdays fall on the leap day.

The number of configurations of the second kind is $$ N\left(\mathcal{A}_2\right) = \prod_{k=1}^{4 n} \left( 365 - (k-1) \right) $$ and the number of configurations of the first kind is $$ N\left(\mathcal{A}_1\right) = n \prod_{k=1}^{4 n-1} \left( 365 - (k-1) \right) $$ The total configuration size is $N_T=366^n 365^{3n}$, hence the probability of having no birthday duplicates is

$$ p_c = \frac{ N\left(\mathcal{A}_1\right) + N\left(\mathcal{A}_2\right)}{N_T} $$

Here is a confirmation in Mathematica:

(* computed probability expression *)
p[n_Integer] = (Product[365 - (k - 1), {k, 1, 4 n}] + 
     n Product[365 - (k - 1), {k, 1, 4 n - 1}])/(366^n 365^(3 n));

(* simulation result *) 
In[45]:= With[{n=7,reps=10^8},
   Sum[Boole[DuplicateFreeQ[Join[
       RandomChoice[Range[1,366],n],
       RandomChoice[Range[1,365],3n]]]],{k,1,reps}]/reps]//N

Out[45]= 0.34599694

In[53]:= N[p[7]]

Out[53]= 0.3460041650022472

(* verify that computed value belongs to the sampling 
    confidence interval *)
In[55]:= With[{pSample = Out[45], pExpected = p[7]},
 IntervalMemberQ[
  Interval[pSample + {-1, 1} Sqrt[(pSample (1 - pSample))/10^8]], 
  pExpected]]

Out[55]= True