Electoral Result Projection Calculator
Electoral Result Projection Calculator
Jamie Deith, 8-Dec-2010
First Past The Post
Calculate a voter migration matrix
Overview
A migration matrix predicts how Party X's supporters in the previous election will vote in the next election. The current method assumes that a party polling above its previous popular vote will, on balance, keep all of its voters (and capture some from other parties). Conversely, a party polling below last election's popular vote will be losing some of its voters to other parties whose polling numbers have improved.
Method
a) Start with an NxN identity matrix as the Migration matrix, where N is the number of parties (currently 6 including the nebulous OTH party). The identity matrix is all zeros except at the diagonals.
b) Index the parties from 1 to N
c) Find the party with the greatest drop in support since last election (Losing party), and the party with the greatest increase in support (Gaining party). Determine which of these has the lower magnitude change and use this as the Vote Transfer.
d) Calculate what percentage of the Losing party's vote from last election would have to shift to the Gaining party to match the Vote Transfer. This is the Shift Rate.
e) If L is the index of the Losing party, and G the index of the Gaining party, then decrease entry (L,L) in the Migration matrix by the Shift Rate, and increase entry (L,G) – meaning row L and column G – by the Shift Rate.
Example to illustrate a) through e): Imagine a 3-party system with the parties shown in the table below. Red Party support in the last election was 25%, and now they are polling at 37%. Yellow Party support in the election was 40% and now they poll at 30%. Yellow (-10%) and Red (+12%) are the largest gains and losses amongst the parties. Yellow is our Losing party and Red the Gaining party. The Vote Transfer is the lesser of the swing magnitudes, or 10%. The Shift Rate is the Vote Transfer divided by the Losing party's election support (or 10%/40%=0.25). The migration matrix is transformed as follows:
Starting Migration Matrix ⇨ Migration Matrix After 1st Adjustment
Yellow (40%⇨30%) Purple (35%⇨33%) Red (25%⇨37%) Yellow Purple Red
Yellow 1 0 0 1-.25=.75 0 0+.25=.25
Purple 0 1 0 0 1 0
Red 0 0 1 0 0 1
Support implied by Matrix 40% 35% 25% 30% 35% 35%
Change to match polls -10% -2% +12% - -2% +2%
f) Calculate the new support levels implied by the adjusted migration matrix. (The only support levels that will change will be the Losing party dropping by the Vote Transfer and the Gaining party increasing by the Vote Transfer.
g) Repeat steps c) through e), only use the new support levels from the previous step instead of the election support numbers.
h) Repeat steps f) and g) until there are no more adjustments to be made. As many as N-1 adjustments need to be made before the Migration matrix implies the correct support levels for all of the parties.
Example to illustrate f) through h): Since our example uses only 3 parties, we only need to make one more adjustment before the Migration matrix is finished. In this case Purple will be the Losing party, Red the Gaining party, and the Vote Transfer is 2%. The Shift Rate is the Vote Transfer divided by Purple's previous election support, or 2%/35%=0.05714. You can interpret the final Migration matrix like this:
- Yellow will keep only 75% of its supporters, bringing its vote from the 40% in the last election to the 30% it is getting in the polls
- Purple will keep 94% of its supporters, moving it from 35% in the previous election to 33% in the polls
- Red keeps 100% of its supporters from the last election, plus 25% of Yellow's vote and 5.7% of Purple's vote
Migration Matrix After 1st Adjustment ⇨ Migration Matrix After 2nd Adjustment
Yellow (30%) Purple (33%) Red (37%) Yellow Purple Red
Yellow 0.75 0 0.25 0.75 0 0.25
Purple 0 1 0 0 0.9429 0.0571
Red 0 0 1 0 0 1
Support implied by Matrix 30% 35% 35% 30% 33% 35%
Change to match polls - -2% +2% - - -
Apply the Migration Matrix To All The Ridings
Once we have estimated how voters are going to shift their support between parties, we can estimate new vote counts riding by riding. Using our 3-party example, let's do this for 2 ridings:
Riding A Results Yellow Purple Red Winner
Votes Last Election 500 300 400 Yellow
Apply Migration Matrix 500*.75=375 300*.9429=283 0.25*500+0.0571*300+1*400=542 Red
Riding B Results Yellow Purple Red Winner
Votes Last Election 400 600 500 Purple
Apply Migration Matrix 400*.75=300 600*.9429=566 0.25*400+0.0571*600+1*500=634 Red
After the migration matrix is applied to all the ridings, all that is left is to accumulate the results:
– How many ridings is each party projected to win?
– How many of those wins are by less than the 'too close to call' margin (arbitrarily 3.5%)
– How many of the losses are less than that margin
Using the above you can construct the projected number of seats and the range of likely outcomes.
Proportional Representation
The formulas here are pretty simple.
Projected number of seats:
– Calculate Pre-remainder seat counts as int(Total Seats x Party Support).
– Determine each party's remainder as (Total Seats x Party Support) – party's Pre-remainder seats.
– Determine unallocated seats as U=Total Seats – sum of Pre-remainder seats.
– Assign the unallocated seats to the U highest remainders. The resulting allocations are the projected seats for each party.
Range of seats:
– Projected seats +/-2
