Skip to content

In probability theory, the birthday problem concerns the probability that, in a set of n randomly chosen people, some pair of them will have the same birthday. By the pigeonhole principle, the probability reaches 100% when the number of people reaches 366 (since there are 365 possible birthdays, excluding February 29th). It would seem that we wo…

License

Notifications You must be signed in to change notification settings

dmatsanganis/Android_The_Birthday_Problem

Repository files navigation

The Birthday Problem

Introduction:

In probability theory, the birthday problem concerns the probability that, in a set of n randomly chosen people, some pair of them will have the same birthday. By the pigeonhole principle, the probability reaches 100% when the number of people reaches 366 (since there are 365 possible birthdays, excluding February 29th). It would seem that we would need 183 people (half of 365) to reach a 50% probability. However, 99% probability is reached with just 57 people and 50% probability with just 23 people. These conclusions are based on the assumption that each day of the year (except February 29) is equally probable for a birthday.

Execution Example:

Given a group of 20 people and performing 10,000 simulation runs, your program should report that 41.24% of the time there were two people that shared the same birthday. You can also see the image below:

Capture

Contributors

Java Android

About

In probability theory, the birthday problem concerns the probability that, in a set of n randomly chosen people, some pair of them will have the same birthday. By the pigeonhole principle, the probability reaches 100% when the number of people reaches 366 (since there are 365 possible birthdays, excluding February 29th). It would seem that we wo…

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages