There are 365 out of 365 ways to select the birthday of first person. Therefore the number of ways that we can choose a birthday for second person is 364 out of 365.

Therefore the probability of two persons not having the same birthday is,

`P(2) = 365/365 xx364/365`

For four people,

`P(4) = 365/365 xx 364/365 xx 363/365 xx 362/365`

`P(4) = 0.9836`

**Therefore the probability of 4 people having different birthdays is 0.9836**