How Bayesian Predictive Modelling is used for Election Analysis

As a student of statistics or analytics, you will know why the Bayesian logic is applied to decision making and inferential statistics for probability inference.  It is the way to quantify a situation with an uncertain outcome by determining its probability. The Bayesian model defines a rule for refining a hypothesis – factoring-in additional evidence and background information. For election analysis, the dynamic Bayesian forecasting model is often a preferred method for both forecasting of election outcomes and studying the distribution of votes over geographic, demographic, and political variables. This method systematically combines information from historical forecasting models in real time with results from the large number of constituency-level opinion surveys released publicly during the campaign. The result is a set of forecasts that is as good as the historical model, increasing in accuracy as Election Day approaches.

Forecasting elections using Bayesian Model

Election analysis has become a very hotly pursued and debated issue, especially as the verdict day approaches. It is comparatively easy to predict the winner of the U.S. presidential elections, where you have only two presidential candidates. A Bayesian prediction model used for the U.S. Presidential Elections will concentrate on the Electoral outcome taking into consideration merely the self-proclaimed undecided voters. Estimators are incorporated into a dynamic programming algorithm to determine the probability of one candidate winning the election against the other.

However, in a large electorate like India, the Government formed is the political party or group of coalition parties who secure majority votes, with the respective projected Prime Ministerial candidate. Taking the current 2014 Lok Sabha elections as case study, the electorate is spread across 122 constituencies across the country with nine polling stages over 36 days.

Herein, a Bayesian analysis for election forecasting will differ from a frequentist analysis as it will be based on the probability of the hypothesis, working with given data. Such data are constantly updated observations as voter sentiments change with election speeches. A rigorous approach is applied to transform constituency polling data to winning party forecasts and incorporating undecided voters using ‘swing voter effects’ and emotionally heated peaks. Also pockets or valleys of tightly contested election are converted to a rational probabilistic representation of the likely winning party / candidate.

As polling data changes so do predictions on a real-time streaming basis. The dynamic  Bayesian methodology can be applied at any point during the campaign cycle to compare and capture these changes,  and allocate appropriate weights to provide practical predictions even in the most volatile and unpredictable scenario.

Bayesian methods are useful in the design and analysis of election surveys, although models depend upon specific features of data collection and goals of inference.

Hierarchical modelling

Electoral data has a natural hierarchical structure (regions, electoral constituencies, parties, multiple elections) that leads to hierarchical models and data display, suggesting natural ways of model validation. This also overcomes the limitation of constituencies being  polled on different days, allowing the model to borrow strength across both, constituencies and time differences. Thus day-to-day variations in the polls are filtered with sampling error and national campaign effects, making possible daily tracking of voter preferences at the constituency and national levels. Simulation techniques can help estimate a party’s probability of winning each constituency and consequently, across the nation.

A dynamic Bayesian forecasting model enables early and accurate prediction of election outcomes making use of the following:



  • The Historical Forecast
  • Survey design
  • Data analysis
  • Updating Forecasts Using Pre-election Polls
  • Prior Sensitivity Analysis
  • Trends in Voter Preferences during the Campaign
  • Pre-poll night forecasting


Election outcomes are thus being predicted with almost true accuracy, as was proven during the 2012 US Presidential elections and the 2013 Delhi assembly elections.


From Rediff’s “Making Sense of the Aam Aadmi Party Win in the Delhi Elections

Rediff data experts mined terrific insights from how the nation’s capital voted in the assembly elections at Delhi (2013). The graph shows that voters who are (a)graduates with (b)high English Literacy, (c)holding white collar jobs and (d) who use the Internet extensively,  favoured AAP.




In the analysis of electoral data, you now know it is possible to forecast or analyse elections accurately, but can you develop your own model for doing so?

While devising an appropriate Bayesian model for election analysis, here are some criteria to guide you – although you are encouraged to work on your own idea:

  1. Do the estimates of the constituency opinion trends make sense?
  2. How close are the constituency-level vote forecasts to the actual outcomes, over the course of the campaign?
  3. What proportion of winners are correctly predicted?
  4. Are the competitive constituencies identified early and accurately?
  5. How accurate is the overall electoral vote forecast?
  6. Is there an appropriate amount of uncertainty in the electoral vote forecasts?

Submit the same at  and the most innovative model will receive a cash voucher, books and maybe a chance to be featured in media!  Last date for receiving submissions: 25th May.



Suggested Reads:


Dynamic Bayesian Forecasting of Presidential Elections in the States

Using Tweets and Bayesian Statistical Modeling to predict the 2012 Presidential Elections


Related Blogs from IVY:

Sentiment Analysis

Text Analytics

Social Media Analytics

Role of Analytics in ‘Elections 2014

Featured ‘Start-up of the Month’ – ZT Analytics, Hyderabad

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.