Skip to content

Birthday Paradox Simulation#86

Open
AdyaTech wants to merge 1 commit into
Grow-with-Open-Source:mainfrom
AdyaTech:Birthday-Paradox
Open

Birthday Paradox Simulation#86
AdyaTech wants to merge 1 commit into
Grow-with-Open-Source:mainfrom
AdyaTech:Birthday-Paradox

Conversation

@AdyaTech
Copy link
Copy Markdown

@AdyaTech AdyaTech commented May 6, 2026

🎂 Birthday Paradox Simulation (using Python)

📌 Introduction

The Birthday Paradox is a probability concept that shows how surprisingly likely it is for two people in a group to share the same birthday. Even in relatively small groups, the chances of a match are much higher than most people intuitively expect.

This Python project uses a Monte Carlo simulation to repeatedly generate random birthdays and estimate the probability of at least one shared birthday in a group.


🚀 Features

  • Generates random birthdays for a given number of people
  • Detects if any two birthdays match
  • Runs 100,000 simulations to estimate real probability
  • Simple command-line interaction
  • Uses only built-in Python libraries (datetime, random)

💻 Example

How many birthdays shall I generate? (Max 100)
> 23

Here are 23 birthdays:
Jan 1, Mar 5, Jul 12, ...

In this simulation, multiple people have a birthday on Jul 12

Generating 23 random birthdays 100,000 times...
100,000 simulations run.

Out of 100,000 simulations of 23 people, there was a
matching birthday in that group 50789 times.
That means ~50.79% probability.

📸 Live Demo (Screenshot)

image

@github-actions github-actions Bot requested a review from iamwatchdogs May 6, 2026 09:10
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

👋 @AdyaTech
Thank you for raising your pull request.
Please make sure you have followed our contributing guidelines. We will review it as soon as possible.

@iamwatchdogs iamwatchdogs changed the title Contributing my Python project by the name of Birthday Paradox in thi… Birthday Paradox Simulation May 20, 2026
Copy link
Copy Markdown
Contributor

@iamwatchdogs iamwatchdogs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @AdyaTech, Please make the following changes so that we can proceed with your PR.

  • Remove the media files
  • Remove the duplicate "Day 2 -Birthday Paradox" directory
  • Rename your project directory based on the given guidelines

Please don't make an additional commit to make the requested changes; instead, amend the existing commit and force push it to the respective PR branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants