Intro to probability chapter 4 ex 31

A group of 50 people are comparing their birthdays (as usual, assume their birthdays are independent, are not February 29, etc.). Find the expected number of pairs of people with the same birthday, and the expected number of days in the year on which at least two of these people were born.

Solution: Creating an indicator r.v. for each pair of people, we have that the expected number of pairs of people with the same birthday is (50C2 . 1/365) by linearity. Now create an indicator r.v. for each day of the year, taking the value 1 if at least two of the people were born that day (and 0 otherwise). Then the expected number of days on which at least two people were born is

$365(1-(364/365{)}^{50}-50\cdot (1/365)\cdot (364/365{)}^{49})$

Could someone explain how we got the answer ?

A group of 50 people are comparing their birthdays (as usual, assume their birthdays are independent, are not February 29, etc.). Find the expected number of pairs of people with the same birthday, and the expected number of days in the year on which at least two of these people were born.

Solution: Creating an indicator r.v. for each pair of people, we have that the expected number of pairs of people with the same birthday is (50C2 . 1/365) by linearity. Now create an indicator r.v. for each day of the year, taking the value 1 if at least two of the people were born that day (and 0 otherwise). Then the expected number of days on which at least two people were born is

$365(1-(364/365{)}^{50}-50\cdot (1/365)\cdot (364/365{)}^{49})$

Could someone explain how we got the answer ?