If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

### Course: Statistics and probability>Unit 11

Lesson 1: Introduction to confidence intervals

# Confidence intervals and margin of error

If we poll 100 people, and 56% of them support a candidate, we can use what we know about sampling distributions and margin of error to build a confidence interval to estimate the true value of the percentage in the population.

## Want to join the conversation?

• Where did the standard deviation forumla for population proportion come from?
• p(1-p) is the variance of binary variables. If you have A with prob(A)=p then prob(B)=1-p. The variance (hence standard deviation) can be computed by the usual formulas. He should have explained this at the outset - crucial point.

https://www.statlect.com/probability-distributions/Bernoulli-distribution
• at , i dont get why the two sentences are equivalent.
• Suppose you have three numbers: a, b and c.
Then, "b is within c of a" means the same as "a is within c of b".
Both of those statements are equivalent to "the absolute value of the difference between a and b is less than c".
In the video, a = p, b = p̂, and c = 2σ.
• why p hat (sample proportion) can be used as a substitute for p (population proportion)? in reality, they have different values, right?
• Yes, p hat and p are extremely unlikely to be the same. In reality, p is impossible to know (if population size is huge) or difficult to find out. We only have p hat as an estimate of p. To get the best estimate to p, we need to take more samplings, find p hat of all these samplings and find the mean of p hat; this mean of p hat will be very close to p.

The substitution of p with p hat is used to find the Standard Error. That is why it is called SE and not Standard Deviation.
• Within the interval, in this case from 0.44 to 0.64, which kind of probability distribution is it assumed for the true parameter? Is it a uniform distribution?
• The true parameter doesn't have a probability distribution, because it's not a random variable. It has an exact value, even if we can't actually measure it.
• At the statement that "There is 95% prob that p is within 2sigma_phat of phat" is awkward. This makes it seem that we are imagining another distribution with mean phat and standard deviation sigma_phat and saying that p lies within 2 sigma of that, which I don' think is correct. There is just one distribution for the various sample proportions phat with mean p and for each value of phat the mean will lie within the confidence interval with probability 95%.
• @ Why not N-1 instead of N?
• In unbiased estimation of population standard deviation, we have an n - 1 to partially correct for the fact that a sample is likely less spread out than the population. This is estimating a population statistic using a sample statistic.

Here we are not trying to estimate population statistic. We know sample mean is a good estimator for population mean; we are just trying to quantify how good that estimator is, with the SE. The SE is a property of the sample. So no need to do n-1 as it does not have to do with the population.
• if p hat is a good approximation of p, why bother creating an interval? why cant we simply say sample proportion is population proportion
• P hat will always be different for each time of sampling, so we cannot say sample proportion get get just by 1 time sampling is the true population proportion. But we could estimate the range of true proportion base on sample we get, which is intervals, basing on different confidence level.
(1 vote)
• why don't we use a 100% confidence interval?
• Because that would span the entire distribution, it will not be very informative to say that with 100% confidence we can say that the values can exist anywhere on the distribution.
(1 vote)
• This seems so wrong.. That probability of 95% is when you have the true standard deviation. Since we are using a fake standard deviation (standard error) how come we can still use this probability of 95%?
• Isn't the standard error formula σ/n? How did we just suddenly say that SE= square root ((p(p-1)/n) ?