Survey Size with a Bayesian Prior


Putting a proposition before a large population of voters can be expensive, so an organization wishing to do so would like to have a reasonable assurance that a given proposition will pass. One approach is to take a survey of a randomly chosen subset of voters and use the results to estimate the proposition's chances amongst the general population. The larger the survey size and the larger the margin that the proposition passes in the survey, the larger the chances are that the proposition would pass for a general vote. The basic mathematics for this was discussed in Surveying for a Voter Proposition.

The previous discussion assumed that a reasonable choice for the Bayesian prior was the uniform distribution on p (the chance of a yes vote) because it is “unbiased,” in the sense that all possible outcomes were equally likely, including all yes votes to all no votes. Other common priors are commonly used that imply a different sense of “unbiased,” such as the Haldane prior p-1(1-p)-1 and the Jeffreys prior p(1-p). The Haldane prior assumes that, by and large, the entire population is in agreement, so p is most likely either 0 or 1. The Jeffreys prior assumes that each decade of p is equally likely, so a p between 0.001 and 0.01 is as likely as a p between 0.01 and 0.1. The Haldane and Jeffreys priors both imply that marginal survey results (close to 50%) are less likely than the extremes.

Secondly, since the Bayesian prior is intended to encompass prior knowledge of the distribution of p, a pessimist (optimist) has the right to incorporate pessimism (optimism) into the prior. A pessimistic prior would assume that the general population is more likely to vote no. A prior can also be used to assume a certain amount of indifference. For example, an election between identical twins might motivate a prior where the likelihood of strong sentiment toward either candidate is small.

The functional form of Bayesian prior generally used for these sorts of problems is the Beta distribution B(Y,N). The previously assumed uniform prior is then B(1,1), the Jeffreys prior is B(½,½), and the Haldane prior is B(0,0). In general, Y corresponds to increased likelihood of yes votes, while N corresponding to increased likelihood of no votes. The Beta distribution with strictly positive integer Y and N can be modeled using the Pólya urn model.

The distribution of yes votes in a survey is also a Beta distribution,

P ( y | s , p ) = ( s y ) p y ( 1 p ) s y . P(y "|" s,p) = left ( stack { s # y } right ) p sup y (1-p) sup { s - y } "."


Using Bayes' rule, the distribution of p is therefore

P ( p | s , y ) = P ( p ) P ( y ) ( s y ) p y ( 1 p ) s y . P( p "|" s,y ) = {P(p)} over {P(y)} left ( stack { s # y } right ) p^y (1-p)^{s-y} "."


Here P(p) is the required Bayesian prior. Inserting in a Beta function for the prior gives

P ( p | s , y ) = 1 P ( y ) ( s y ) p y + Y 1 ( 1 p ) s y + N 1 . P( p "|" s,y ) = 1 over {P(y)} left ( stack { s # y } right ) p^{y+Y-1} (1-p)^{s-y+N-1} "."


Since this is just another Beta distribution, the normalization (terms not depending on p) must be

P ( p | s , y ) = p y + Y 1 ( 1 p ) s y + N 1 B ( y + Y , s y + N ) . P( p "|" s,y ) = { p^{y+Y-1} (1-p)^{s-y+N-1} } over { B(y+Y,s-y+N) } "."


As before, the probability that the vote fails by less than a majority is given by the cumulative distribution function, resulting in the regularized incomplete beta function,

δ = B ( ½ ; y + Y , s y + N ) B ( y + Y , s y + N ) . %delta = { B( ½ ; y+Y, s-y+N ) } over { B( y+Y, s-y+N ) } "."


The infinite series expansion (for integer Y and N, and perhaps in general) is

B ( x , α , β ) B ( α , β ) = j = α α + β 1 ( α + β 1 j ) x j ( 1 x ) α + β 1 j . { B(x,%alpha,%beta) } over { B(%alpha,%beta) } = SUM from {j=%alpha} to {%alpha+%beta-1} left ( stack { %alpha + %beta - 1 # j } right ) x sup j (1-x) sup {%alpha+%beta-1-j} "."


Applying this to δ gives

δ = 1 2 s + Y + N 1 j = y + 1 s + Y + N 1 ( s + Y + N 1 j ) . %delta = 1 over { 2 sup {s+Y+N-1} } SUM from { j = y + 1 } to { s + Y + N - 1 } left ( stack { s+Y+N-1 # j } right ) "."


The implications of this formula are interesting. Since the expression (s+N+Y–1) appears everywhere, both the pessimist and the optimist will change the size of a survey in exactly the same way; the direction of bias has no effect, only the magnitude.

For a fixed y (the number of required yes votes) and fixed δ, the Jeffreys and Haldane priors increase the size of the survey by 1 voter and 2 voters, respectively. These priors thus pose no difficulties (which is too bad, since both are somewhat inappropriate for a typical election situation).

Priors with Y+N>2 reduce the survey size relative to the uniform prior. Since the survey size is now smaller, but y has not changed, the required fraction of yes votes in the survey has increased. For a fixed estimate of pest=y/s, a larger survey is required to achieve the same y/s ratio. Luckily, incorporating a Bayesian prior into the computation of δ is a trivial change.

This computation was suggested to me by David Chaum, who wanted to know if a closed-form solution existed. See for more information.

Categories Voting, Probability

← Older Newer →