Computing Survey Size


Posted

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.

In a previous article, the required formulas were derived for an infinite voter population.

The symbols are defined as follows:

  • s – number of people in the survey
  • y – the number of people voting yes in the survey
  • p – the intrinsic probability that any given person votes yes
  • δ – the risk; i.e., the probability that, given the poll, the general vote still fails
  • g – the polling organization's estimate for p

The result is

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

(1)

or equivalently

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

(2)

Note that the terms in the sum of (2) are symmetric about (s+1)/2. We then get

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

(3)

and

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

(4)

This gives a simple way to compute y given δ and s. Successive terms are added to the sum until the desired risk δ is met.

Equation (2) can be quickly computed with some rearrangement. By pulling out the common terms of the factorials, equation (2) becomes

2 δ = 1 1 2 s + 1 ( s + 1 ) ! ( s + 1 y ) ! y ! j = s + 1 y y T j 2 %delta = 1 - 1 over { 2 sup {s+1} } { { (s+1)! } over { (s+1-y)! y! } } SUM from j=s+1-y to y T sub j

(5)

where

T j = { 1 ; j = s + 1 y s + 1 j j T j 1 ; j > s + 1 y } . T sub j = left lbrace stack{ 1 ; j=s+1-y # {s+1-j} over j T sub {j-1} ; j>s+1-y } right rbrace "."

(6)

The same type rearrangement can be applied to equations (3) and (4). The collection of terms in front of the summation are computed using lgamma(), a commonly available library function for computing the gamma function.

At this point we can easily compute δ(s,y) and y(s,δ). The polling organization, on the other hand, is interested in g, essentially an a priori estimate of y/s. If the pollster has a do-not-exceed target risk, then the conservative approach is to assume the requirement of more votes rather than less. Thus the risk is computed as δ(s,g) = δ(s,y=]g·s[), where ][ is the ceiling function and rounds upwards to the next integer. Similarly, computing the worst-case estimated g given a survey size and a do-not-exceed risk is g(s,δ) = ]y(s,δ)[/s.

The final computation is s(g,δ). This can be done two ways. The first is to find the smallest s such that δ(s,g) < δ. Note that, because s enters twice in this formula, there is no guarantee that δ(s,g) is monotonic in s. An alternative is to find the largest t such that δ(t,g) > δ, and then use s=t-1.

The second method is to find the smallest s such that g(s,δ) < g. As before, since s enters twice, g(s,δ) may not be monotonic. Similarly, an alternative is to find the largest t such that g(t,g) > g, and then use s=t-1.

Since finding s is an iterative process, having an initial approximation for s(g,δ) would be helpful. Unfortunately most of the approximations for the summation in equation (1) do not result in an equation which is readily invertible.

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


Categories Probability, Voting

← Older Newer →