to your HTML Add class="sortable" to any table you'd like to make sortable Click on the headers to sort Thanks to many, many people for contributions and suggestions. Licenced as X11: http://www.kryogenix.org/code/browser/licence.html This basically means: do what you want with it. */ var stIsIE = /*@cc_on!@*/false; sorttable = { init: function() { // quit if this function has already been called if (arguments.callee.done) return; // flag this function so we don't do the same thing twice arguments.callee.done = true; // kill the timer if (_timer) clearInterval(_timer); if (!document.createElement || !document.getElementsByTagName) return; sorttable.DATE_RE = /^(\d\d?)[\/\.-](\d\d?)[\/\.-]((\d\d)?\d\d)$/; forEach(document.getElementsByTagName('table'), function(table) { if (table.className.search(/\bsortable\b/) != -1) { sorttable.makeSortable(table); } }); }, makeSortable: function(table) { if (table.getElementsByTagName('thead').length == 0) { // table doesn't have a tHead. Since it should have, create one and // put the first table row in it. the = document.createElement('thead'); the.appendChild(table.rows[0]); table.insertBefore(the,table.firstChild); } // Safari doesn't support table.tHead, sigh if (table.tHead == null) table.tHead = table.getElementsByTagName('thead')[0]; if (table.tHead.rows.length != 1) return; // can't cope with two header rows // Sorttable v1 put rows with a class of "sortbottom" at the bottom (as // "total" rows, for example). This is B&R, since what you're supposed // to do is put them in a tfoot. So, if there are sortbottom rows, // for backwards compatibility, move them to tfoot (creating it if needed). sortbottomrows = []; for (var i=0; i
A conversation recently overheard at a gas station:
Man 1: Hang on, I'm going to get a lottery ticket.
Man 2: Okay. Hey, what's it at?
Man 1: It's like over $100 million. Want any?
Man 2: No. I only get interested when it's over $200 million.
So much for lottery fever, right? Do you remember when a prize of 100 million dollars would have people lining up wherever lottery tickets were sold, and even streaming across state lines to where they could play the lottery for that kind of prize? What's happened? Why don't we see that kind of frenzy anymore when the lottery reaches that level?
Not that long ago, I looked at the cost of risk versus the value of the benefit for taking the risk, and noted that the math involved for deciding whether or not to take a risk would be ideal for deciding whether or not to play the lottery. Using the tool I created, I found that for a $1.00 ticket, the amount of the grand prize had to be at least equal to the odds for winning it. In the case of the Powerball lottery, that means the grand prize has to be at least worth $120,526,660 to make the value of the benefit worth the $1.00 cost of the risk. The table below has the odds for the Powerball lottery for all its prizes:
Powerball Odds | ||
---|---|---|
Match | Prize ($USD) | Odds of Winning |
5 Regular + Powerball | Grand Prize | 1 in 120526770 |
5 Regular | $100,000 | 1 in 2939677 |
4 Regular + Powerball | $5,000 | 1 in 502195 |
4 Regular | $100 | 1 in 12249 |
3 Regular + Powerball | $100 | 1 in 10685 |
3 Regular | $7 | 1 in 261 |
2 Regular + Powerball | $7 | 1 in 697 |
1 Regular + Powerball | $4 | 1 in 124 |
Powerball Only | $3 | 1 in 70 |
Any Winning Combination | $??? | 1 in 36 |
So, why don't people get excited anymore when the prize levels get to the level where it would seem that the grand prize makes it worth taking the $1.00 risk? Are people really that blase' about the lottery these days? After thinking about it for a bit, one possible answer for the apparent apathy came screaming into my head: taxes!
Here's my thinking: income taxes substantially reduce the value of the benefit for the lottery's higher dollar prize winners. Winners of the grand prize will most likely have their winnings taxed at the highest income bracket levels, so to make the value of the benefit more compelling, the grand prize has to be much higher. This higher level will be directly related to the marginal tax rate that coincides with the amount of the prize.
So, I re-engineered my original calculator to directly solve for the value of the benefit that justifies the cost of the risk with the given odds and the federal, state and local income tax rates that may apply for the user. I've also simplified the interface so users may directly enter the odds of winning without having to enter a formula. You may alter the data to examine whether the grand prize of the lottery in your part of the world is worth playing:
Using this new calculator with the odds of winning the grand prize for the Powerball lottery and the federal, state and local maximum income tax rates given as default values, we find the the amount of the grand prize that makes the lottery worth the cost of taking the $1.00 risk is $213,321,717 - strangely near the level that Man 2 in the conversation I overheard indicated it would have to be for him to be interested in playing. It may just be coincidence, but it makes me wonder if people might naturally be finding their way to the "optimum" risk level in deciding what values justify the cost of taking this kind of risk. Definately food for thought.
Welcome to the blogosphere's toolchest! Here, unlike other blogs dedicated to analyzing current events, we create easy-to-use, simple tools to do the math related to them so you can get in on the action too! If you would like to learn more about these tools, or if you would like to contribute ideas to develop for this blog, please e-mail us at:
ironman at politicalcalculations
Thanks in advance!
Closing values for previous trading day.
This site is primarily powered by:
The tools on this site are built using JavaScript. If you would like to learn more, one of the best free resources on the web is available at W3Schools.com.