2017 Election Forecast released

There are few things that annoy me more than how blogs and Twitter light up after the release of a single political poll.

Pundits will make the huge inferences from statistically insignificant changes, or attribute meaning to an event that occurred after polling finished.

Today I’m proud to release something I’ve been working on for a while, a forecast model for the 2017 New Zealand General Election. It is a mathematical model for analysing polling and determining what Parliament would look like if an election were held today.

Check it out here or via the permalink at the menu on the top of this page.

It takes all available public polling, adjusts for historical data (for instance, known bias’ that individual pollsters have), produces a weighted average based on recency and sample size.

It then produces an estimate of each party’s seat count in the Parliament.

No doubt people will have a ton of questions, hopefully the following will answer them. If you have any further questions, or ideas or suggestions, please either leave them on here, or email me directly on patrick.leyland@gmail.com

Lastly, my thanks to the many people on both sides of the Tasman (you know who you are) who have helped me with the coding, maths, and design. Hopefully you’ll find it useful!


  • The two main factors for weighting polls are how recent the poll is, and sample size. I use an exponential decay function to weight for recency, which has been calibrated so that after about 90 days a poll is treated as worthless. This usually means there are around 4 or 5 polls included in the current forecast (hopefully this number will increase as more polling is released during the election year).
  • I also adjust for sample size, but given the four main pollsters in New Zealand all use similar sizes (with the exception of Roy Morgan, which normally uses around 850 as opposed to 1,000), this weight has limited impact.
  • From this forecast party vote result, I extrapolate the number of seats in the House of Representatives using the Sainte-Laguë formula with an assumption that all electorate seats are held. While it is highly likely that some electorate seats will change hands, there is insufficient electorate-level polling to predict this with any degree of accuracy. If you want to see the results with a different set of electorate results, the Electoral Commission’s calculator is very good.
  • I’ll be updating the model after each poll is released, with a new blog post here to let you know how things have changed. Once it has been updated you’ll be able to see the individual poll results used to make up the forecast.
  • Any ideas for improvements, better data visualisation, or volunteers to help make that happen are always welcome!

Leave a Reply

Your email address will not be published. Required fields are marked *

11 − 6 =