This article is quite technical and requires a mathematical background for a comprehensive understanding. All technical points have a reference to the corresponding Wikipedia’s article for further explanations.
We are in an election time in France. Everyday news is rythmed by polls. Nicolas Sarkozy is falling from 2% in today’s poll from IPSOS, Francois Hollande slipped below 33% after the crisis etc… Everybody seems to give a lot of credit to these polls forgetting most of the time that they are just statistical estimations of the reality. But how reliable are they? The results for the first round of the french presidential election seemed to surprise so many people and medias that it pushed me to dig into my maths lessons from college to look for some scientific explanation if any.
Organizing the Opinion Poll
Opinion polls tend to estimate the percentage of people who will vote for a given candidate. Polling Institutes want to produce accurate polls but they can’t poll a too big sample as it would be time consuming and expensive.
Once collected, how do we use them build an estimate of the votes and what is the precision of this estimate?
The natural and logical estimate is to take the sample mean as an estimator. How do we justify such an estimate and what is its precision? We’ll see that what sounds like common sense has a strong mathematical justification.
Building the Estimate
We are in a situation where we have n people
who can choose between k candidates. We define the variable
which is equal to 1 if person i votes for candidate j and 0 if not.
The real vote intentions we want to estimate are noted :
with the constraint:
The probability to observe the result of the polling is:
as the n people are chosen independantly.
The strategy we adopt is, given the n people, to maximize this propability of observing the output. Maximizing this propability is the same as minimizing the -log of the probability as -log is a convex function. With this transformation, the computation of the extremum is much easier as the product becomes a sum.
To find the minimum with the above constraint we can use the Lagrangian multiplier and just minimize:
which gives us the estimates which minimize the above function
We just justified the use of the empirical mean as an estimate of the true mean given a set of observations using maximum a posteriori estimation.
Given the estimator, which level of trust can we give it? How close is are the estimated and true values. The law of large numbers tells us that when the size of the sample goes to infinity the estimated value tends to the true value. But in reality there is not an infinity of people who get polled. Usually just a few thousands are. From one sample to the other the estimator won’t be the same. So how confident are the polling institutes in their estimations? The reliability of the estimator depends on the statistical fluctuations of the estimate around the true value.
The central limit theorem tells us that the random variables (m is the true mean and sigma the variance):
converge in distribution to a normal random variable with mean 0 and variance 1. From here we have the approximation:
where g is the density of the normal distribution and
from which we can write
So given a threshold of confidence t we can build a interval of confidence where we can state with t% of confidence that the true value is within this interval:
The value for a can be found in a computation table. For t equal to 95% the value of a is 1.96 which gives us for the interval where there is 95% of chance that the true value is:
With the simple slider and graphic you can see by yourself the influence of the number of people polled for an opinion poll. The box represents the 95% interval of confidence that means there is 95% of chance that the true vote intention is within this interval.
This quick refresher on opinion polls should remind us that opinion polls can be quite far from reality. And there is one variable that I didn’t take into account: there are people who don’t dare to name the true candidate they plan to vote for. This is especially true for extremist votes and explains why we can experience such a discrepancy between the estimations and the true results of one election.