User:Smaines/random-vars-study



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 survey 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, the measure varies.

The term margin of error is often used in non-survey contexts to indicate observational error in reporting measured quantities.

Concept
Consider a simple yes/no poll $$P$$ as a sample of $$n$$ respondents drawn from a population $$N \text{, }(n << N)$$ reporting the percentage $$p$$ of yes responses. We would like to know how close $$p$$ is to the true result of a survey of the entire population $$N$$, without having to conduct one. If, hypothetically, we were to conduct poll $$P$$ over subsequent samples of $$n$$ respondents (newly drawn from $$N$$), we would expect those subsequent results $$p_1,p_2,\ldots$$ to be normally distributed about $$\overline{p}$$. The margin of error describes the distance within which a specified percentage of these results would vary from $$\overline{p}$$.

Standard deviation and standard error
According to the 68-95-98.5 rule, we would expect that 95% percent of the results $$p_1,p_2,\ldots$$ to fall within about two standard deviations ($$\plusmn2\sigma_{P}$$) either side of the true mean $$\overline{p}$$. This interval is called the confidence interval, and the radius (half the interval) is called the margin of error.

We would expect the normally distributed values $$p_1,p_2,\ldots$$ to have a standard deviation which varies with $$n$$. This is called the standard error $$\sigma_\overline{p}$$.

For the single result from our survey, we assume that $$p = \overline{p}$$, and that all subsequent results $$p_1,p_2,\ldots$$ together would have a variance $$\sigma_{P}^2=P(1-P)$$.


 * $$ \text{Standard error} = \sigma_\overline{p} \approx \sqrt{\frac{\sigma_{P}^2}{n}} \approx \sqrt{\frac{p(1-p)}{n}}$$

Note that $$p(1-p)$$ corresponds to the variance of a Bernoulli distribution.

Maximum margin of error at different confidence levels
Since $$\max P(1-P) = 0.25$$ at $$p = 0.5$$, we can arbitrarily set $$p=\overline{p} = 0.5$$, calculate $$\sigma_{P}$$ and $$\sigma_\overline{p}$$, and use multiples of $$\sigma_\overline{p}$$ to measure the maximum margin of error for $$P$$ at a given confidence interval and sample size even before having actual results. Precise multiples are given by the quantile function of the normal distribution (which the 68-95-99.7 rule approximates).

So, with $$p=0.5,n=1013$$


 * $$max MOE_{95} \approx 1.96\sigma_\overline{p} \approx 1.96\sqrt{\frac{\sigma_{P}^2}{n}} = 1.96\sqrt{\frac{.25}{n}} = 0.98/\sqrt{n}=\plusmn3.1%$$
 * $$max MOE_{99} \approx 2.58\sigma_\overline{p} \approx 2.58\sqrt{\frac{\sigma_{P}^2}{n}} = 2.58\sqrt{\frac{.25}{n}} = 1.29/\sqrt{n}=\plusmn4.1%$$

Also, usefully, for any reported $$MOE_{95}$$


 * $$MOE_{99} = \frac{2.58\sigma_\overline{p}}{1.96\sigma_\overline{p}}MOE_{95} \approx 1.3 \times MOE_{95}$$

Specific margins of error
If a poll has multiple percentage results (for example, a poll measuring a single multiple-choice preference), the result closest to 50% will have the highest margin of error. Typically, it is this number that is reported as the margin of error for the entire poll. Imagine poll $$P$$ reports $$p_{a},p_{b},p_{c}$$ as $$71%, 27%, 2%, n=1013$$


 * $$MOE_{95}(P_{a}) \approx 1.96\sigma_\overline{p_{a}} \approx 1.96\sqrt{\frac{p_{a}(1-p_{a})}{n}} = 0.89/\sqrt{n}=\plusmn2.8%$$


 * $$MOE_{95}(P_{b}) \approx 1.96\sigma_\overline{p_{b}} \approx 1.96\sqrt{\frac{p_{b}(1-p_{b})}{n}} = 0.87/\sqrt{n}=\plusmn2.7%$$


 * $$MOE_{95}(P_{c}) \approx 1.96\sigma_\overline{p_{c}} \approx 1.96\sqrt{\frac{p_{c}(1-p_{c})}{n}} = 0.27/\sqrt{n}=\plusmn0.8%$$

