# Birthday and Free Movie Ticket

The Birthday Paradox is quite well known. It’s not really a paradox, it’s just an answer that is unexpected. If you are not familiar with the problem, it asks how many people there needs to be in a room so that there is a greater than 50% chance that two of them share the same birthday.

*How many people do there need to be in a room so that there is a greater than 50% chance of two people sharing the same birthday?*

The answer is that there needs to be just 23 people. If you want an explanation, you can read about it here.

The ‘trap’ that most people make in their logic when thinking about this puzzle is that they make it personal. They think about how many people there needs to be to share a birthday with

*them*, not considering that it is everybody in the room is also comparing themselves to everybody else.## Making it personal

If we did want to make it personal, how many people does there need to be in a room until there is a greater than 50% chance of someone having the same birthday as you?*

*Under the assumption that all birthdays are equally likely, and there are 365 days in a year, and everyone is selected totally at random.

There’s another trap here that people fall into. The answer is

__not__365/2 ≈ 183 days. This because we’re sampling with replacement. If we had a giant urn into which we placed 365 balls, each with a distinct birthday written on it, and pulled them out at random, sure, on average, it would take 183 pulls before we managed to find the ball that was our birthday. However, in real life, people can share a birthday. If you meet someone and find that their birthday is January 19th, it doesn’t discount that date from being seen again – you might meet another person with the same birthday. Going back to our urn example, it is like drawing a ball, checking to see if it is your birthday, then putting it*back*into the urn. It’s possible to draw it again.To calculate the true answer, we note that each person you meet has a 364/365 chance of

__not__sharing your birthday. If you meet two people then there is a (364/365) × (364/365) chance that neither of them share your birthday. After meeting*n*people it’s (364/365)^{n}chance that none of them share your birthday. To answer this question, we’re looking for when this is equation is 50% (if there’s a 50% of not meeting someone, there’s a 50% of meeting someone).(364/365)

^{n}= 1/2Taking the log of both sides

n log (364/365) = log (1/2)

n ≈ 252.7

n ≈ 252.7

We need an integer number of people, so we’ll round it up to 253 (plus you need to count yourself too, so call it 254 if you want the total number of people in the room).

*To get a 50:50 chance of someone in a room sharing your birthday, you should be in a room with at least 253 other people.*

Advertisement:

## Gambling Game

There’s a related bar room gambling game that con artists use to swindle money away from unsuspecting individuals. It goes something like this:

**Swindler**: “Let’s play a game, I’ll roll a die, and if it comes up one, I’ll give you a dollar. If not, you give me a dollar.”

**Mark**: “No way, that’s not fair. I only have a one in six chance. That’s a sucker’s game.”

**Swindler**: “Hmm, you’re right. I’ll tell you what – you can roll the dice

*three*times then. Three times 1/6 is ½, so that makes it all fair. It’s now no different to a coin toss. We both have the same chances.”

**Mark**: “Err, OK, let’s play!”

Bad move. It’s not an even game.

Let’s look at the math: The swindler wins 5/6 times on a single roll (they manage to dodge the roll of one). After two rolls, they have a (5/6)

^{2}chance of dodging both ones. After three rolls, they have a (5/6)^{3}chance of dodging a one on all of the rolls. This is 125/216 ≈ 57.87%. The odds are in swindler’s favour.(If you get propositioned into this game, counter that you get to roll the die four times instead of three. This reduces the swindler’s chance of winning to 625/1296 ≈ 48.23%. This change moves the game into your favour).

## Free Movie Tickets

There’s another classic birthday puzzle, and this is related to getting a free movie ticket.

There is a single line of people queuing to get into a movie theater. The manager decides to give a free ticket to the first person in the line that shares a birthday with any person in front of them.

*ie*Starting from the front of the queue, the first person with a non-distinct birthday gets a free ticket.You get advanced knowledge of this information. If you were to queue jump, and able to insert yourself anywhere in the line, where would you stand to maximize your chance of getting the free ticket?

*Where is the best place to be to maximize your chance of having the first non-distinct birthday?*

If you are at the front of the line, there’s no way you can win.

If you are very close to the front of the line, there’s not many people ahead of you to match up with. Sure, you’d probably be the first, if there was a duplicate, but there are not many potential people match against.

If you are a long way back, there’s lots of people ahead of you to increase your chances of a match, but you suffer from the fact that you might not be the first even for your birthday, and there’s a good chance that someone ahead of you will have matched their birthday.

The chance of winning the free ticket is the product of both the chances that nobody ahead of you has matched up yet, multiplied by the chance that you match up with any of them.

