# Question on the Birthday Problem Lab

I’m working through the analytical solution to the third problem in the “Birthday Problem” lab – deriving a general formula for the probability that two students in the same class of n students would share a common birthday. Professor Serrano takes a step midway that loses me, and I’m hoping that someone can help me to understand.

He begins by laying out the calculation for the probability that no two students in a class of size n share a common birthday, as a series of n independent events. He assigns this probability to Q. The compliment of Q, which is 1 - Q or Q’, would then represent the probability that two students in a class of size n do share a common birthday. I’m with him to this point and a bit beyond.

Then he takes another step, asking what is the calculated value of n for which the probability for Q’ would be >= 0.5, and I’m still hanging on, but then this is said:

He moves to the approximation formula 1-x=e^(-x), and I don’t see how he got there. Can anyone can shed light on this step? Thanks again.

-Sean Olson

I graphed the two parts of the approximation equation on Desmos as two functions, which does help visualize it. The solution is x = 0, but I still don’t understand how this came in.

This is math, right? Have you ever taken a course in Infinite Series? E.g. do you know what a Taylor Series or a Maclaurin Series are?

Here’s a Math Exchange article.

The Wikipedia page for the Exponential Function also covers the series approximation of e^x. You can use that formula and substitute -x and the assumption that |x| is small.

1 Like

Hello @Sean_Olson,

For how the approximation came in, we carry out the taylor expansion of e^{-x}, and take the first-order terms from the expansion result which will be 1 - x.

A brief idea of taylor expansion of f(x) is like to find another function that consists of a series of basis functions (here we have x^0, x^1, x^2, ...). Such function is equal to f(x). The n-th order approximation is that you keep only up to the n-th term of the series and drop the rest.

Your graph is a good illustration of that the first order approximation of f(x=x_0) is nothing but the tangent of f(x) at x=x_0. It is a approximation because, at very close to x=x_0, the two curves are quite like each other. Since it preserves only up to the first order, the approximating curve fails to resemble f(x) in the range far from x=x_0. In other words, you want better approximation in larger range, you keep more terms of the Taylor series. To see this effect, you just add more terms from the page shared by Paul to your graphing tool.

So, the correct way of using your graph here is not just about at exactly the solution point (btw, y=1 is the zeroth order approximation that keeps only the zeroth term, as oppose to 1 - x which keeps both the zeroth and the first term), but looking at the approximating behavior of 1-x to e^{-x} around x=x_0. The more terms you add to your graphing tool, the more obvious the approximating behavior is.

Cheers,
Raymond

2 Likes

@paulinpaloalto – Thanks for your response, and I sure hope it’s math . The Taylor Series is new to me. The links are appreciated. Cheers!

@rmwkwok, thank you for your well-developed and clearly-reasoned response. It is very much appreciated. Cheers!

1 Like

You are welcome, @Sean_Olson!