<p><div><div><div><div data-show-faces="false" data-height="21" data-width="100" data-layout="button_count" data-send="true" data-href="https://www.r-bloggers.com/exit-poll-for-june-2017-election-uk/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="https://statgeek.net/2017/06/11/exit-poll-for-june-2017-election-uk/"> R – Let's Look at the Figures</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p><a rel="nofollow" href="https://twitter.com/d_spiegel/status/873082399726358528" target="_blank"><img data-orig-file="https://statgeek.files.wordpress.com/2017/06/spiegelhalter-twitter-2017-06-091.png?w=456" data-orig-size="371,307" data-medium-file="https://statgeek.files.wordpress.com/2017/06/spiegelhalter-twitter-2017-06-091.png?w=456?w=300" data-attachment-id="673" data-image-meta="{" data-image-description="" src="https://statgeek.files.wordpress.com/2017/06/spiegelhalter-twitter-2017-06-091.png?w=456" data-permalink="https://statgeek.net/2017/06/11/exit-poll-for-june-2017-election-uk/spiegelhalter-twitter-2017-06-09-2/" data-large-file="https://statgeek.files.wordpress.com/2017/06/spiegelhalter-twitter-2017-06-091.png?w=456?w=371" alt="Spiegelhalter-Twitter-2017-06-09" data-image-title="Spiegelhalter-Twitter-2017-06-09" sizes="(max-width: 371px) 100vw, 371px" data-comments-opened="1" class="wp-image-673" data-recalc-dims="1"><br>
</a></p>
<p>It has been a while since I posted anything here, but I can’t resist this one.</p>
<p>Let me just give three numbers.  The first two are:</p>
<ul>
<li><strong>314</strong>, the number of seats predicted for the largest party (Conservatives) in the UK House of Commons, at 10pm in Thursday (i.e., before even a single vote had been counted) from the exit poll commissioned jointly by broadcasters BBC, ITV and Sky.</li>
<li><strong>318</strong>, the actual number of seats that were won by the Conservatives, now that all the votes have been counted.</li>
</ul>
<p>That highly accurate prediction changed the whole story on election night: most of the pre-election voting intention polls had predicted a substantial Conservative majority.  (And certainly that’s what Theresa May had expected to achieve when she made the mistake of calling a snap election, 3 years early.)  But the exit poll prediction made it pretty clear that the Conservatives would <em>either</em> not achieve a majority (for which 326 seats would be needed), or <em>at best </em>would be returned with a very small majority such as the one they held before the election.  Media commentary turned quickly to how a government might be formed in the seemingly likely event of a hung Parliament, and what the future might be for Mrs May.  The financial markets moved quite substantially, too, in the moments after 10pm.</p>
<p><strong>For more details on the exit poll, its history, and the methods used to achieve that kind of predictive accuracy, see <a rel="nofollow" href="http://warwick.ac.uk/exitpolling" target="_blank">Exit Polling Explained</a>.</strong></p>
<p>The <em>third</em> number I want to mention here is</p>
<ul>
<li><strong>2.1.0</strong></li>
</ul>
<p>That’s the version of R that I had at the time of the 2005 General Election, when I completed the development of a fairly extensive set of R functions to use in connection with the exit poll (which at that time was done for BBC and ITV jointly).  Amazingly (to me!) the code that I wrote back in 2001–2005 still works fine.  My friend and former colleague <a rel="nofollow" href="http://stats.lse.ac.uk/kuha/" target="_blank">Jouni Kuha</a>, who stepped in as election-day statistician for the BBC when I gave it up after 2005, told me today that (with some tweaks, I presume!) it all works brilliantly still, as the basis for an extremely high-pressure data analysis on election day/night.  Very pleasing indeed; and strong testimony to the heroic efforts of the R Core Development Team, to keep everything stable with a view to the long term.</p>
<p>As suggested by that kind tweet reproduced above from the RSS President, David Spiegelhalter: Thursday’s performance was quite a triumph for the practical art and science of Statistics.  [And I think I <em>am</em> allowed to say this, since on this occasion I was not even there!  The credit for Thursday’s work goes to Jouni Kuha, along with John Curtice, Steve Fisher and the rest of the <a rel="nofollow" href="https://www.bloomberg.com/news/articles/2017-06-08/how-the-secret-general-election-2017-exit-poll-is-produced" target="_blank">academic team of analysts</a> who worked in the <a rel="nofollow" href="http://money.cnn.com/2017/06/08/news/exit-poll-uk-general-election/index.html" target="_blank">secret exit-poll “bunker”</a> on 8 June.]</p>
<p><img data-orig-file="https://statgeek.files.wordpress.com/2017/06/power-to-the-nerds-2017-06-08.png?w=456" data-orig-size="362,320" data-medium-file="https://statgeek.files.wordpress.com/2017/06/power-to-the-nerds-2017-06-08.png?w=456?w=300" data-attachment-id="675" data-image-meta="{" data-image-description="" src="https://statgeek.files.wordpress.com/2017/06/power-to-the-nerds-2017-06-08.png?w=456" data-permalink="https://statgeek.net/2017/06/11/exit-poll-for-june-2017-election-uk/power-to-the-nerds-2017-06-08/" data-large-file="https://statgeek.files.wordpress.com/2017/06/power-to-the-nerds-2017-06-08.png?w=456?w=362" alt="Power-to-the-nerds-2017-06-08" data-image-title="Power-to-the-nerds-2017-06-08" sizes="(max-width: 362px) 100vw, 362px" data-comments-opened="1" class="wp-image-675" data-recalc-dims="1"></p>
<p> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/statgeek.wordpress.com/550/" target="_blank"><img border="0" alt="" src="http://feeds.wordpress.com/1.0/comments/statgeek.wordpress.com/550/"></a> <img border="0" alt="" src="https://i1.wp.com/pixel.wp.com/b.gif?resize=1%2C1&ssl=1" data-recalc-dims="1"></p>
	<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="https://statgeek.net/2017/06/11/exit-poll-for-june-2017-election-uk/"> R – Let's Look at the Figures</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a rel="nofollow" href="https://www.r-project.org/" title="The R Project for Statistical Computing">R</a> news and <a rel="nofollow" href="https://www.r-bloggers.com/search/tutorial" title="R tutorials">tutorials</a> on topics such as: <a rel="nofollow" href="https://www.r-bloggers.com/search/data%20science" title="Data science">Data science</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data" title="Big Data">Big Data, <a rel="nofollow" href="https://www.r-users.com/" title="R jobs">R jobs</a>, visualization (<a rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2" title="ggplot and ggplot2 tutorials">ggplot2</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/boxplot" title="Boxplots using lattice and ggplot2 tutorials">Boxplots</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/map" title="Maps and gis">maps</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/animation" title="Animation in R">animation</a>), programming (<a rel="nofollow" href="https://www.r-bloggers.com/search/RStudio" title="RStudio IDE for R">RStudio</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/sweave" title="Sweave and literate programming">Sweave</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX" title="LaTeX in R">LaTeX</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/SQL" title="SQL and databases">SQL</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/eclipse" title="Eclipse IDE for R">Eclipse</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/git" title="git and github, Version Control System">git</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/hadoop" title="Large data in R using Hadoop">hadoop</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping" title="Web Scraping of google, facebook, yahoo, twitter and more using R">Web Scraping</a>) statistics (<a rel="nofollow" href="https://www.r-bloggers.com/search/regression" title="Regressions and ANOVA analysis tutorials">regression</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/PCA" title="principal component analysis tutorial">PCA</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/time+series" title="Time series">time series</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/trading" title="finance trading">trading</a>) and more...

	<img alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/Sf_5V4Hibso" height="1"></a></div>