As a given percentage approaches the extremes of 0% or 100%, its margin of error approaches ±0%.

Effect of finite population size
The formulae above for the margin of error assume that there is an infinitely large population and thus do not depend on the size of population $$N$$, but only on the sample size $$n$$. According to sampling theory, this assumption is reasonable when the sampling fraction is small. The margin of error for a particular sampling method is essentially the same regardless of whether the population of interest is the size of a school, city, state, or country, as long as the sampling fraction is small.

In cases where the sampling fraction is larger (in practice, greater that 5%), analysts might adjust the margin of error using a finite population correction to account for the added precision gained by sampling a much larger percentage of the population. FPC can be calculated using the formula


 * $$\operatorname{FPC} = \sqrt{\frac{N-n}{N-1}}$$

...and so if poll $$P$$ were conducted over 24% of, say, an electorate of 300,000 voters
 * $$max MOE_{95} \approx 1.96\sigma_\overline{p}=\frac{0.98}{\sqrt{72,000}}=\plusmn%0.4$$
 * $$max MOE_{95_{FPC}} \approx 1.96\sigma_\overline{p}\sqrt{\frac{N-n}{N-1}}=\frac{0.98}{\sqrt{72,000}}\sqrt{\frac{300,000-72,000}{300,000-1}}=\plusmn%0.3$$

Intuitively, for appropriately large $$N$$,


 * $$\lim_{n \to 0} \sqrt{\frac{N-n}{N-1}}\approx 1$$
 * $$\lim_{n \to N} \sqrt{\frac{N-n}{N-1}} = 0$$

In the former case, $$n$$ is so small as to require no correction. In the latter case, the poll effectively becomes a census and sampling error becomes moot.

Comparing percentages
Imagine multiple-choice poll $$P$$ reports $$p_{a},p_{b},p_{c}$$ as $$46%, 42%, 12%, n=1013$$. As described above, the margin of error reported for the poll would typically be $$MOE_{95}(P_{a})$$, as $$p_{a}$$is closest to 50%. The popular notion of statistical tie or statistical dead heat, however, concerns itself not with the accuracy of the individual results, but with that of the ranking of the results. Which is in first?

If, hypothetically, we were to conduct poll $$P$$ over subsequent samples of $$n$$ respondents (newly drawn from $$N$$), and report result $$p_{w} = p_{a} - p_{b}$$, we could use the standard error of difference to understand how $$ w_{1},w_{2},w_{3},\ldots$$ is expected to fall about $$ \overline{w}$$. For this, we need to apply the sum of variances to obtain a new variance, $$ \sigma_{P_{w}}^2 $$,


 * $$ \sigma_{P_{w}}^2=\sigma_{P_{a}- P_{b}}^2 = \sigma_{P_{a}}^2 + \sigma_{P_{b}}^2-2\sigma_{P_{a},P_{b}} = p_{a}(1-p_{a}) + p_{b}(1-p_{b}) + 2p_{a}p_{b}

$$

where $$\sigma_{P_{a},P_{b}} = -P_{a}P_{b}$$ is the covariance of $$P_{a}$$and $$P_{b}$$.

Thus (after simplifying),


 * $$ \text{Standard error of difference} = \sigma_{\overline{w}} \approx \sqrt{\frac{\sigma_{P_{w}}^2}{n}} = \sqrt{\frac{p_{a}+p_{b}-(p_{a}-p_{b})^2}{n}} = 0.02, P_{w}=P_{a}-P_{b}

$$
 * $$ MOE_{95}(P_{a}) \approx 1.96\sigma_{\overline{p_{a}}} = \plusmn{3.1%}$$
 * $$ MOE_{95}(P_{w}) \approx 1.96\sigma_{\overline{w}} = \plusmn{5.8%}$$

Note that this assumes that $$P_{c}$$ is close to constant, that is, respondents choosing either A or B would never chose C (making $$P_{a}$$and $$P_{b}$$ close to perfectly negatively correlated). With three or more choices in closer contention, choosing a correct formula for $$ \sigma_{P_{w}}^2$$ becomes more complicated.