Looking at these two recent polls, one wonders which one is truer and what confidence we can have in polls.
Of course, that is a rhetorical question. The real question is if these polls are measuring proportions (or probability) of people agreeing to something, what is the confidence interval of the true proportion or probability.
For example, the first poll tells us that 16% of Americans overall said that they would like to permanently move to another country if they could. The second poll tells us that 59% of adults in the US believe that 2019 will be a year of full or increasing employment. These two proportions are estimated from a selected sample of approximately 1000 U.S. adults. If so, what would be the confidence interval for the true proportion of all Americans who would answer these questions?
In lessons 71 to 75, we learned how to derive the confidence interval of the true mean, true variance, and true standard deviation, i.e., the population mean and population variance and standard deviation.
There are many applications, as these example polls, that require estimation of proportions or the probability of occurrence of events. We already know that the maximum likelihood estimator of p, the probability of an event is where r is the number of successes (times the event happened) in a sample of size n. In other words, the probability can be estimated as the proportion of occurrence in a Bernoulli sequence.
If is the estimate of the proportion, with a few assumptions, we can derive the confidence interval of the true proportion p.
Let’s learn how to do this using a simple polling exercise.
Assume that we want to estimate through a poll, the proportion of people who want to move out of the U.S. It will not be possible to ask everyone whether or not they will move out. However, we can take a sample, i.e., select a subset of the population and ask them for their preference.
In a sample of size n, the preference of the people can be represented by Bernoulli random variables where if a person wants to move out and 0 otherwise. If , the proportion of people who wish to move out can be estimated as .
By now, you must be familiar that is a random variable since the estimate can change with a change in the sample. What assumption can we make for the distribution function of this random variable?
Since is the sum of n independent random variables, for a large enough sample size n, the distribution function of can be well-approximated by the normal distribution. Further, since is a linear function of , the random variable can also be assumed to be normally distributed.
We can standardize and relate it to the standard normal distribution Z.
Before we proceed to derive the confidence interval, we should first derive the expected value and the variance of .
Expected Value
Since is a Bernoulli distribution,
Variance
So,
Confidence Interval of
Now, if we are interested in the 95% confidence interval of the true estimate p, we can use the standardized version of to say that there is a 95% probability that the standard normal variable is between -1.96 and 1.96.
We can rearrange this to obtain,
We can use in place of p for the variance term.
This interval is called the 95% confidence interval of the population proportion p. The interval itself is random since it is derived from . A different sample will have a different and hence a different interval or range.
There is a 95% probability that this random interval contains the true value of p.
Put another way, if we use this method to estimate the confidence interval of p for a large number of samples we can expect that in about 95% of the samples the true value of p will be within the confidence interval obtained from the sample.
Let’s now compute the 95% confidence interval for the proportions we saw in the two polls. 16% of Americans overall said that they would like to permanently move to another country if they could. 59% of adults in the US believe that 2019 will be a year of full or increasing employment. These two proportions are estimated from a selected sample of approximately 1000 U.S. adults.
95% confidence interval for the proportion of people who want to move out of the U.S.
is the 95% confidence interval of the true proportion.
95% confidence interval for the proportion of people that believe that 2019 will be a year of full or increasing employment.
is the 95% confidence interval of the true proportion.
We can generalize this to any confidence level by defining a confidence interval for the true proportion p as
Keep in mind that the main assumption behind this is that the estimate can be approximated by a normal distribution for a reasonably large sample size.
How do we know what size of the sample is sufficient? In the first graphic that showed the polls, I highlighted margin of errors. Can you guess what that is?
If you find this useful, please like, share and subscribe.
You can also follow me on Twitter @realDevineni for updates on new lessons.