Showing posts with label Math. Show all posts
Showing posts with label Math. Show all posts

Saturday, January 26, 2013

Fantasy Football and Math

I knew that sports was a good way to introduce young students to math concepts.

At the most basic level, you need to be able to count to keep score.  From there, you need to calculate differences in order to see by how much you're winning or losing.  At the next level, you use multiplication and division for things like win/loss percentages and batting averages.  For most of history, these basic mathematical operations were enough for anyone to be sports literate.

Last year I went to Las Vegas for March Madness and the math while not complex, was fast and furious.  And now this year, as I am joining a fantasy football keeper league, here comes the next level of challenging math.  Picking players requires some serious thought in managing probabilities and hedging risks, not to mention salary inflation (brought on by team expansion) and game theory.  

The list of things I want to work on, build and learn is pretty full, but if it ever empties, it'd be a great learning experience to build some applications in the fantasy football space.

Here are some apis that may be of interest if time allows ...

Sunday, December 30, 2012

Gambling - How much should you bring to the table?

I just came back from Atlantic city where we stayed at the Borgota.  We basically did three things:
  1. Ate steaks at Old Homestead - The steaks were tasty, but you definitely needed steak sauce.  I prefer it when steaks have enough taste that using sauce is unnecessary.
  2. Drank at the tables - The liquor was not top shelf.  I would've like some better options.
  3. Played blackjack and craps - Some of us won and others lost.
Since gambling is what we did for the majority of the trip, it's still on my mind.  One thing I noticed is that the losers started out with less money than the winners.  In gambling, as in life, the rich get richer and the poor die trying.

The reason that the players with smaller bankrolls tend to go bust faster is simple; they cannot survive even the smallest fluctuations.   After a few losses, these players hit 0 and cannot recover.  Players with bigger bankrolls are more able to survive downswings and make a run to actually make some money.

In my experience, I often go to the casino willing to use about 200 dollars a night.  If I play blackjack, I typically sit at a 10 to 15 dollar table.  This gives me 13-20 bets to work with it.  The question I have is: How long can I expect to play before busting out?  Of course, there may be times where I lose every hand and bust out after 13-20 bets, and there may be a time where I make so much that I will last through the night.

I'm sure there is a good mathematical way to express what is occurring here.  It is a random walk, with a weighted probability of losing slightly higher than winning each hand.  If I have some time, I'd like to:
  1. derive formulas that will give me the exact expected value of busting out over time.
  2. derive an easy way to get a quick back of the envelope calculation of the expected value.
  3. Write computer programs to simulate the results, which will confirm my formulas.
If I ever get some time to do the above, I'll update this post with the data or update with a link to another post.  If you know of this analysis already, please leave a comment.