Confidence Intervals
A news site reports: "A poll of 1,000 adults finds that 52% support starting school an hour later. Margin of error: ±3 percentage points." Nobody asked all 330 million Americans. So what does "±3" mean, how do pollsters get it, and why did they interview about 1,000 people instead of 100 or 100,000? By the end of this page you can answer all three.
Parameters, Statistics, and Samples
Almost no study measures everyone. A survey, a quality check, or a poll looks at a sample and then says something about the whole population. That jump is called statistical inference.
If you drew a different random sample, you would get a different $\bar{x}$ or $\hat{p}$. The parameter, however, stays fixed. That difference drives everything on this page.
A social media analyst wants to study the daily time spent by American teenagers between 15 and 18 years old on TikTok*. To do this, they randomly select 400 users in…
A social media analyst wants to study the daily time spent by American teenagers between 15 and 18 years old on TikTok. To do this, they randomly select 400 users in this age group across the country and record their connection times.
Clearly identify the following elements of the statistical study:
-
The population under study.
-
The selected sample.
-
The sample size.
-
The statistic that would be calculated to summarize the sample information.
Sampling Distributions of $\bar{x}$ and $\hat{p}$
Imagine taking every possible random sample of size $n$ and recording $\bar{x}$ each time. The pattern of those values is the sampling distribution of $\bar{x}$. Confidence intervals are built on it.
It is known that the waiting time in line for a popular theme park attraction follows a normal distribution with a mean of $\mu = 45$ minutes and a standard deviation of…
It is known that the waiting time in line for a popular theme park attraction follows a normal distribution with a mean of $\mu = 45$ minutes and a standard deviation of $\sigma = 12$ minutes.
If we choose a random sample of $n = 36$ visitors who have been on the attraction:
-
What is the distribution followed by the sample mean $\bar{X}$? State its mean and standard deviation (standard error).
-
Calculate the probability that the mean waiting time of this sample is greater than $48$ minutes.
In a high school, it is suspected that $15\%$ of the students are left-handed. A random sample of $n = 100$ students is selected to check this. 1. What distribution does…
In a high school, it is suspected that $15\%$ of the students are left-handed. A random sample of $n = 100$ students is selected to check this.
-
What distribution does the sample proportion $\hat{p}$ of left-handed students follow? State its mean and standard deviation.
-
Calculate the probability that the proportion of left-handed students in the selected sample is less than $18\%$.
Critical Values $z^*$
A confidence level $C$ (like 95%) is the area in the middle of a standard normal curve. The critical value $z^*$ (written $z_{\alpha/2}$ in some books, with $\alpha = 1 - C$) is how many standard deviations you must go each side of the center to capture that area.
The two tails split what is left, $\dfrac{1-C}{2}$ each. So the area to the left of $z^*$ is $\dfrac{1+C}{2}$, and
$$z^* = \text{invNorm}\left(\dfrac{1+C}{2}\right).$$In statistical inference, the critical value $z_{\alpha/2}$ is fundamental to determine the width of a confidence interval. Using the standard normal distribution table…
In statistical inference, the critical value $z_{\alpha/2}$ is fundamental to determine the width of a confidence interval. Using the standard normal distribution table $N(0, 1)$, obtain the critical values corresponding to the following confidence levels:
-
A confidence level of $90\%$.
-
A confidence level of $95\%$.
-
A confidence level of $99\%$.
For a study on digital reading habits in young people, it is desired to construct a confidence interval. Calculate, with reasoning, the critical values $z_{\alpha/2}$…
For a study on digital reading habits in young people, it is desired to construct a confidence interval. Calculate, with reasoning, the critical values $z_{\alpha/2}$ corresponding to the following confidence levels:
- a) $94 \%$
- b) $98 \%$
Illustrate graphically the position of the critical value in a standard normal distribution for the case of $94 \%$.
Confidence Interval for a Mean
Here is the idea. Most sample means land within $z^*$ standard errors of $\mu$. So $\mu$ is, in turn, within $z^*$ standard errors of $\bar{x}$. Start at the estimate and go out the same distance on both sides.
On a TI-84 you can check this with STAT → TESTS → ZInterval (enter $\sigma$, $\bar{x}$, $n$, and the confidence level).
Try the next widget. The curve is the margin of error $E = a/\sqrt{n}$, where $a = z^*\sigma$. Move the slider to see how a larger $z^*\sigma$ shifts it.
A courier company is studying the weight of the parcels it delivers in a city. It is assumed that the population follows a normal distribution with a standard deviation…
A courier company is studying the weight of the parcels it delivers in a city. It is assumed that the population follows a normal distribution with a standard deviation of $\sigma = 0,8$ pounds. A random sample of $n = 64$ parcels is taken and a sample mean of $\bar{x} = 4,2$ pounds is obtained.
Calculate a confidence interval for the mean weight of all parcels delivered by the company, using a confidence level of $95\%$.
An e-sports team wants to know the mean time their players dedicate daily to training. It is known that the playing time follows a normal distribution with a standard…
An e-sports team wants to know the mean time their players dedicate daily to training. It is known that the playing time follows a normal distribution with a standard deviation of $45$ minutes. A random sample of $36$ players from the national league has been taken, obtaining a mean of $210$ minutes per day.
- a) Determine the $95 \%$ confidence interval for the mean daily training time of all players in the league.
- b) What is the maximum error made in this estimation?
Confidence Interval for a Proportion
The point estimate of a proportion $p$ is the sample proportion $\hat{p} = \dfrac{x}{n}$, where $x$ is the number of successes. The interval has the same structure.
On a TI-84, use STAT → TESTS → 1-PropZInt (enter $x$, $n$, and the confidence level).
We want to estimate the proportion of households in a city that separate organic waste for recycling. To do this, a random sample of $n = 400$ households is surveyed, of…
We want to estimate the proportion of households in a city that separate organic waste for recycling. To do this, a random sample of $n = 400$ households is surveyed, of which $160$ claim to do so.
Determine the confidence interval for the proportion of households that recycle organic waste in the whole city, using a confidence level of $90\%$.
In a survey carried out on $400$ students at a high school about the use of streaming platforms, $260$ stated that they prefer watching series to movies. a) Find the…
In a survey carried out on $400$ students at a high school about the use of streaming platforms, $260$ stated that they prefer watching series to movies.
- a) Find the point estimate of the proportion of students who prefer series.
- b) Obtain a $97 \%$ confidence interval for the true proportion of students who prefer series at that school.
Interpreting an Interval
An interval can also test a claim. If a claimed value lies outside the interval, the data give evidence against it. If it lies inside, the claim is consistent with the data, but that does not prove it.
An "eco-friendly" clothing brand claims that $30 \%$ of its customers are under $20$ years old. To verify this, a random sample of $500$ customers is taken and it is…
An "eco-friendly" clothing brand claims that $30 \%$ of its customers are under $20$ years old. To verify this, a random sample of $500$ customers is taken and it is observed that $135$ of them are under $20$ years old.
- a) Construct a $99 \%$ confidence interval for the proportion of customers under $20$ years old based on the sample data.
- b) In light of the result, can we consider that the brand's claim is consistent with the data obtained at a confidence level of $99 \%$? Explain why.
The reaction time of pilots in a state-of-the-art flight simulator follows a normal distribution with an unknown mean and a standard deviation of $0.05$ seconds. When…
The reaction time of pilots in a state-of-the-art flight simulator follows a normal distribution with an unknown mean and a standard deviation of $0.05$ seconds. When taking a sample of $64$ pilots, a mean of $0.42$ seconds is observed.
- a) Obtain the confidence interval for the population mean at a confidence level of $97\%$.
- b) The simulator manufacturer claims that the mean reaction time is $0.40$ seconds. Is this claim compatible with the interval obtained in the previous section? Justify your answer based on the relationship between confidence intervals and population parameters.
- c) If it is decided to double the sample size and reduce the confidence level to $90\%$, how will this affect the width of the interval? Calculate the factor of reduction or increase in the width.
Sample Size for a Mean
Before collecting data, you can decide how many people to survey so the margin of error is at most $E$. Solve $E = z^*\dfrac{\sigma}{\sqrt{n}}$ for $n$.
The curve shows the sample size $n = (a/E)^2$ needed for a margin of error $E$, with $a = z^*\sigma$. A small $E$ makes $n$ climb very fast.
An LED bulb factory wants to estimate the mean lifespan of its products. It is known from previous studies that the standard deviation of the lifespan is $\sigma = 500$…
An LED bulb factory wants to estimate the mean lifespan of its products. It is known from previous studies that the standard deviation of the lifespan is $\sigma = 500$ hours.
If the quality control team wants to make an estimation with a confidence level of $95\%$, what minimum sample size $n$ must they choose so that the maximum error made is less than $100$ hours?
A technology company is testing the battery life of a new smartphone model. It is assumed that the duration follows a normal distribution with a standard deviation of…
A technology company is testing the battery life of a new smartphone model. It is assumed that the duration follows a normal distribution with a standard deviation of $2,4$ hours.
What must the minimum sample size be so that the maximum error made when estimating the population mean is less than $30$ minutes, with a confidence level of $99 \%$?
A technology center is investigating the battery life of a new smartphone* model under heavy use. It is assumed that the duration follows a normal distribution with…
A technology center is investigating the battery life of a new smartphone model under heavy use. It is assumed that the duration follows a normal distribution with $\sigma = 0.8$ hours. It is desired to estimate the mean duration with a confidence of $96\%$.
- a) If the confidence interval is required to have a maximum length of $20$ minutes, calculate the minimum sample size needed.
- b) After carrying out the experiment with the sample size obtained in the previous section, it is observed that the sample mean is $9.5$ hours. Write the resulting confidence interval in hours.
- c) If, for budget reasons, only $50$ devices could be analyzed, what would be the maximum error we would make if we wanted to maintain the $96\%$ confidence? Express the result in minutes.
Sample Size for a Proportion
The curve is $p(1-p)$. It peaks at $p = 0.5$, which is why $0.5$ is the "worst case."
We want to estimate the proportion of citizens who would be willing to use public transportation if it were free. In a previous study, the expected proportion is…
We want to estimate the proportion of citizens who would be willing to use public transportation if it were free. In a previous study, the expected proportion is unknown, so the case of maximum variance ($p = q = 0,5$) is assumed.
Determine the minimum sample size needed to estimate this proportion with a maximum error of $4 \%$ and a confidence level of $95,44 \%$ (which corresponds to a critical value $z_{\alpha/2} = 2$).
A mobile phone company wants to estimate the proportion of teenagers who use "dark mode" on their devices at night. In an initial sample of $100$ users, $60\%$ confirmed…
A mobile phone company wants to estimate the proportion of teenagers who use "dark mode" on their devices at night. In an initial sample of $100$ users, $60\%$ confirmed using it.
- a) Calculate the $98\%$ confidence interval for the population proportion of users of this mode.
- b) Suppose there is no prior information about the proportion (situation of maximum uncertainty). Determine the sample size needed for the maximum allowable error to be $0.02$ with a confidence level of $95\%$.
- c) If the proportion obtained in the initial sample ($0.6$) is used to calculate the sample size under the same conditions as in section b) (error $0.02$ and confidence $95\%$), how many fewer users would need to be surveyed compared to the case of maximum uncertainty?
A study on sustainable habits reveals that $15\%$ of young people in a city travel exclusively by electric scooter. A random sample of $n$ young people is selected for…
A study on sustainable habits reveals that $15\%$ of young people in a city travel exclusively by electric scooter. A random sample of $n$ young people is selected for monitoring.
- a) If the confidence interval obtained for the population proportion at a confidence level of $95\%$ has a width of $0.06$, what was the sample size used? (Use the proportion of $15\%$ as an estimate).
- b) If we wanted the margin of error to be only $0.01$ while maintaining the $95\%$ confidence, but we suspect that the true proportion might be closer to $50\%$, what would be the new required sample size?
Working Backward from an Interval
Many problems give you an interval and ask for the pieces. The interval is symmetric about the estimate, so the pieces are easy to recover.
After carrying out a study on the monthly expenditure on streaming* platforms by young people in a neighborhood, it has been found that the confidence interval for the…
After carrying out a study on the monthly expenditure on streaming platforms by young people in a neighborhood, it has been found that the confidence interval for the population mean, with a given confidence level, is $(14,20 \text{ \$}, 17,80 \text{ \$})$.
From this interval, determine:
-
The value of the sample mean $\bar{x}$ that was used for the calculation.
-
The maximum allowable error $E$ made in the estimation.
The price of tickets for a summer music festival follows a normal distribution with a standard deviation of $12$ dollars. A random sample of prices has been taken and…
The price of tickets for a summer music festival follows a normal distribution with a standard deviation of $12$ dollars. A random sample of prices has been taken and the following confidence interval for the mean has been obtained: $(72,15; 77,85)$.
- a) What was the mean price of the selected sample?
- b) If the confidence level used for this interval was $95 \%$, what was the size of the analyzed sample?
Two high schools, A and B, measure the mean time their seniors dedicate to studying math per week. In both, it is known that the population standard deviation is $1,5$…
Two high schools, A and B, measure the mean time their seniors dedicate to studying math per week. In both, it is known that the population standard deviation is $1,5$ hours.
A sample of $100$ students is taken in each school. In school A, the confidence interval obtained for the mean has a width of $0,588$ hours. In school B, the confidence interval obtained for the mean is $(6,2; 7,2)$.
- a) Determine the confidence level used in school A.
- b) Determine the confidence level used in school B.
- c) Which of the two schools has made a more precise estimate? Justify your answer.
Confidence, Precision, and Sample Size
Margin of error $E = z^*\dfrac{\sigma}{\sqrt{n}}$ is controlled by three things. A smaller $E$ means a more precise estimate.
| Change | Effect on $E$ |
|---|---|
| Higher confidence level (bigger $z^*$) | $E$ increases (wider interval) |
| Larger sample size $n$ | $E$ decreases |
| Larger spread $\sigma$ | $E$ increases |
You cannot get more confidence and more precision for free. The only way to gain precision without giving up confidence is a larger sample.
Back to the opening poll. For $n = 1{,}000$ and $\hat{p} \approx 0.52$, the 95% margin of error is $1.96\sqrt{\dfrac{0.52 \cdot 0.48}{1000}} \approx 0.031$, about $3$ percentage points. So "52% $\pm$ 3" means the interval $(0.49, 0.55)$ is a plausible range for the true support, and polls of about 1,000 people reach ±3 because $n \approx 1{,}068$ gives exactly $E = 0.03$. Notice the interval includes $0.50$, so this poll alone does not show a majority.
A well-known content creator is analyzing the retention time of their followers in their live e-sports streams. It is known that the connection time follows a normal…
A well-known content creator is analyzing the retention time of their followers in their live e-sports streams. It is known that the connection time follows a normal distribution with a standard deviation of $12$ minutes. After analyzing a random sample of $144$ users, a confidence interval for the population mean of $(32.35, 36.25)$ has been obtained.
- a) Determine the value of the sample mean obtained and the confidence level used to construct this interval.
- b) If the streamer wishes to reduce the width of this interval to a quarter while maintaining the same confidence level, what should the minimum sample size be?
- c) Explain, without performing additional calculations, what would happen to the precision of the estimate if we increased the sample size but also wanted to work with a higher confidence level than the one calculated in section a).
The weight of the backpacks of high school seniors follows a normal distribution with a standard deviation of $1.2$ pounds. A random sample of $100$ students has been…
The weight of the backpacks of high school seniors follows a normal distribution with a standard deviation of $1.2$ pounds. A random sample of $100$ students has been taken and a confidence interval for the mean weight has been constructed. The upper limit of this interval is $6.235$ pounds and its width is $0.47$ pounds.
- a) What is the sample mean weight of the backpacks in this study?
- b) Determine the confidence level with which the interval has been constructed.
- c) If the maximum error is desired to be $0.1$ pounds with a confidence of $99.73\%$ (corresponding to $3\sigma$), how many additional students should be included in the original sample?
A survey has been carried out on $400$ users of a music streaming* platform to find out what percentage prefers the urban genre. The confidence interval obtained for the…
A survey has been carried out on $400$ users of a music streaming platform to find out what percentage prefers the urban genre. The confidence interval obtained for the proportion of users is $(0.312, 0.388)$.
- a) Determine the value of the sample proportion and the confidence level used in the study.
- b) If it is decided to carry out a new study with a sample of $1600$ users and the same sample proportion is maintained, what will be the width of the new interval if working with the same confidence level?
- c) Justify mathematically how the width of the interval varies if we quadruple the sample size and double the critical value $z_{\alpha/2}$.