No truth stands alone.

Australian Federal Two-Party-Preferred Estimator

In Australian politics, the two-party-preferred (2pp) refers to how many voters place a Labor candidate over the Liberal/National candidate or vice versa. 2pp estimates are often used to produce a better overview of the Labor vs Liberal/National contest, and remain broadly predictive of election outcomes despite the recent increase in the share of votes for parties other than Labor/the Coalition.

(I do have a piece planned which attempts to model the point at which 2-party vote no longer becomes predictive/decisive, but that’s for later)

Under the preferential voting system, voters rank the candidates on their ballot in order of which ones they prefer to be elected first. For example, let’s say we had four candidates running in an electorate, from the Labor, Liberal, National and Democrat parties.

A hypothetical voter might prefer that the National candidate is elected first of all, but if the National can’t win, they would prefer that the Liberal is elected, and then prefer the Democrat candidate over the Labor candidate. This voter would fill in their ballot as such:

  1. FLUGGE, Trevor
    NATIONAL
  2. TUCKEY, Wilson
    LIBERAL
  3. PEEBLES, Shyama
    AUSTRALIAN DEMOCRATS
  4. CHANCE, Kim
    AUSTRALIAN LABOR PARTY

In a House of Representatives (the lower house, where government is formed) election, all ballots are first processed and counted, and a primary vote (or first-preference vote) tally produced. This refers to the % of voters who put one party first. For example, if one in five voters put the National candidate first, then the National Party would have a primary vote of 20%.

Once all ballots have been processed and counted, the candidate with the lowest primary vote is sequentially eliminated, and their voters’ ballots will be transferred to their next preference. For example, let’s say that in this election, each party has a primary vote of:

Liberal 49.5% Labor 25.1% National 23.1% Democrat 2.4%

The Democrat candidate will be eliminated first, and their votes transferred to each voter’s second preference. For simplicity’s sake, let’s assume that half of Democrat voters placed Labor 2nd, while a quarter each placed the Liberal and National candidates second.

Liberal 50.1% Labor 26.3% National 23.7%

Note that this is entirely controlled by who the voters place second on their ballot – candidates and parties do not have any control over where preferences go. A party or candidate may recommend preferences using how-to-votes and other material, but where the ballot travels next is entirely up to the voter.

You may occasionally hear of “preference deals” and “(party) directs preferences to (party)” in the news or other media. This only refers to the parties’ ability to recommend that their voters put Party A over Party B. If a voter decides to ignore this recommendation and preference Party B over Party A, their ballot will go to Party B’s candidate at full value.

The proportion of primary votes for a certain party which are then transferred to another party is also known as the preference flow. In this case, the preference flow for Democrat votes would be 50% Labor, 25% Liberal and 25% National.

While preference flows are referred to as percentages, note that in the House of Representatives, there is no partial vote transfer. If you hear that the preference flow from the Greens to Labor is 80%, that doesn’t mean that 80% of each Green vote goes to Labor. It means that four of five (80%) Greens voters put the Labor candidate ahead of the other candidate on their ballot, while one in five (20%) put the other candidate ahead of Labor.

Preference flows are a useful way to calculate the outcome of a preferential-voting contest. For example, if I told you that in an election, Labor won 48%, the Liberals won 32% and the Nationals won 20%, if you know what the National -> Liberal preference flow is, you can calculate the final Labor-versus-Liberal result in that election.

Speaking of which, let’s finish our example preferential-voting election. As the National candidate has the lowest vote share of the remaining candidates, he is eliminated. Since our hypothetical voter from earlier voted 1 National 2 Liberal, their vote is then transferred to the Liberal. Had they instead voted 1 National 2 Democrat 3 Labor 4 Liberal, their vote would instead be transferred to Labor (as the Democrat candidate has already been eliminated).

For simplicity’s sake, let’s assume that 80% of all voters who voted 1 National or 1 Democrat 2 National then places the Liberal candidate over the Labor candidate.

Liberal 69% Labor 31%

The vote shares of the final two candidates is often referred to as the two-candidate-preferred, or 2cp for short. It is sometimes also referred to as the two-party-preferred; however this can be confusing for reasons explained below.


Because Labor and Coalition parties tend to have the largest vote shares at Australian elections, in most electorates the race comes down to a Labor-vs-Coalition contest (as parties/candidates with smaller shares of the vote get sequentially eliminated).

In these electorates, it’s easy to figure out what share of the population prefers Labor over the Coalition or vice versa, using the two-candidate-preferred (2cp) figure produced through the instant-runoff system.

However, in some electorates, the final two candidates may not consist of a Labor and a Coalition candidate. Candidates from one of the smaller parties (e.g. Greens, One Nation, Katter’s Australian, Centre Alliance) may receive more votes (or more preferences) than one or both major parties.

Additionally, there are instances when the final-two pairing ends up being one Coalition candidate against another.

When the final-two pairing is not a Labor versus Coalition contest, this is known as a non-classic contest.

