This repository contains Python scripts to simulate and analyze the Birthday Paradox.
The Birthday Paradox refers to the counterintuitive probability that in a group of
relatively few people, it's likely that at least two individuals share the same birthday.
This script calculates the theoretical probability of the Birthday Paradox based on mathematical formulas.
It takes the number of people as input and outputs the calculated probability.
Run the script and input the number of people when prompted.
The script will run simulations and plot the probability of a birthday match for different group sizes.
This script simulates the Birthday Paradox through random simulations.
It generates random birthdays for a specified number of people and checks if there are any shared birthdays.
The script outputs the probability of a birthday match based on the simulations.
Run the script, and it will run simulations and plot the probability of a birthday match for different group sizes.
The script includes a visualization of the simulation results using Matplotlib.
The x-axis represents the number of people in the group, and the y-axis represents the probability of a birthday match.
Through this script, we confirmed the high probability of people sharing the same birthday.
For example, when 23 people get together, the chance of shared birthdays goes over 50%.
We can see that the probability of sharing the same birthday is higher than what our intuition would suggest.
- The Birthday Paradox Explained: An informative article explaining the Birthday Paradox.