Recently, on Reddit (of course), someone posted a video talking about how long it would take to fall straight through the center of the earth to the other side. One of the nice parts of the video is that it shows you what the time would be when we account for the actual, non-uniform density of the earth. The video just showed an Excel sheet, though.
I recommend you watch the linked video so you have a good visual of the problem. Once you’ve done that, come on back! In this post I’m going to show you how to solve the problem using Python and a numerical integrator from SciPy.
Continue reading →
The Mega Millions lottery is a popular number-picking lottery game in the US. It exists in 45 states (including D.C.), and is played by millions of people every week. Lotteries are well known for having negative expected values, meaning that players lose (on average) more than they win. This should be expected, given that lotteries (and gambling in general) are profit-seeking enterprises.
The potentially large jackpots of Mega Millions (the jackpot is pari-mutuel) can push the game into a region of positive EV, though. This is counter-balanced by the fact that duplicate tickets will result in splitting the winnings equally among the winners, driving down the available EV. This post explores what kind of impact that has on the game. Continue reading →