The Birthday Paradox: an interesting probability problem involving “statistically independent” events

During this week’s statistics tutorials, we discussed (among other things) the concept of statistical independence, and focused attention on some important implications of statistical independence for probability distributions such as the binomial and normal distributions.

In this blog posting, I’d like to call everyone’s attention to an interesting (non-finance) probability problem related to statistical independence. Specifically, consider the so-called “Birthday Paradox”. The Birthday Paradox pertains to the probability that in a set of randomly chosen people, some pair of them will have the same birthday. Counter-intuitively, in a group of 23 randomly chosen people, there is slightly more than a 50% probability that some pair of them will both have been born on the same day.

To compute the probability that two people in a group of n people have the same birthday, we disregard variations in the distribution, such as leap years, twins, seasonal or weekday variations, and assume that the 365 possible birthdays are equally likely.[1] Thus, we assume that birthdates are statistically independent events. Consequently, the probability of two randomly chosen people not sharing the same birthday is 364/365. According to the combinatorial equation, the number of unique pairs in a group of n people is n!/2!(n-2)! = n(n-1)/2. Assuming a uniform distribution (i.e., that all dates are equally probable), this means that the probability that no pair in a group of n people shares the same birthday is equal to p(n) = (364/365)^[n(n-1)/2]. The event of at least two of the n persons having the same birthday is complementary to all n birthdays being different. Therefore, its probability is p’(n) = 1 – (364/365)^[n(n-1)/2].[2]

Given these assumptions, suppose that we are interested in determining how many randomly chosen people are needed in order for there to be a 50% probability that at least two persons share the same birthday. In other words, we are interested in finding the value of n which causes p(n) to equal 0.50. Therefore, 0.50 = (364/365)^[n(n-1)/2]; taking natural logs of both sides and rearranging, we obtain (ln 0.50)/(ln 364/365) = n(n-1)/2. Solving for n, we obtain 505.304 = n(n -1); therefore, n is approximately equal to 23.

The following graph illustrates how the probability that a pair of people share the same birthday varies as the number of people in the sample increases:[1] It is worthwhile noting that real-life birthday distributions are not uniform since not all dates are equally likely. For example, in the Northern Hemisphere, many children are born in the summer, especially during the months of August and September. In the United States, many children are conceived around the holidays of Christmas and New Year’s Day. Also, because hospitals rarely schedule C-sections and induced labor on the weekend, more Americans are born on Mondays and Tuesdays than on weekends; where many people share a birth year (e.g., a class in a school), this creates a tendency toward particular dates. Both of these factors tend to increase the chance of identical birthdates since a denser subset has more possible pairs (in the extreme case when everyone was born on three days of the week, there would obviously be many identical birthdays!).

[2] Note that since 29 students are enrolled in Finance 4335 this semester, the probability that at least two Finance 4335 students share the same birthday is p’(29) = 1 – (364/365)^[29(28)/2] = 67.2%; this probability can also be inferred from the above figure.

On the ancient origin of the word “algorithm”

The January 24th assigned reading entitled “The New Religion of Risk Management” (by Peter Bernstein, March-April 1996 issue of Harvard Business Review) provides a succinct synopsis of the same author’s 1996 book entitled “Against the Gods: The Remarkable Story of Risk“. Here’s a fascinating quote from page 33 of “Against the Gods” which explains the ancient origin of the word “algorithm”:

“The earliest known work in Arabic arithmetic was written by al­Khowarizmi, a mathematician who lived around 825, some four hun­dred years before Fibonacci. Although few beneficiaries of his work are likely to have heard of him, most of us know of him indirectly. Try saying “al­Khowarizmi” fast. That’s where we get the word “algo­rithm,” which means rules for computing.”

Note: The book cover shown above is a copy of a 1633 oil-on-canvas painting by the Dutch Golden Age painter Rembrandt van Rijn.

Visualizing Taylor polynomial approximations

On pp. 18-23 of the Mathematics Tutorial, I show how y = ex can be approximated with a Taylor polynomial centered at x=0 for \delta x values ranging from -2 to +2.  In his video lesson entitled “Visualizing Taylor polynomial approximations”, Sal Kahn essentially replicates my work; the only difference between Sal’s numerical example and mine is that Sal approximates y = ex with a Taylor polynomial centered at x=3 instead of x=0.  The important insight provided in both cases is that the accuracy of Taylor polynomial approximations increases as the order of the polynomial increases.

On the relationship between the S&P 500 and the CBOE Volatility Index (VIX)

Besides going over the course syllabus during the first day of class on Tuesday, January 17, we will also discuss a particularly important “real world” example of financial risk. Specifically, we will study the relationship between realized daily stock market returns (as measured by daily percentage changes in the SP500 stock market index) and changes in forward-looking investor expectations of stock market volatility (as indicated by daily percentage changes in the CBOE Volatility Index (VIX)):
As indicated by this graph (which also appears in the lecture note for the first day of class), daily percentage changes on closing prices for the SP500 (the y-axis variable) and for the VIX (the x-axis variable) are strongly negatively correlated with each other. The blue dots are based on 8,315 contemporaneous observations of daily returns for both variables, spanning the 33-year period of time starting on January 2, 1990 and ending on December 30, 2022. When we fit a regression line through this scatter diagram, we obtain the following equation:

{R_{SP500}} = .00062 - .1147{R_{VIX}},

where {R_{SP500}} corresponds to the daily return on the SP500 index and {R_{VIX}} corresponds to the daily return on the VIX index. The slope of this line (-0.1147) indicates that on average, daily closing SP500 returns are inversely related to daily closing VIX returns.  Furthermore, nearly half of the variation in the stock market return during this time period (specifically, 48.87%) can be statistically “explained” by changes in volatility, and the correlation between {R_{SP500}} and {R_{VIX}} came out to -0.70. While a correlation of -0.70 does not imply that daily closing values for {R_{SP500}} and {R_{VIX}} always move in opposite directions, it does suggest that this will be the case more often than not. Indeed, closing daily values recorded for {R_{SP500}} and {R_{VIX}} during this period moved inversely 78.59% of the time.

You can also see how the relationship between the SP500 and VIX evolves prospectively by entering^GSPC,^VIX into your web browser’s address field.

Calculus and Probability & Statistics recommendations…

Since many of the topics covered in Finance 4335 require a basic knowledge and comfort level with algebra, differential calculus, and probability & statistics, the second class meeting will include a mathematics tutorial, and the third and fourth class meetings will cover probability & statistics. I know of no better online resource for brushing up on (or learning for the first time) these topics than the Khan Academy.

So here are my suggestions for Khan Academy videos that cover these topics (unless otherwise noted, all sections included in the links which follow are recommended):

Finally, if your algebra skills are a bit on the rusty side, I would also recommend checking out the Khan Academy’s review of algebra.