The margin of error is a statistic expressing the amount of random sampling error in the results of a survey. The larger the margin of error, the less confidence one should have that a poll result would reflect the result of a census of the entire population. The margin of error will be positive whenever a population is incompletely sampled and the outcome measure has positive variance, which is to say, whenever the measure varies.
The term margin of error is often used in non-survey contexts to indicate observational error in reporting measured quantities.
Consider a simple yes/no poll as a sample of respondents drawn from a population reporting the percentage of yes responses. We would like to know how close is to the true result of a survey of the entire population , without having to conduct one. If, hypothetically, we were to conduct poll over subsequent samples of respondents (newly drawn from ), we would expect those subsequent results to be normally distributed about . The margin of error describes the distance within which a specified percentage of these results is expected to vary from .
According to the 68-95-99.7 rule, we would expect that 95% of the results will fall within about two standard deviations () either side of the true mean . This interval is called the confidence interval, and the radius (half the interval) is called the margin of error, corresponding to a 95% confidence level.
Generally, at a confidence level , a sample sized of a population having expected standard deviation has a margin of error
where denotes the quantile (also, commonly, a z-score), and is the standard error.
We would expect the average of normally distributed values to have a standard deviation which somehow varies with . The smaller , the wider the margin. This is called the standard error .
For the single result from our survey, we assume that , and that all subsequent results together would have a variance .
Note that corresponds to the variance of a Bernoulli distribution.