We need to maximize this product.

If you are

*n*people in a line, the chance that everybody has a distinct birthday is:This is just a mathematical expression of the pigeonhole principle. The first person is guaranteed to be unique; she has 365 free slots to pick from out of 365. The second person has 364/365 unselected locations. The third 363/365 …

If you insert yourself into position

*n*in the queue, then there are*n-1*people ahead of you. All these people need to have distinct birthdays for you to have a chance of winning. The equation for this is:The probability of your birthday matching with any one of these people is just

*(n-1)/365*After all, we know they are all distinct! There’s n-1 people you could match with!This gives the final formula as:

What we need to do is maximize this gnarly expression. Let’s look at it computationally (Excel is our friend) See table below.

Using the above formula, the numbers are huge because of the 365! term so, in Excel, I used an equivalent variant claculating the probability of there people ahead having distinct birthdays, and this is PERMUT(365,

*n*-1)/365^(*n*-1).We can see that the answer (maximum) is if you stand in position #20.

Position | Pr(Distinct_Ahead) | Pr(Match) | Pr(Win) | |
---|---|---|---|---|

1 | 0.00000000 | 0.00000000 | ||

2 | 1.00000000 | 0.00273973 | 0.00273973 | |

3 | 0.99726027 | 0.00547945 | 0.00546444 | |

4 | 0.99179583 | 0.00821918 | 0.00815175 | |

5 | 0.98364409 | 0.01095890 | 0.01077966 | |

6 | 0.97286443 | 0.01369863 | 0.01332691 | |

7 | 0.95953752 | 0.01643836 | 0.01577322 | |

8 | 0.94376430 | 0.01917808 | 0.01809959 | |

9 | 0.92566471 | 0.02191781 | 0.02028854 | |

10 | 0.90537617 | 0.02465753 | 0.02232434 | |

11 | 0.88305182 | 0.02739726 | 0.02419320 | |

12 | 0.85885862 | 0.03013699 | 0.02588341 | |

13 | 0.83297521 | 0.03287671 | 0.02738549 | |

14 | 0.80558972 | 0.03561644 | 0.02869224 | |

15 | 0.77689749 | 0.03835616 | 0.02979881 | |

16 | 0.74709868 | 0.04109589 | 0.03070269 | |

17 | 0.71639599 | 0.04383562 | 0.03140366 | |

18 | 0.68499233 | 0.04657534 | 0.03190375 | |

19 | 0.65308858 | 0.04931507 | 0.03220711 | |

20 | 0.62088147 | 0.05205479 | 0.03231986 | |

21 | 0.58856162 | 0.05479452 | 0.03224995 | |

22 | 0.55631166 | 0.05753425 | 0.03200697 | |

23 | 0.52430469 | 0.06027397 | 0.03160193 | |

24 | 0.49270277 | 0.06301370 | 0.03104702 | |

25 | 0.46165574 | 0.06575342 | 0.03035545 | |

26 | 0.43130030 | 0.06849315 | 0.02954112 | |

27 | 0.40175918 | 0.07123288 | 0.02861846 | |

28 | 0.37314072 | 0.07397260 | 0.02760219 | |

29 | 0.34553853 | 0.07671233 | 0.02650707 | |

30 | 0.31903146 | 0.07945205 | 0.02534771 | |

31 | 0.29368376 | 0.08219178 | 0.02413839 | |

32 | 0.26954537 | 0.08493151 | 0.02289289 | |

33 | 0.24665247 | 0.08767123 | 0.02162433 | |

34 | 0.22502815 | 0.09041096 | 0.02034501 | |

35 | 0.20468314 | 0.09315068 | 0.01906637 | |

36 | 0.18561676 | 0.09589041 | 0.01779887 | |

37 | 0.16781789 | 0.09863014 | 0.01655190 | |

38 | 0.15126599 | 0.10136986 | 0.01533381 | |

39 | 0.13593218 | 0.10410959 | 0.01415184 | |

40 | 0.12178034 | 0.10684932 | 0.01301215 |

Here is the data in graph form. The first graph shows the probabilities of the people ahead being distinct (in orange). It falls in an S-shape. The red dots represent the probability of you matching a person ahead. The red line is straight, as it is a linear relationship.

The product of the two is shown in the graph in blue. It is clear there is a maximum, and this is when

*n = 20*, and your chances are 3.22%*The best place to stand in the line to maximize your chances of winning a free ticket is position #20.*

(And remember, please follow appropriate social distancing guidelines. Make sure you stand in line

*at least*6 feet away from people who are not in your household! Please stay safe).