Like any reasonably politically engaged person, I have an interest in the outcome of elections. I suspect, along with various other people, that the 2010 election may have represented a turning point in the nature of British democracy, as it seems hard to imagine how we can return to the situation of having one party with an overall majority. It's a little ironic that people having voted "no" to any introduction to proportional representation - to obviate creating "weak, coalition government" - they may now discover that it has become a feature of our first-past-the-post system.
But how can you get any idea of what the outcome might be? How can you move from the sort of percentage support figures that are published as the results of opinion polls to guessing at the shape of a future parliament? The era of the red/blue "swingometer" is long gone. It sounds like the sort of problem that would require a dedicated team of analysts, banks of computers and a round the clock operation to incorporate up-to-the-minute results from every constituency. And yet, a prediction of the actual shape of the parliament, in terms of the number of seats for each party and what that might mean in terms of the horse-trading required to build a government after the election, is far more interesting than trying to guess a relationship between percentages in opinion polls and numbers of seats.
Here is one small aspect of the complexity of the situation. Conventional wisdom says that the Lib-Dems are going to have a severe battering in the polls, and lose lots of seats. But another facet is that UKIP is likely to take votes off the Conservatives, and also Labour. Let's take a simple but imaginary seat, from the 2010 election:
Con - 35%
Lib - 30%
Lab - 20%
Green - 8%
UKIP - 7%
Conservatives have a margin of 15% over Labour, and Liberals are going to lose lots of votes. But suppose 10% of the electorate go from Liberal to Green, 5% go from Liberal to Labour, 10% go from Con to UKIP. None of those are really wild figures; none are really big red/blue political swings. But look at the impact this has on the result this time:
Con - 25%
Lib - 15%
Lab - 25%
Green - 18%
UKIP - 17%
All five of these parties end up with a significant share of the vote. The actual result I've put there is less important than the general principle that relatively small shifts have the potential to drastically alter the political landscape.
I wondered how feasible it would be to produce a model, and if feasible, whether it might generate outputs which would look anything like the real world. I was convinced that it was probably not possible to produce a model which examined what was going on in every constituency - that really would require complex analysis. But it occurred to me that if I had information from every constituency from 2010, and assumed that the same political processes applied to each one, then I could infer what effect that might have in each constituency in the 2015 election. And to verify whether my guess at the political process was reasonable, I could add up the votes for each party, and compare them with the results of current opinion polls ....