How can a pollster model or predict the outcome of an election in a large, demographically diverse populace with relatively small (one or two thousand people) sample sizes? Are people that predictable, statistically speaking?
Essentially, the key is to select a good random sample. In general, the sample is accurate to half of the square root of the number of people who are asked. Given the standard number of 1000 people, that means that the number should be accurate to within 17 people or so. Divide by the original 1000 people in half, and taking 17/500, and you have the traditional 3.4% error boundaries typically given for polling data.
Specifically, the following is the key to a good poll:
- Random sampling with the same statistics as the base group.
- Unbiased poll workers, who will not influence the outcomes
- Truthful answering of questions.
- The person being asked will not change their mind between now and the real vote.
Assuming that these are true, then we fall into the realm of sampling statistics. The general formula is sqrt((p-p^2)/n). Assuming that the race is nearly split, then this gives sqrt(.25/n), or 1/(2*sqrt(n)). Again, for the random sample of 1000, this will let you know how accurate one portion of the numbers is. Dividing it by the half of the full body, and you get 3.4%.
If these are not true, then some corrective factor could be applied to the poll. This is where things get tricky. Most polls are conducted via phone. For those who do not have access to phones, this will skew the data. What is typically done to correct for these is to gather additional information about the person being polled, and correcting the overall data to better fit the model of who is actually voting.
Similar to a taste from a well-mixed soup. You don't have to ingest most of the soup to figure out if it needs more seasoning.
Proportions calculated from simple random samples are unbiased estimators of the population proportion.
That allows you to say things like "about 95% of sample proportions calculated from simple random samples of size 1,000 will fall within 3.6 percentage points of the true proportion of those who support Candidate A."
As another, if you suspect support for Candidate A is 51%, you can calculate the probability of getting a simple random sample of size 523 where 250 or more respondents support Candidate A etc.
A single poll cannot not really tell you all that much. However, a bunch of polls, so long as respondents are randomly picked, can tell you a lot.
Even when individual polling firms are biased towards one candidate or the other, you can control for those biases in ways similar to what Nate Silver does.
The only real problem occurs when polls systematically miss certain individuals.
Caution: The "margin of error" and "confidence interval" are frequently misused terms.
NB: Some time ago, I put together an extremely simplified note on this stuff.