Friday, August 9, 2013

Math problem one solution: The Time Clock Problem

On July 24, I posed a math problem based on a real-life situation. In summary, here is the problem: If you have a group of 200 employees, what is the probability that two or more employees have the same last four digits in their Social Security numbers? When my son heard this problem, he immediately said, "That sounds like the birthday problem!" He's right. The birthday problem can be stated this way: If you have 23 people in a room, none of them was born on February 29 and you assume that birthdays are evenly distributed throughout the year (which we know is not true) what is the chance that two of the people share the same birthday? The answer turns out to be about one out of two, or 50.7%.

The birthday problem and the solution to it is discussed in Wikipedia. They point out that it is actually easier to solve the opposite problem. What is the probability that the 23 people have unique birthdays? Once you calculate that, you can take one minus that probability to get the change that at least two of the 23 people have the same birthday (as there could be more than two).

The solution to our problem actually is more accurate than the solution to the birthday problem because the last four digits of a person's Social Security Number are more likely to be randomly distributed among the 9,999 possibilities (0000 is not used).

Using the Wikipedia article, here is a solution. We are also going to figure the probability that all 200 employees have a unique combination of the last four digits of their Social Security Numbers. That probability is

P(200') = 9999/9999 * 9998/9999 * 9997/9999 * ... * 9802/9999 * 9801/9999 * 9800/9999

where ... indicates many more terms in the equation. I calculated this number using a spreadsheet with 15 digits of precision and got this result:

P(200') = .134853157876989 or about 13.5%.

This means that there is only a 13.5% probability that all 200 employees have different values for the last four digits of their Social Security Numbers. Taking 

P(200) = 1 - P(200')

means that there is a 86.5% probability that two or more employees have the same four digits. So the answer to the math problem is about 86.5%.

With that high of a probability, the employer must have a way of assigning alternate numbers to a few employees.

Updated Aug. 23: I renamed this post from "A solution to the math problem" to "Math problem one solution: The Time Clock Problem." Does this mean that there will be additional problems? You bet! But the next one is complicated enough that I'm going to solve it before I post it. That way, I can post the solution the next day. The common theme of these problems: These are problems that occur in real life.

No comments: