What is Electobot?

Briefly, Electobot is an open-source piece of software designed to predict the outcome of UK General Elections, based on national poll results.

Poll predictions are usually carried out using a technique known as the Uniform Swing Projection, or UNS. While a useful measure, UNS has its problems: first, swing is not uniform across the country, but varies by constituency, and secondly there are so many independent variables in play in an election that doing a single swing calculation cannot give you any sense of how likely a given outcome really is.

Electobot aims to solve this problem by carrying out a Monte Carlo simulation of an election, based on a UNS projection with variable swing based on historical data. I’ve typically been using it to run 1000 simulated elections for every set of poll results, giving me a range of more or less likely outcomes.

Because the code is open source, you’re very welcome to help me work on it and provide your own input. The code is hosted on Github, and I’d love to see you there!

Leave a comment