Election Model: Survey to Win Probabilities | Vose Software

ModelRisk example · General techniques

From a Survey to Probabilities: an Election

1,027 voters asked: how sure can we be who wins, and which alliance wins?

  • Complexity: ★★★★★
  • Free Excel workbook (GU-19)
  • Needs ModelRisk: free trial

From the model’s saved run

Who gets the most votes

Shares of the votes cast: in the survey, and the uncertainty about the true share.

PartySaid in the surveySurvey share10th pct90th pctChance of the most votes
SDP25927.0%25.1%28.8%14.6%
SMP27929.0%27.1%31.0%67.6%
PSM16216.9%15.4%18.5%0.0%
EDP26127.2%25.3%29.0%17.8%
Total100.0%
Each party's share of the votes cast

The business question

Before an election, 1,027 people were asked how they will vote: 259 SDP, 279 SMP, 162 PSM, 261 EDP, and 66 will not vote. SMP leads, but by only 2 points. How sure can we be that SMP wins? And if SDP allies with EDP, and SMP with PSM, which alliance gets more votes? The true shares are uncertain because only a sample was asked.

The Dirichlet distribution describes that uncertainty: each simulation draws one possible set of true shares, and each question becomes a 1/0 output whose mean is its probability.

Who it is for
Anyone turning survey or sample counts into uncertain shares: market shares from a panel, preferences from a customer survey, defect categories from an inspection sample, election polls.
Main outputs
Each party's share of the votes cast: survey value and 10th / 90th percentiles · the chance each party gets the most votes · the chance the SDP/EDP alliance beats SMP/PSM, simulated and exact, with five groups and with three.

How the model works

Three sheets after this one, read from left to right. Each one feeds the next.

  1. Inputs sheet

    How many people were asked and how many named each party; the rest will not vote.

  2. Shares sheet

    VoseDirichlet draws the five true shares (four parties and not voting) from the counts plus one each. Each party's share of the votes cast leaves out the non-voters. A 1/0 marks the party with the most. The alliances are answered twice: from the five shares, and from a Dirichlet over just the three groups the question needs, as the original example recommends.

  3. Results sheet

    Each party's share and its chance of the most votes; the alliance question simulated and exact.

ModelRisk techniques

  • Category shares VoseDirichlet
  • Uniform prior
  • Probabilities from 1/0 outputs
  • Exact answer BETA.DIST

Find similar models

Product

The results in detail

The alliances

Does SDP/EDP get more votes than SMP/PSM? Simulated, and exact (BETA.DIST).

Alliance margin
QuestionSimulatedExact
SDP/EDP gets more votes: five groups99.43%99.455%
SDP/EDP gets more votes: three groups99.51%99.459%
Alliance margin, SDP/EDP − SMP/PSM: mean8.2%

How to read these results

  • SMP leads the survey with 29.0% of those who will vote, ahead of EDP (27.2%) and SDP (27.0%). Only 1,027 people were asked, so each true share is uncertain by about ±2 points (10th to 90th percentile).
  • A 2-point lead is therefore not safe: SMP gets the most votes with a chance of about 68%, EDP about 18% and SDP about 15%. PSM, at 17%, cannot win.
  • The alliances are another matter: SDP/EDP has 54% of the votes cast against 46% for SMP/PSM, a lead far beyond the survey's uncertainty. SDP/EDP gets more votes with a chance of 99.5%.
  • Five groups or three: the Dirichlet adds one prior count to each group (the +1). The original example noted that splitting the vote into more groups than the question needs adds a little unneeded prior weight. Here it moves the exact answer by less than 0.01 points: with a survey this size the prior hardly matters.
  • The survey is assumed to be a random sample, and nobody changes their mind before the election. Real polls carry more uncertainty than this.

See it move. Open the workbook, change an input on the Inputs sheet and run the simulation: every table and chart on this page updates in Excel.

Inputs and assumptions

Every assumption in the model, with its uncertainty and where it comes from. The figures are illustrative.

The survey 5 inputs

How many people were asked, and how many named each party. The rest will not vote.

AssumptionUnitValue
People askedA random sample of the voterspeople1027
Said SDPpeople259
Said SMPpeople279
Said PSMpeople162
Said EDPpeople261

Units and conventions

Share of the votes cast
A party's share among those who vote: the non-voters left out.
1 = yes
A question's output cell: 1 when the answer is yes in that simulation; its mean is the probability.

Key assumptions and limitations

Random sample
The 1,027 people are a random sample of the voters.
No change of mind
Everyone votes as they said in the survey (the original example's assumption).
Prior
Before the survey every split of the vote was equally likely (a uniform prior: one added to each count).
Data
The survey is that of ModelRisk's earlier Election example.

How to use it

  1. Enter your survey on the Inputs sheet.
  2. Run a simulation from the ModelRisk ribbon (10,000 samples with a fixed seed are set).
  3. Read the chances on the Results sheet. To ask a new question, add a 1/0 cell on the Shares sheet and mark it as an output: its mean is the probability.

ModelRisk functions used

VoseDirichlet
The uncertain true shares of several categories, adding up to 100%, from counts plus the prior.
VoseOutput
The shares and the 1/0 answers, recorded at every sample.
VoseSimMean, VoseSimPercentile
Statistics of the simulation: the mean of a 1/0 output is its probability.
BETA.DIST
Excel's Beta distribution: the exact chance that one of two groups is larger.

Further reading

  • Monte Carlo simulation explained (Vose guide)
  • Vose, D. (2008). Risk Analysis: A Quantitative Guide, 3rd edition. Wiley: the multinomial process and the Dirichlet distribution.