Concerning the birthday problem in probability

Click For Summary
SUMMARY

The birthday problem in probability states that in a group of k people, the likelihood of at least two sharing a birthday can be calculated using the formula 1 - (364/365)^(n-1), where n is the number of people. A common misconception is to assume the independence of pairs, which is incorrect; for example, with 366 people, at least one birthday must repeat. The correct approach involves calculating the probability that no two people share a birthday, leading to a probability of approximately 50% for 23 individuals. This problem is well-documented in mathematical literature, including resources like Wikipedia and MathWorld.

PREREQUISITES
  • Understanding of basic probability concepts
  • Familiarity with combinatorial mathematics
  • Knowledge of mathematical inequalities
  • Proficiency in numerical tools such as Excel, Python, or MATLAB
NEXT STEPS
  • Study the derivation of the birthday problem probability formula
  • Learn how to implement probability calculations in Excel
  • Explore combinatorial functions in Python for statistical analysis
  • Research the implications of the birthday problem in real-world applications
USEFUL FOR

Mathematicians, statisticians, computer scientists, and anyone interested in probability theory and its applications in real-world scenarios.

red65
Messages
13
Reaction score
0
The problem is stated like this :
There are k people in a room. Assume each person’s birthday is equally likely to be any of the 365 days of the year (we exclude February 29), and that people’s birthdays are independent (we assume there are no twins in the room). What is the probability that two people in the group
have the same birthday?
say that we have 23 people, my approach is to calculate the number of pairs in the group which is 23 choose 2 then multiply these by the probability that 2 people have the same birthday which is 1/356(because the first pick any day from 365 days then the second has a probability of 1/365 of picking the same day )
why my approach is wrong?
thanks.
 
Physics news on Phys.org
You are wrong in assuming that the probabilities of the pairs having identical birthdays are independent. Consider an extreme example of 366 people. If the first 365 people all have different birthdays, then all the birthdays are taken and the 366th person MUST have the same birthday as someone.

EDIT: the numbers below were incorrect and have been corrected. (Thanks @mathman )
Take this approach. The probability that at least two have the same birthday is 1-(probability that no two have the same birthday). Now calculate the probability that no two have the same birthday. Start with person 1. He can have any of 365 birthdays. Person 2 can have any of the 364 remaining birthdays. Person 3 can have any of the 363 remaining birthdays. Continue like that and see where it gets you.
 
Last edited:
  • Informative
  • Like
Likes   Reactions: red65 and PeroK
FactChecker said:
You are wrong in assuming that the probabilities of the pairs having identical birthdays are independent. Consider an extreme example of 366 people. If the first 365 people all have different birthdays, then all the birthdays are taken and the 366th person MUST have the same birthday as someone.

Take this approach. The probability that at least two have the same birthday is 1-(probability that no two have the same birthday). Now calculate the probability that no two have the same birthday. Start with person 1. He can have any of 356 birthdays. Person 2 can have any of the 355 remaining birthdays. Person 3 can have any of the 354 remaining birthdays. Continue like that and see where it gets you.
Typo in numbers.
 
  • Like
Likes   Reactions: FactChecker
mathman said:
Typo in numbers.
Thanks. I corrected them. Sorry.
 
red65 said:
The problem is stated like this :
There are k people in a room. Assume each person’s birthday is equally likely to be any of the 365 days of the year (we exclude February 29), and that people’s birthdays are independent (we assume there are no twins in the room). What is the probability that two people in the group
have the same birthday?
say that we have 23 people, my approach is to calculate the number of pairs in the group which is 23

No, it's 23 * 22 / 2 = 253
The first person gives you 23, the second has to be someone different 22, pair AB is the same as pair BA.
red65 said:
choose 2 then multiply these by the probability that 2 people have the same birthday which is 1/356(because the first pick any day from 365 days then the second has a probability of 1/365 of picking the same day )
Yes for one pair so you have 253 chances, each one offering you 1/365 chance. However, there may be more than one pair who have the same birthday, so you can't just multiply 1/365 by 253. In fact if you do the sums correctly you end up with approximately a 50/50 chance. You can do the calculation by finding out the probability of NOT finding a matching pair. Which is (1-1/365)^253. The probability of finding one is then 1 minus that. Which is 0.50047715403658201443106172385727
 
##1 - \left(\frac{365 \times 364 \times \dots \times 365 - n + 1}{365^n}\right) > 0.5##

I don't know how to solve this inequality.
 
Agent Smith said:
##1 - \left(\frac{365 \times 364 \times \dots \times (365 - n + 1)}{365^n}\right) > 0.5##

I don't know how to solve this inequality.
Use trial and error .
 
  • Informative
Likes   Reactions: berkeman
SammyS said:
Use trial and error .
Yes, but if the problem is new to you that might be a very difficult way to go. Gracias.
 
Agent Smith said:
Yes, but if the problem is new to you that might be a very difficult way to go.
But it is the only way to go. If you are interested in finding numerical answers then you need to become proficient in using suitable numerical tools: for this problem my first choice would be Excel, although Python or Matlab would be alternatives.
 
  • Like
Likes   Reactions: Agent Smith
  • #10
@pbuk that's a good suggestion. Is the formula correct though?
 
  • #11
Agent Smith said:
@pbuk that's a good suggestion. Is the formula correct though?

You have posted:
##\displaystyle \quad\quad 1 - \left(\frac{365 \times 364 \times \dots \times (365 - n + 1)}{365^n}\right) > 0.5##.

The expression on the left hand side of the inequality gives the probability that two people, from a group of ##n\ ##people, have the same birthday.
 
  • Like
Likes   Reactions: pbuk and Agent Smith
  • #12
Just to add to what @SammyS wrote, note
  • Although your expression is correct we usually omit a common factor of 365 from numerator and denominator: ## 1 - \left(\dfrac{364 \times \dots \times (365 - n + 1)}{365^{(n-1)}}\right) ##.
  • This expression ignores that fact that some people are born on 29th February.
  • It also assumes that births are evenly spread throughout the year, which is not correct.
  • This is a well-known problem and more information can easily be found on e.g. Wikipedia or (my "go to" for answers to all sorts of mathematical questions) MathWorld.
 
  • Like
Likes   Reactions: Agent Smith
  • #13
Capture.PNG


@pbuk a year on Mercury is just 88 days :smile: cogito

Gracias for pointing out the details.
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
2K
Replies
8
Views
4K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 2 ·
Replies
2
Views
6K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 9 ·
Replies
9
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K