eggers_vivyan_probability_of_tie_for_first: Fast computation of plurality pivot probabilities given...

View source: R/eggers_vivyan_plurality_pivot_probs.R

eggers_vivyan_probability_of_tie_for_firstR Documentation

Fast computation of plurality pivot probabilities given Dirichlet beliefs

Description

Returns probability of a tie for first between two candidates in a k-candidate plurality election given Dirichlet beliefs, not normalized for electorate size. Uses the approximation introduced by Eggers & Vivyan (2020), which (when there are more than three candidates) involves an independence assumption on the vote shares of candidates 3 to k.

Usage

eggers_vivyan_probability_of_tie_for_first(alpha, increments = 50)

Arguments

alpha

Length-k parameter vector for Dirichlet belief distribution. See Details.

increments

Number of points at which to compute the probability of candidates 1 and 2 tying for first. More increments means a more precise estimate.

Details

The estimates are not normalized for the size of the electorate (and thus could be larger than 1). Dividing by the electorate size gives (an approximation of) the true pivot probability.

Dirichlet beliefs for a k-candidate plurality election are characterized by a length-k vector alpha. It may be helpful to think of alpha as the product of a vector of expected vote shares (mu_1, mu_2, ... mu_k) and a scalar precision parameter s. Eggers & Vivyan (2020) find that the precision of UK election forecasts is characterized by s=85. So, given an expected result of c(.4, .35, .25) we might model the result by setting alpha to c(.4, .35, .25)*85.

For k=3 candidates the Eggers-Vivyan method produces exact pivot probabilities (as increments goes to infinity, and after dividing by electorate size).

For k>3 candidates the probability of unlikely ties for first is overstated due to the independence assumption: the probability of candidates 1 and 2 tying for first at a given vote share x is approximated by the product of

  • the probability of candidates 1 and 2 receiving vote share x

  • the probability of candidate 3 receiving below x (given 1 and 2 each get x)

  • the probability of candidate 4 receiving below x (given 1 and 2 each get x)

  • etc up to k

Examples

eggers_vivyan_probability_of_tie_for_first(c(10, 7, 5)) # non-normalized pivot prob for 3 candidates
eggers_vivyan_probability_of_tie_for_first(c(10, 7, 5))/100000 # normalized for electorate size
eggers_vivyan_probability_of_tie_for_first(c(10, 7, 5, 3)) # 4 candidates
eggers_vivyan_probability_of_tie_for_first(c(10, 7, 5, 3), increments = 100) # more precise


aeggers/pivotprobs documentation built on Oct. 28, 2024, 9:46 a.m.