birthday paradox paradox

birthday paradox paradox

Postby Guest » Mon Jan 21, 2019 6:52 am

Hi,

I tried to give an answer to the birthday paradox using a simple algorithm. Unfortunately, I end up with the approximation of about 24.61 people to reach a probability of 50%, whereas the answer from the theory tells me, I need 23 people for chance of 50%.

Where am I wrong? 24.61 is close to 23, but it isn't the same.

The answer I am looking for is this: how many people do I need to have on average in room, in order to have at least two persons with the same birthday. I assume there is no leap day (so 365 days), and that birthdays are evenly distributed throughout the year.

The approach I took was this: filling an empty room with random people, and every time a new person enters the room, he calls out his birthday's date for the people present in the room, and if there is a match with someone already present, I count the amount of people present in that room. I repeat this over and over again, millions of times. I calculate the total and divide by the number of samples and I end up with an amount of 24.61 people.

Why am I not getting an answer of about 23 people like stated everywhere where this birthday paradox is explained?
Guest
 

Return to Programming and Algorithms



Who is online

Users browsing this forum: No registered users and 1 guest