---
title: 'A Closer Look at the Birthday Paradox'
source: 'https://youtube.com/watch?v=OUQVhnuTMVU'
video_id: 'OUQVhnuTMVU'
date: 2026-07-27
duration_sec: 1006
---

# A Closer Look at the Birthday Paradox

> Source: [A Closer Look at the Birthday Paradox](https://youtube.com/watch?v=OUQVhnuTMVU)

## Summary

The video explains the famous birthday paradox, calculating the probability that at least two people in a room share a birthday, using logarithmic approximations and series expansions without a computer. It contrasts two interpretations: any shared birthday (requires 23 people) versus a specific birthday (requires 253 people).

### Key Points

- **Introduction to the Birthday Problem** [00:02] — Poses the question: how many people needed for >50% chance that at least two share a birthday.
- **Assumptions** [01:35] — Assumes 365 days, equally likely birthdays, no leap years.
- **Probability Calculation Setup** [01:48] — Uses complement: P(at least one shared) = 1 - P(no shared). P(no shared) = product from k=0 to n-1 of (365-k)/365.
- **Goal of the Calculation** [03:55] — We want this probability > 1/2, i.e., product ≈ 1/2.
- **Using Logarithms to Avoid Trial and Error** [05:01] — Takes natural log of both sides to convert product into sum: ln(1/2) = sum ln(1 - k/365).
- **Series Expansion Approximation** [07:05] — For small k/365, uses approximation ln(1+x) ≈ x, giving -ln2 ≈ -sum(k/365) so ln2 ≈ sum(k)/365.
- **Solving for n Using Sum Formula** [09:15] — Sum of k from 0 to n-1 is n(n-1)/2. Setting n(n-1)/2 = 365 ln2 ≈ 253 gives quadratic n^2 - n - 506 = 0.
- **Result: 23 People** [11:07] — Quadratic factors as (n-23)(n+22) = 0, so positive solution n = 23.
- **Specific Birthday Problem** [12:24] — Now asks: how many people for >50% chance someone shares a specific birthday? Probability = 1 - (364/365)^n.
- **Comparison of Results** [15:31] — Solving (364/365)^n = 0.5 gives n ≈ 253, showing the large difference between general and specific case.

### Conclusion

The birthday paradox is elegantly solved using logarithmic approximations and series expansions, yielding the surprising result that only 23 people are needed for a >50% chance of any shared birthday, versus 253 for a specific birthday.

## Transcript

How many people do you need to have in a room together until it's more likely than not that two of them share a birthday? This is the the birthday problem, the birthday paradox. You've probably heard about it before. You're
probably screaming the answer at the screen right now, but we are going to do it different, right? I I love the way James did it about 10 years ago on number file, but we're going to take something that we know how to solve and
something that we know how to solve and we know the answer to probably and I'm going to impose additional rules. I'm going to say I'm going to solve it without using a computer. So we want to calculate what is the
So we want to calculate what is the probability that uh at least two people share a birthday because we don't mind if it's three or four or and we want this to be greater than a half. So as soon as this is greater than a half we
can say it's more likely than not that two people in this group at least two people and let's say it's out of some number n that's what we've got to figure out. That's our critical mass we need for this to be true. And it doesn't
&gt;&gt; It doesn't m No, we haven't specified that. We very good observation. We'll come to that. Right now, I'm just how many people just that it's more likely matter what it is. So, there's a few
clue as to where we might be going. &gt;&gt; And &gt;&gt; Are we going to play? &gt;&gt; We are not going to do leap years. We're going to You made a good point. I should set out my assumptions. We are going to
set out my assumptions. We are going to assume 365 days. Keep it easy. And we're are equally likely. Again, not if you look at the data, there are some more going to assume, keep it simple, all birthdays equally likely. No leap years.
Let's just 365 options to pick one. So, it turns out it's easier to do one minus a different probability. Classic. So, rather than saying, you know, at least two people share a birthday, well, that's actually because of how
probability works. the total probability is one. So if we do one minus the probability that no one shares a birthday, then that it turns out it's out. The idea is total probability has to be one. Either at least two people
share or no one shares, one of those two events has to happen. So we can kind of work out. So what's the probability that no one shares a birthday? Right? Well, the first person can have any birthday they want. There is no one else yet in
our room. Person number one walks in and has 365 out of 365 choices for their birthday. Person number two walks in. Now, one of those birthdays has gone.
So, they now have 364 out of 365 choices. And this is going to continue. So, 363 choices out of 365 all the way down. And then eventually we're the way down. And then eventually we're going to get to the point of 365 minus n
going to get to the point of 365 minus n minus one out of 365. Um and that's going to be person n. So here it was 365 minus 0 for the first person. So when n minus 0 for the first person. So when n is one it's 365 minus 0. When n is two
we get 365 minus one which is 365 minus 2 minus one. So it's important to kind of know which one was which so that we know how that pattern is developing. So we can say the probability that no one shares a birthday is given as a product.
shares a birthday is given as a product. Now we use the capital pi big pi sign to represent a product and it's going to be the product from 0 to n minus one because all these terms look the same. They're all actually just 365
They're all actually just 365 minus k out of 365. So again when k is zero we get this one. K is one we get this one. all the way down to k being n minus one giving us that final term. And we're interested in when is this about a
half? Because as soon as this gets to about a half, then we're near the border line and that's going to tell us the values of n. And one way to solve this, and this is most likely the way you've seen this done before, is you try some
error. Nothing wrong with it. I'm not here to knock trial and error. You could all for you and be like, as soon as this is bigger than or less than a half, about it, that's the value we stop at. And it's a great way to solve it.
However, the fun thing here is to say, well, how would I solve this if I'm not allowed to do that, right? Suppose this was a much more complicated problem was a much more complicated problem where I have no idea what the value is
going to be and I have to check 10 trillion cases. It would be nice to have an alternative approach. So here it's possibly a little bit artificial because we all know the answer and it's not that hard to write
some simple code to give you the answer. But let's pretend we can't do that. Let's give ourselves these extra conditions and do some cool maths undoubtedly. But let's see what we can learn by trying to solve this without
using a computer. [screaming] So the reason this is tricky and the reason you use trial and error is we're trying to figure out n. n is the number of people the critical mass in our room
and it's like trapped inside this product. So there's no like inverse procedure. There's no inverse function we can apply to this to bring n down and get n equals something. That's why you often use a computer or trial and error
&gt;&gt; You can't isolate it. &gt;&gt; Exactly. You can't isolate it. It's like implicit. It's stuck inside the equation. So what we're going to have to do is think outside the box. Uh, and the first step here is products are really
annoying. They have this lovely capital pi symbol, but they're actually quite hard to deal with. And so very, very common trick, and I'm always telling my undergrads to do this, is when you have anything that's a product, usually
turning it into a sum by taking logarithms, by taking logs is going to help. Not always, but here, this is what we're going to do. So this equation is logs of both sides of this equation, then I can and I'll just do natural log.
the natural log of a half is now equal to the natural log of this product, which is going to be k n minus one. And I'm just going to simplify this cuz this I'm just going to simplify this cuz this is 365 over 365. So it's 1 - k over 365.
Now we've got logs. Now, the reason this helps is we can use one of the rules of helps is we can use one of the rules of logs is if you have log of a * b, that's actually the same as log of a plus log of b.
One of those very handy properties of logs. So, I've got a product here with n minus well with n terms including the zero. So, this is now the sum of those individual logs. So, I've got rid of the product. So I've got log of a half is
equal to the sum from n minus one of the log of this. So key thing is we've gone from talking about products to talking about sums. And now we're going to make an approximation. So we know what the
answer is but we don't. But I'm going to assume if k is small it's it's going to Like that's going to give you the maximum k can be. So let's suppose that
maximum k can be. So let's suppose that K is small enough that it's you know not definitely not going to get to 100. Let's suppose that then this number is quite small. So we've got log of one minus something small. So we're going to
make an expansion using the power series for a log. So the using the power series for a log. So the power series for a log tells us that the power series for a log tells us that the log of 1 + x is equal to x - x^2 / 2 + x
log of 1 + x is equal to x - x^2 / 2 + x cub over 3 - x4 over 4 plus dot dot dot cub over 3 - x4 over 4 plus dot dot dot and this is true when x is small. So we can use this and this is like key to basically the whole thing. We have this
is our x minus k over 365. We suppose it's going to be small. Then log of this thing is actually just x because this thing is doubly small cuz it's squared.
terms and we're going to say this is kind of just equal to x. So it is an kind of just equal to x. So it is an approximation. But by doing this we've now got log of a half is approximately equal to it's now log of 1 - x which is
approximately just minus. So it's now the sum of minus k over 365. And this is good enough for us getting our answer. Now the other thing that we know about Now the other thing that we know about logs, when you have log of a fraction,
this is actually the same as negative log of it the other way around. So this is minus log 2. So I've now got minuses on both sides. Cancel that. And I've got log of 2 has to be I'll write it as equal to now the sum of k = n minus one
of k / 365. So this is now the equation we have to solve. N is still trapped. But this, it turns out, is a sum that some of you may have spotted, may have seen before. This
is a sum we can work out. And we're going to free N from its jail cell, from its prison. We're going to free n and then be able to get an equation that we spit out the answer we've been expecting.
expecting. Right? More paper. [music] [laughter] um log two it's about 0.69.
We won't ask why I remember that. Um and then we have this thing which is equal then we have this thing which is equal to the sum from n to n minus one k over 365. So if we multiply up take the 365
across and this is equal to 253 um is equal to now the sum from k= n to n minus one of k. So what is this sum right? So let's write out the first few right? So let's write out the first few terms. It's 0 + 1 + 2 + 3 + all the way
up to n minus one. So it's just the sum of the first n minus one numbers. And that is it's a Gaussian sum. It's the sum Gaus figured out at school back in the day. So it's like um the n number multiplied by the one in the middle
and add them up and all of them give you n. So it's just equal to n * n minus one / 2. So now we can tidy this all up. We've got 253. We've got the sum and
again the n is free. It's no longer trapped inside there. So what we've trapped inside there. So what we've actually got here is n^2 um minus n and then taking the two across it's going to give us 56 and it's going to be minus 56
= 0. So the answer to the birthday problem is approximately when this equation is zero and we haven't done any trial and error. We've got to this point by doing some proper maths, some good logs, some good summations. There's
there's a good chunk of stuff happening there, but we haven't just guessed or used a computer to help. So, this is really nice because turns out that this is going to factoriize. This is going to factoriize as n - 23 * n + 22
= 0. So, we've got, if you expand it out, you're going to get n ^ 2 + 22nus 23n. So, leaves you with a minus one. And then you've got -23 * 22 gives you - 56. So the answer of course is the two roots of this equation. So you can
either have minus 22 people in a room together, whatever that means, [laughter] or the actual real world correct answer. Uh the minus 22 is the theoretical answer. The proper answer is of course n equals 23. You need 23
people in a room together for it to be more likely than not that at least two You know, all I want to know about is what minus 22 people looks like. &gt;&gt; Minus 22 ghosts. &gt;&gt; 22 ghosts together.
&gt;&gt; 22 ghosts. &gt;&gt; So, yeah, it it decreases instead of 23 people or 22 ghosts. Let's go with that. &gt;&gt; How many ghosts do you have to have in a room for it to be more likely than not that two of them died on the same day?
&gt;&gt; Wouldn't that just be the same thing? Cuz the date of death is the same as the &gt;&gt; Yes. But this time, but this time the answer is 22. That's the beauty of it. &gt;&gt; So now we know how many people we need for it to be more likely two of them
share a birthday. You can slightly change the question. And this is often I birthday problem and why it's potentially called the birthday paradox is that when you first hear it, you interpret it usually as the way I'm
about to explain the second problem. And that's why 20 you're like it can't be as low as 23 because I think our brains initially want to think how many people do you need in a room for it to be more likely than not that someone has my
birthday. So now we're specifying the birthday. So before any of those 23 or 22 ghosts could share a birthday. But now we want it specifically to be my &gt;&gt; What is your birthday? &gt;&gt; 6th of December.
&gt;&gt; Sixth of December. All right. So what is how many people do we need sixth of December? Um so again we're going to do the trick of one minus. So we want the probability that at least one person shares my birthday and that's the same
as one minus the probability that no one shares my birthday. So again we're interested in this approximately being equal to a half for the original thing. So that's when this one is approximately a half, right? It's always more likely
What's the probability no one shares my birthday? So we proceed as we did before. But now the first person who comes in the room to join me, they have comes in the room to join me, they have 364 out of 365 choices for their
of December. That's mine. Everything else, whatever they want. Now, when the second person comes in, we saw last time that they had like one fewer choices. the two other people, they can both have the same birthday as long as it's not
December. So, you're actually just going to get this times itself and then times going to just turn into this to the power n. So what we're actually trying to solve here is when does n become large enough that this goes below a
half. That's the idea. If we set them equal, we're basically trying to solve when is a half approximately equal to 364 over 365 to the power n. Um so now this time the n might initially look like it's trapped, but we can just take
logs. Logs bring the powers down. So if we take logs of both sides, you say log of a half, we want that to be equal to n. And then it's going to be log of 364 over 365. But of course, using rules of logs, that's n * log of 3 64 minus log
of 365. And so now we can just rearrange. So basically we're going to rearrange. So basically we're going to get that n is basically equal to uh log 2 again turning that into minus log 2 divided by log 365
divided by log 365 minus log 364. So sub that in get an answer it's 252.6. So n we need is 253 So n we need is 253 people. So which is crazy. So, you only
need 23 people in the room for it to be more likely than not that two of them share a birthday, but you need more than 10 times 11 times that number actually. Exactly 11 times that number for them to have my specific or any specific
birthday that we've picked. That I think is the way that often when you first hear the birthday paradox, your brain thinks it's the second one and it feels like it should be quite a big number before it becomes more likely than not.
But of course, if you think about the maths carefully, like we've done, we get &gt;&gt; Do you ever look at a football starting lineup in a match because that's 22 players and the referee and you take So, you get the referee, all the players in
&gt;&gt; Yeah. Yeah. Yeah. So, the one the one I also like is it doesn't quite work as well now, but for the major football tournaments, you could have a squad of 23 players. England squad of the 2018 World Cup, Kyle Walker, John Stones,
&gt;&gt; Nice. Nice. &gt;&gt; Catch more from Tom Crawford in the description and comments below. That includes some extra footage from this interview about the birthdays of people on Pluto, plus a playlist of Tom's
number file videos and a podcast interview about [music] his life and a link to Tom's own YouTube channel, Tom Rocks Maths.
