1
$\begingroup$

My Professor said that the probability that at least 2 of $k$ people have the same birthday if we didn’t use the complement is the sum of the probabilities that exactly 2 have the same birthday, plus the probability 3 have the same birthday, and so on…

However, I wanted to verify this and believe I thought of a case where this is not true: the case where exactly 3 and exactly 4 have the same birthday. I.e. the event that exactly 2 and exactly 3 people have the same birthday are not disjoint. therefore, we need a different method to calculate the probability not using the complement. Is this valid?

$\endgroup$
3
  • 2
    $\begingroup$ Please tell us what "use the complement" means. The answer to this question likely hinges on how you interpret the events in question: e.g. "exactly 2 share a birthday" is ambiguous: does it mean there is one birthday shared by just two people, or at least one birthday shared by just two people? (Regardless, your professor might have been a little hasty ;-).) $\endgroup$
    – whuber
    Jan 27 at 21:11
  • 1
    $\begingroup$ You can make sense of this if you let X be the total number of birthday matches. Two people born on August 6 and three born on May 10 (with no other matches) would be a total of five matches. // I'm not saying this is the way toward a nice combinatorial solution, but it is a way to frame your professor's statement. // This is the way toward a simple simulation in R. $\endgroup$
    – BruceET
    Jan 27 at 21:52
  • $\begingroup$ Thank you very much, that was what I was looking for! @BruceET $\endgroup$
    – elbecker
    Jan 28 at 4:01

2 Answers 2

2
$\begingroup$

Comment continued: Suppose there are 365 equally likely birthdates in a year (ignoring instances of Feb. 29) and that 23 people have randomly chosen birthdays.

n =23;  m = 10^6
set.seed(2022)
x = replicate(m, 
              n-length(unique(sample(1:365, n, rep=T))))
mean(x == 0)
[1] 0.492107     # aprx P(No Match)
2*sd(x == 0)/1000
[1] 0.0009998759 # aprx 95% margin of sim error

So the simulated probability of no matches is $0.4921 \pm 0.0010.$ The exact probability is $0.4927.$ [An advantage of simulation is that one can easily get the probability of no matches based on data for the relevant country of the actual probabilities of different birthdates (often slightly higher in summer than in winter).]

prod(1-(0:22)/365)
[1] c028    # exact P(No Match)

Here is a histogram of the simulated distribution of the number of matches among 23 people.

enter image description here

cutp = (-1:max(x))+.5
hist(x, prob=T, br=cutp, col="skyblue2")

Addendum: The alternative simulation below may provide an additional perspective:

n =23;  m = 10^6
set.seed(2022)
x = replicate(m, 
             sum(duplicated(sample(1:365, n, rep=T))))
mean(x == 0)
[1] 0.492107
$\endgroup$
2
  • $\begingroup$ Isn't the question about understanding an alternative way to compute the answer and not about how to obtain an answer, which the OP already knows? $\endgroup$
    – whuber
    Jan 27 at 22:49
  • $\begingroup$ I intended for the simulation to show an approach that gives probabilities of multiple matches. Maybe the simulation using duplicated in my Addendum comes closer to that. However, I don't see that either simulation gives clues to additional combinatorial approaches. $\endgroup$
    – BruceET
    Jan 27 at 23:09
0
$\begingroup$

If you have a random variable $X$ (e.g., the maximum number of people in the sample that share a birthday) that can only take on values $0,1,2,...,k$ then it is certainly true that:

$$\{ X \geqslant 2 \} = \bigcup_{x=2}^k \{ X = x \}.$$

Consequently, you then have:

$$\mathbb{P}(X \geqslant 2) = \sum_{x=2}^k \mathbb{P}(X = x).$$

Presumaby this is what your professor is talking about in this case. Your misgivings seem to arise from ambiguity about the event whose probability you are computing. If you can clarify that with your professor then this might become clearer.

$\endgroup$
4
  • 1
    $\begingroup$ What should we take $X$ to be in this application, where it appears there are as many random variables as there are people in the sample? $\endgroup$
    – whuber
    Jan 28 at 0:01
  • $\begingroup$ Here it would be the maximum number of people in the sample that share a birthday. $\endgroup$
    – Ben
    Jan 28 at 0:35
  • $\begingroup$ Do you mean the largest count of people associated with any date, or the total number of people who do not have a unique birthdate? Regardless, isn't this detail crucial to your explanation? $\endgroup$
    – whuber
    Jan 28 at 14:10
  • $\begingroup$ I mean the former. $\endgroup$
    – Ben
    Jan 28 at 15:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.