For all non-classic electorates, the Australian Electoral Commission (AEC) will go back through the ballots, and do a count of how many voters placed the Labor candidate over the Coalition candidate(s), or vice versa.

This allows the AEC to determine what share of voters ‘prefer’ Labor over the Coalition in every electorate. This proportion is known as the two-party-preferred or 2pp for short.

The AEC also calculates statistics such as how many voters for each party placed the Coalition over Labor or vice versa, allowing the determination of two-party preference flows. For example, 82.21% of Greens voters placed Labor over the Coalition at the 2019 federal election.

Two-party-preferred can be quite a useful statistic both at the seat level and nationally. For example, if you live in a non-classic seat with an Independent MP, and said Independent MP is retiring at the next election, you might be interested to know if your seat is more likely to fall to Labor or to the Coalition. In the event of a hung parliament, minor-party and independent MPs may be interested to know if their seat’s voters would prefer that they support a Labor or Coalition government.

Two-party-preferred also helps make sense of changes in primary vote share. If I came up to you and told you that Labor’s primary vote has declined by 3 points, with the Coalition gaining one point, the Greens gaining one point and other minor parties collectively gaining one point, it’s not immediately apparent what that means for most seats (which are Labor-vs-Coalition contests).
On the other hand, if I told you that there’s a two-party-preferred swing of 1.7% against Labor, you can look up the two-party-preferred of all electorates at the last election and get some idea of which seats might fall.

Note that two-candidate-preferred and two-party-preferred are not the same thing. While they can be the same if the final two candidates are Labor and a Coalition candidate, two-candidate-preferred specifically refers to the final vote shares between the final two candidates in an electorate, while two-party-preferred refers to the proportion of voters in that electorate who prefer Labor over the Coalition or vice versa.

Although two-party-preferred remains the best way to get an overview of which side is ahead in the race for government, not all polls provide an estimate of the two-party preferred, and some may use the less-accurate method of asking voters for minor parties/independents for their preferences. There are two broad categories of estimating two-party-preferred for a given set of first-preference votes:

Last-election preference flows: This assumes that preferences from each minor party (or group of minor parties) will flow to a given major party at the same rate as the last election.
For example, if 85.7% of Green voters put Labor above the Coalition at the last election, this method assumes that 85.7% of Green voters will again put Labor above the Coalition at the next election.

Respondent-allocated preferences: This involves asking minor-party voters who they intend to preference, and then calculating a two-party-preferred estimate using said preference flows and the primary vote shares of each party.

Last-election preference flows has historically been more accurate than asking respondents who they intend to preference. Historically, a given party’s preference flows usually don’t shift much between elections. Additionally, minor party voters typically make up a small proportion of any sample and hence random noise significantly stuffs up estimates of a minor party’s preference flows.

Notably, Roy Morgan’s respondent-allocated preferences have skewed to Labor by quite a few points in the past (compared to last-election preference flows calculated using the published primary vote).
The calculator below takes estimates of each party/grouping’s first-preference vote (also known as primary vote) and calculates an expected two-party-preferred using preference flows at the 2022 federal election, with a few options to change preference flows.

If you want to batch-convert several sets of primary votes to a two-party-preferred figures, I’ve uploaded a spreadsheet here which contains the formulae to do so.

Enter the first-preference (i.e. primary vote) for each party/grouping below. Primary vote figures will be re-calculated such that they sum to 100%.

%
%
%
%
%
%
or
%
%
%
%

If you’re getting these estimates of primary vote from an opinion poll, note that not all polls have their primary vote estimates sum to 100.

Some pollsters leave out the “Undecided” component, and rounding can sometimes result in figures adding up to more or less than 100%.

Are you sure you want to auto-fill Others such that all figures sum to 100%?

Calculate 2pp estimate

An error occurred!

Check to ensure that all fields have been filled in, and that no input is negative or greater than 100.

The primary vote inputs already exceed 100%!

The primary vote inputs are less than or equal to 0%!

Greens

2022

85.7%
14.3%



One Nation

2022

35.7%
64.3%



Palmer’s UAP

2022

38.1%
61.9%



Independents and Other Parties

2022

54.7%
45.3%



How much uncertainty is there in this estimate?

Historically, using preference flows from the last election has been the best method to estimate two-party-preferred. However, preference flows do shift from one election to another. To model this uncertainty, we use historical shifts in minor-party preference flows to randomly generate preference flow shifts, then calculate a 2pp using these and the primary vote figures above.

When the calculator is run, a sample of these 2pp estimates will be plotted below in a swarm plot.

This is not a model of polling error!

Keep in mind that this only models uncertainty in preference flows; it assumes that the primary votes above are exactly what each party gets. Primary vote data from polls etc also has the potential for error (especially polls taken far out from election day); therefore the 2pp uncertainty for a poll is usually much higher than what is displayed below.



Generate new sample


How does this work?

