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 is the probability that Senator Norm Coleman is really leading Al Franken in the polls for the U.S. Senate seat now being contested in Minnesota?
To answer that question, we've adapted our tool for finding the odds that a given candidate's lead in the polls reflects what the final outcome of an election will be. That tool reworked the math presented by Supercrunchers' author Ian Ayres in an Excel spreadsheet that, in our view, wasn't the easiest thing in the world to figure out how to use. We did an extreme makeover of Ian's user interface, developing it into a much more user-friendly format!
Today, we're going to rework that tool again to answer our question! First though, let's see where the current vote counts stand:
Minnesota U.S. Senator Vote Tallies, 15 November 2008 | ||
---|---|---|
Candidate | Votes Cast For Candidate | Votes Cast for Others or Unrecorded |
Norm Coleman | 1,211,565 | 1,708,853 |
Al Franken | 1,211,359 | 1,709,059 |
All Others | 462,578 | 2,457,840 |
All Candidates | 2,885,502 | 34,916 |
Taking the vote tally as of 15 November 2008 as kind of "superpoll," what we're really trying to find is the odds that Norm Coleman will retain his lead after all the ballots ruled valid in the original election count have been recounted.
What makes that less than a sure thing is the possibility of machine error in originally counting the ballots. Here, assuming that all the ballots originally counted for each candidate are valid, we need to take into account the number of ballots for which no vote for any U.S. Senate candidate was recorded, since this provides the pool of votes from which the final vote tallies produced in a recount may be drawn, provided that they contain a clear indication favoring a given candidate. Nate Silver indicates that the number of non-disqualified ballots is 34,916.
Combined with the number of ballots counted for all candidates, 2,885,502, this sum tells us the size of the total population of qualified ballots: 2,920,418. We'll take this total, as well as official vote tallies for both Norm Coleman and Al Franken and use our tool to find the likelihood that Senator Coleman will retain his lead, which has been certified by the state election board of Minnesota:
Using the tool with the vote totals recorded as of 15 November 2008, we find that the probability that Senator Coleman will retain his lead to be 55.8%. We do note that an additional nine votes have been counted in Senator Coleman's favor following an audit of Minnesota's voting machines, which have not been added to his vote total entered in the tool above - you're welcome to modify the values in the tool above to reflect these votes or other potential uncounted vote scenarios!
We find that 55.8% to be a fairly narrow, but positive margin, which perhaps explains why Al Franken has launched a number of lawsuits in an as-yet failing attempt to pad the total ballot count in order to maximize his chances of winning the recount.
Labels: election, politics, tool
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.