Compound Probability:

 

In statistics, we found out that you dont need to have a large group to likely have 2 people with the same bday. The equation that finds it is really complicated:

The equation below calculates the probability that each persons birthday is unique.

p(1 is unique)* p(2nd is unique)*.....

365/365* 364/365 * 363/365 *...* 340/365*....

 

Create a recursive function that will determine the likelihood that in a group of n people, each person is unique.

public double oddsUnique(int numPeople)