Firstly, the calculator takes the primary vote inputs and redistributes them such that they sum to 100. This is to handle pollsters which don’t drop the undecided vote (Essential) and pollsters who release rounded primary vote figures (which occasionally sum to 99 or 101). Note: dropping undecideds effectively assumes that undecided respondents will vote in a similar manner to decided respondents. This may or may not be an accurate assumption but it’s one that pretty much all pollsters make. For example, if you go onto a Newspoll methodology statement, you’ll see a section on undecided voters which says “x% were thus excluded from published voting-intention figures”.

Having said that, there is no long-term bias in Australian polling as a whole, with the few biases that exist having declined in recent elections. Hence, this is probably a valid assumption to make.

(Polls which don’t drop the undecided or who release primary vote figures which don’t sum to 100% are why there is a warning message associated with the “Allocate remaining vote to Others” button)

Secondly, it then uses two-party preference flows for each party/grouping to calculate a two-party-preferred estimate. This is a pretty simple process – multiply the preference flow (e.g. 0.8566 Green -> Labor) by the primary vote for each minor party/grouping and add them to the primary vote for each major party. Preference flows used are either the ones for each party at the 2019 federal election, The default preference flow for all other parties + independents (Others/OTH in polling) will change depending on whether the UAP is included in others, or split out.

I may add options to customise the primary vote and preference flow for other minor parties if pollsters begin regularly asking about voting-intention for said parties separately.
or custom preference flows if the user has set them.

As part of estimating the two-party-preferred, a leakage term is also included. In some seats, there were both Liberal and National Party candidates, with not all of their voters opting to preference the other over Labor. Hence, if a two-party-preference estimate for such seats is produced using (Liberal vote + National vote + preferences from other parties), it would over-estimate the Liberal/National two-party-preferred.

To deal with this, I simply compare the estimate based on the actual primary votes and preference flows to the actual two-party-preferred in 2019; my current estimate is that the Coalition’s 2pp is about 0.03% lower than in a world where every Liberal/National voter always placed the other Coalition party ahead of Labor in three-cornered contests.

Lib/Nat 2pp estimate using preference flows = 35.7% + 12.25% × 0.1434 + 4.96% × 0.643 + 4.12% × 0.6186 + 10.39% × 0.4527 = 47.90%

Actual Coalition 2pp = 47.87%

Leakage penalty = 47.90% – 47.87% = 0.03%

Thirdly, it generates 1 000 random preference-flow shifts. To do this, it uses historical variation in the preference flows of each minor party and the Others grouping, with each party split out from Others modelled separately. This is so that minor parties with significantly more or less volatility in their preference flows get modelled differently.

For example, the Greens preference flow has been fairly stable over time, while One Nation has shown that a chunk of its voters can change preferencing patterns fairly rapidly. The standard-deviation for each minor party is listed below:

GRN: 0.035

PHON/UAP: 0.1

OTH: 0.06
It then dynamically produces a probability distribution for the preference flow of each minor party using the expected preference flow and the uncertainty in each minor party’s preference flows.

(In stats-speak: it uses method of moments to calculate α and β for a beta distribution using the mean and variance as inputs)

Fourthly, it uses the same method described above to calculate a two-party-preferred estimate using the primary vote inputs and the randomly-generated preference flows. Note that it does not randomly generate primary vote figures and therefore does not account for polling error.

Next, it samples the generated two-party-preferred and displays the sample in a swarm plot. This sampling is not random; due to issues with spacing, a small number of points are displayed in smaller devices (if your device is less than 400px wide, it should only display 25 points). Hence, there is a decent probability that a small random sample would be unrepresentative.

Instead, it orders the generated two-party-preferred from smallest to largest, and then samples at equal intervals. For example, if 99 points are to be displayed, it grabs the 10th smallest 2pp, then the 20th smallest 2pp, then the 30th smallest, etc until it has all the points needed. This ensures that a representative sample is produced, although it has the side effect of removing any outliers from the sample (and hence from the plot). For the purposes of a graphical representation, I don’t think it’s a particular issue that extreme outliers don’t appear in the swarm plot. The purpose isn’t to show exact points (which would be hard to do without overlapping) but to provide a general feel for the uncertainty in the 2pp estimate.

Finally, it then goes into the full sample of generated two-party-preferred, and grabs the 5th smallest and 5th largest two-party-preferred figures. It then uses these to construct a 99% confidence interval, which is a range in which we’d expect the two-party-preferred to be 99% of the time given the primary vote and preference flow inputs above. For reference, the “margin-of-error” you hear cited with some polls refers to a 95% confidence interval given some assumptions about polling. Namely, the assumption that the sampling is random, with every Australian voter having an equal probability of being sampled. Despite pollsters’ efforts to construct a representative sample, this is often not the case and hence the true 95% confidence interval is often somewhat wider than the margin-of-error claimed by pollsters.

× Home Politics Economics Projects
×

You appear to be using an outdated browser, for which this site is not optimised.

For your security, we strongly recommend you download a newer browser.

Although any of the latest browsers will do, we suggest the latest version of Firefox.

Download Firefox here

(Click on the button in the top-right to close this reminder)