B Concerning the birthday problem in probability

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 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 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 probabilty 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 .
 
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 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 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 Agent Smith
  • #13
Capture.PNG


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

Gracias for pointing out the details.
 
Back
Top