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
What are the odds that the winner of an political contest would be determined by their ability to win six, and just six, separate coin flips?
CBS Marketwatch details the drama from Iowa:
While it was hard to call a winner between Hillary Clinton and Bernie Sanders last night, it’s easy to say who was luckier.
The race between the Democrat presidential hopefuls was so tight in the Iowa caucus Monday that in at least six precincts, the decision on awarding a county delegate came down to a coin toss. And Clinton won all six, media reports said.
So how "lucky" was Hillary Clinton so late in the evening of 1 February 2016?
We can find out by calculating the probability of correctly calling a coin toss six times in a row, which will tell us how likely that achievement really is. Here, each flip of the coin presents the people calling either heads or tails with a 50% chance of being right. But how do the odds of success change when a coin is flipped six times, where in order to be declared the winner of a contest, the outcome of the coin toss must be called correctly by a contestant all six times?
Well, we don't call ourselves Political Calculations for nothing. We built a tool to do that math! To find out what we did, just click the "Calculate" button below. (And if you're accessing this article on a site that republishes our RSS news feed, please click here to access a working version of our tool on our site.)
We find that the percentage odds of correctly calling the outcome of 6 coin tosses exactly 6 times by chance is 1.56%, or rather, the odds are that this exact outcome will occur by chance just once in 64 opportunities.
Which is also to say that there was a 98.44% chance that this outcome would not occur by chance.
As for how likely or unlikely that event is, we did some probability math with data for the Dow Jones Industrial Average that goes back to 2 May 1885, where we found that the odds of winning six out of six coin tosses is slightly more likely that seeing the value of the Dow close below its previous day's closing value on five consecutive days. That is something that has happened in real life some 482 times over the 35,889 days for which we have this data, which works out to be a 1.34% probability of occurring by chance.
The bottom line is that it's unlikely that chance alone explains the outcome of a political candidate winning six out of six coin tosses, but it's not as completely improbable as you might think.
And for the record, we've routinely done far more improbable things than that for years!
Richard Lowry presents the detailed calculations and an online calculator for finding binomial probabilities that gets around our tool's limitation of 170 opportunities!
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.