1
$\begingroup$

The Birthday problem. Find the probability that at least two people out of $(k=5)$ people will have the same birthday.

The usual approach would be to use $$p=1-\frac{P_{365,5}}{365^5}$$ However, I want to know what went wrong with my approach: $$ p=\Pr (A_5\cup A_4\cup A_3\cup A_2) $$ where $A_i$ is the event where $i$ persons have the same birthday so $$ p=\frac{1}{365^5}(365^5+365^4 \cdot 364+365^3\cdot 364 \cdot 363+365^2 \cdots362) $$ I used $365^5$ since $5$ people may have the same birthday, therefore we get a value from $365$ with repetition. Furthermore, $4$ people can have the same birthday so we pick $365^4 \cdot 364$ and so on.

This is obviously wrong since $p>1$ however may I ask what went wrong with my thinking?

$\endgroup$
11
  • $\begingroup$ Suppose the year had $7$ days instead of $365$, then try to use the same argument. It should become more obvious where/why it's wrong. $\endgroup$
    – dxiv
    Commented Dec 26, 2021 at 6:51
  • $\begingroup$ Think about what your expressions are trying to count. Of all the $365^5$ possible outcomes in the denominator, how many assign everyone the same birthday? Try to reason everything out based on the multiplication principle. $\endgroup$
    – Karl
    Commented Dec 26, 2021 at 6:52
  • $\begingroup$ @Karl I used the thinking that we have $365$ balls where I will pick $5$ times and I can also pick the same ball for at least $2$ persons. So i simply added the probabilities for the union of the events of $j$ persons having the same birthday/ball $\endgroup$
    – wd violet
    Commented Dec 26, 2021 at 6:59
  • 1
    $\begingroup$ Try to compute probability that they have different birthday and the result will easily follow. You should get something like $1 - (1-\frac{1}{365})*(1-\frac{2}{365})*...(1-\frac{k}{365})$. What is interesting in this formula is that if k is around 23 the result is already close to 50%. Not intuitive at all. $\endgroup$
    – Salcio
    Commented Dec 26, 2021 at 7:16
  • 1
    $\begingroup$ Say, the case when 4 people have the same birthday - you have to pick this day - 365 possibilities, then, once the day is fixed, you have to choose 4 people (out of 5) gives you 5 and then, once the day and people are fixed you have to assign birthday to the 5th guy which gives you 364 possibilities. So the total cases (when 4 birthdays are the same) is 365*5*364 $\endgroup$
    – Salcio
    Commented Dec 26, 2021 at 7:24

2 Answers 2

2
$\begingroup$

First, let’s calculate the probability that nobody has the same birthday. Since birthdays are independent, we can use the formula that $P(A\cap B) = P(A)*P(B)$.

Let $A_{i,j}$ be the event that the $i$th and $j$th person don’t share the same birthday. We then want to calculate $$ P(A_{1,2}\cap A_{1,3}\cap A_{1,4}\cap A_{1,5}\cap\ldots\cap A_{4,5}) $$

That is, the probability that none of them share the same birthday is the probability that for every two different people we pick, they have a different birthday. By independence, we get that this is equal to $$ P(A_{1,2})*P(A_{1,3})*ldots*P(A_{4,5}) $$

Clearly, $A_{i,j}$ has the same probability every time—it’s always $\frac{364}{365}$. Thus, we can simplify this to $$ \left(P\left(\frac{364}{365}\right)\right)^m $$ where $m$ is the total number of different people we can compare. Since we compare $2$ people at once, and we have $5$ people total, we have $m = {5\choose 2} = 10$ ways of choosing two distinct people.

Thus,

Our probability that nobody has the same birthday is $$ \left(\frac{364}{365}\right)^{10} $$ The probability that AT LEAST $2$ people share the same birthday is the complement probability of nobody having the same birthday. Thus, $$ 1 -\left( \frac{364}{365}\right)^{10} $$
is the probability you’re looking for.

However, your way of computing it doesn’t work out. It seems like you’re trying to first compute the probability that all 5 people have the same birthday + the probability that 4 people have the same birthday + etc etc. I’m not sure exactly what you tried to do in your method, though. But basically, you can look up how to calculate the probability of exactly $k$ people sharing the same birthday out of a group of $n$, and add that total for each $k\in\{2, 3, \ldots, n\}$

$\endgroup$
1
$\begingroup$

Let $X$ denote the number of people with the same birth day .

Well $X$ can be either $0$ , or it can be $2,3,4,5$. Because $X=1$ does not make sense

Then $X=0,2,3,4,5$

$$P(X=0)=\frac{\binom{365}{5}\cdot 5!}{365^{5}}$$

$$P(X=2)=\frac{\binom{5}{2}\binom{365}{1}\binom{364}{3}\cdot \frac{4!}{2!}}{365^{5}}$$

and so on

Then $$P(X\geq 2)=1-P(X<2)=1-\frac{\binom{365}{5}\cdot 5!}{365^{5}}$$

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .