Birthday Paradox Monte Carlo Simulation

Many of you are familiar with the Birthday Paradox.  If you want to read more about it you can find a good article here.  Basically, it says that in a room of 23 people, there is a 50% chance that at least two people share a birthday.  And if you increase that number to 75 people, the chances go up to 99.9%.  I wanted to explore this a little more and rather than doing the math (boring!), I decided to do a Monte Carlo simulation, run it a bunch of times, and plot the results.

Continue reading “Birthday Paradox Monte Carlo Simulation”

Advertisements

Monte Carlo – Repeated Dice Problem from 404 podcast

Last week a podcast I listen to, the 404, discussed a math problem where you roll six 20-sided die and count how often you get a situation where at least one dice matches another dice.  They discussed the math a little and came to the conclusion that it happens far more than you’d think.  I thought it’d make a good monte carlo programming exercise so I’ve done just that.  Below, you’ll find my C code (though it’s not great) and results for 2-20 dice.

Continue reading “Monte Carlo – Repeated Dice Problem from 404 podcast”

IHG Priceless Surprises Monte Carlo Simulation

Over at One Mile At A Time, they did an analysis of the recent IHG Priceless Surprises Promotion where you could mail in 94 entrees and get back 94 plays in an online game.  Most entrees only won 500 points but some won 1000, 2000, 5000, and a few won free nights or gift cards.  I liked his analysis and it got me thinking about possible wins and the distribution.  Instead of doing a bunch of math, it was easier to create a Monte Carlo Simulation and the results were a little surprising.

Continue reading “IHG Priceless Surprises Monte Carlo Simulation”