Back to homeMathematics · High School Year 3 · Social Sciences · Change subject
Start for free
Prep 3 SS · Mathematics
Statistics · Inference

Confidence Intervals

Before you start, make sure you know: The Normal Distribution (High School Year 2 (semesters 3 and 4))
Before you start, make sure you know: Approximating the Binomial with the Normal (High School Year 2 (semesters 3 and 4))

A video platform asks 400 teenagers how many minutes a day they watch TikTok and gets an average of 130 minutes. Does that mean that all teenagers in the country watch 130 minutes? No: another sample would give another average. Nobody asks the whole population, so we need to say something about it with a margin of error and with a measure of how much we can trust it. That is a confidence interval.

The sample mean as a random variable

Comparison between the normal curve of the population and the narrower curve of the sample mean, both centered at the same mean. X (population): wider X̄ (large sample): narrower

When dealing with a proportion, the sample proportion $\hat{p}$ (the fraction of the sample that has a characteristic) behaves, for large $n$, as $\hat{p} \sim N\left(p, \sqrt{\dfrac{p\,q}{n}}\right)$ with $q = 1-p$.

Practice★☆☆Not started
A social media analyst wants to study the daily time spent on TikTok* by Mexican teenagers aged between 15 and 18. To do so, they randomly select 400 users in this age…

A social media analyst wants to study the daily time spent on TikTok by Mexican teenagers aged between 15 and 18. To do so, they randomly select 400 users in this age group across the country and record their screen time.

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.

POPULATION Teenagers on TikTok Random selection SAMPLE n = 400 Sample size STATISTIC (e.g. Mean usage time)
Solve
Practice★☆☆Not started
It is known that the waiting time in the queue of a popular theme park ride follows a normal distribution with a mean of $\mu = 45$ minutes and a standard deviation of…

It is known that the waiting time in the queue of a popular theme park ride 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 ride:

  1. What distribution does the sample mean $\bar{X}$ follow? State its mean and standard deviation (standard error).

  2. Calculate the probability that the mean waiting time of this sample is greater than $48$ minutes.

Solve
Practice★☆☆Not started
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.

  1. What distribution does the sample proportion $\hat{p}$ of left-handed students follow? State its mean and standard deviation.

  2. Calculate the probability that the proportion of left-handed students in the selected sample is less than $18\%$.

Solve

Critical values $z_{\alpha/2}$

The confidence level is $1-\alpha$. For example, with $95\%$ confidence, $\alpha = 0.05$. The critical value $z_{\alpha/2}$ is the number of $N(0,1)$ that leaves an area $\alpha/2$ to its right: between $-z_{\alpha/2}$ and $z_{\alpha/2}$ lies the central area $1-\alpha$.

Standard normal curve with the central probability area 1 - α between the critical values minus z and z, and two tails of area α/2. area 1 − α α/2 α/2 −z z

To find it, look in the standard normal table (cumulative probability) for the value that accumulates $1-\alpha/2$. With 95%, you look for $0.975$ and find $1.96$. You can also use a spreadsheet (=NORM.S.INV(0.975)) or GeoGebra.

Confidence $1-\alpha/2$ $z_{\alpha/2}$
90 % 0.95 1.645
95 % 0.975 1.96
99 % 0.995 2.576
Practice★☆☆Not started
In statistical inference, the critical value $z_{\alpha/2}$ is essential for determining the width of a confidence interval. It is the value of the standard normal…

In statistical inference, the critical value $z_{\alpha/2}$ is essential for determining the width of a confidence interval. It is the value of the standard normal distribution $N(0, 1)$ that leaves an area $\alpha/2$ to its right, where $1-\alpha$ is the confidence level (in the figure, the central area is $1-\alpha$ and each tail is $\alpha/2$).

Using the standard normal distribution table $N(0, 1)$, find the critical values $z_{\alpha/2}$ corresponding to the following confidence levels:

  1. a) A confidence level of $90\,\%$.
  1. b) A confidence level of $95\,\%$.
  1. c) A confidence level of $99\,\%$.
Gaussian bell curve N(0, 1) with central area 1 − α between −z α/2 and z α/2 and two tails of area α/2z−zα/2zα/201 − αα/2α/2N(0, 1)
Solve
Practice★★☆Not started
For a study on digital reading habits among young people, a confidence interval is to be constructed. Calculate, showing your working, the critical values $z_{\alpha/2}$…

For a study on digital reading habits among young people, a confidence interval is to be constructed. Calculate, showing your working, the critical values $z_{\alpha/2}$ corresponding to the following confidence levels:

  1. a) $94 \%$
  2. b) $98 \%$

Illustrate graphically the position of the critical value in a standard normal distribution for the $94 \%$ case.

N(0, 1) 94% 1 - α = 0.94 3% α/2 = 0.03 3% α/2 = 0.03 0 −1.88 -z₀.₀₃ 1.88 z₀.₀₃
Solve

Confidence interval for a mean

Confidence interval on a number line, centered at the sample mean with a margin of error E on each side. confidence interval x̄ E E x̄ − E x̄ + E
Practice★☆☆Not started
A courier company is studying the weight of packages it delivers in a city. The population is assumed to follow a normal distribution with a standard deviation of…

A courier company is studying the weight of packages it delivers in a city. The population is assumed to follow a normal distribution with a standard deviation of $\sigma = 0.8$ kg. A random sample of $n = 64$ packages is taken, obtaining a sample mean of $\bar{x} = 4.2$ kg.

Calculate a confidence interval for the mean weight of all packages delivered by the company, using a confidence level of $95\%$.

Solve
Practice★★☆Not started
An esports team wants to know the mean daily training time of its players. It is known that playing time follows a normal distribution with a standard deviation of $45$…

An esports team wants to know the mean daily training time of its players. It is known that playing time follows a normal distribution with a standard deviation of $45$ minutes. A random sample of $36$ players from the national league was taken, yielding a mean of $210$ minutes daily.

  1. a) Determine the $95 \%$ confidence interval for the mean daily training time of all players in the league.
  2. b) What is the maximum margin of error made in this estimate?
Solve

Reading an interval: center, margin, and confidence

An interval $(a, b)$ holds three pieces of information:

  • The sample mean is the midpoint: $\bar{x} = \dfrac{a+b}{2}$.

  • The margin of error is half the width: $E = \dfrac{b-a}{2}$.

  • With $\sigma$ and $n$ known, the confidence level comes from $E = z_{\alpha/2}\dfrac{\sigma}{\sqrt{n}}$: you solve for $z_{\alpha/2}$ and look it up in the table.

Practice★☆☆Not started
After conducting a study on the monthly expenditure on streaming platforms among young people in a neighbourhood, it was found that the confidence interval for the…

After conducting a study on the monthly expenditure on streaming platforms among young people in a neighbourhood, it was found that the confidence interval for the population mean, at a given confidence level, is $(\$14,20, \$17.80)$.

From this interval, determine:

  1. The value of the sample mean $\bar{x}$ used for the calculation.

  2. The maximum allowable error $E$ made in the estimation.

E E $14.20 $17.80 x̄
Solve
Practice★★☆Not started
The price of tickets for a summer music festival follows a normal distribution with a standard deviation of $240$ pesos. A random sample of prices was taken, obtaining…

The price of tickets for a summer music festival follows a normal distribution with a standard deviation of $240$ pesos. A random sample of prices was taken, obtaining the following confidence interval for the mean: $(1\,443; 1\,557)$.

  1. a) What was the mean price of the selected sample?
  2. b) If the confidence level used for this interval was $95 \%$, what was the size of the sample analyzed?
Solve

Inverse problems with intervals

Sometimes the problem gives the interval and asks you to recover $\bar{x}$, the confidence level, $n$, or $\sigma$. The procedure is always the same: use the two relationships

$$\bar{x} = \dfrac{a+b}{2}, \qquad b-a = 2\,z_{\alpha/2}\dfrac{\sigma}{\sqrt{n}}$$

and solve for the unknown. If you are given one endpoint and the width, the other endpoint comes from subtracting or adding. With a proportion, the standard error is $\sqrt{\hat{p}\hat{q}/n}$ instead of $\sigma/\sqrt{n}$, and $\hat{p}$ is the midpoint of the interval.

To go from $z_{\alpha/2}$ to the confidence: look up the area $\Phi(z)$ in the table and compute $1-\alpha = 2\Phi(z)-1$.

Practice★★☆Not started
The price of tickets for a summer music festival follows a normal distribution with a standard deviation of $240$ pesos. A random sample of prices was taken, obtaining…

The price of tickets for a summer music festival follows a normal distribution with a standard deviation of $240$ pesos. A random sample of prices was taken, obtaining the following confidence interval for the mean: $(1\,443; 1\,557)$.

  1. a) What was the mean price of the selected sample?
  2. b) If the confidence level used for this interval was $95 \%$, what was the size of the sample analyzed?
Solve
Practice★★★Not started
The weight of the backpacks of 2nd year Baccalaureate students follows a normal distribution with a standard deviation of $1.2$ kg. A random sample of $100$ students was…

The weight of the backpacks of 2nd year Baccalaureate students follows a normal distribution with a standard deviation of $1.2$ kg. A random sample of $100$ students was taken and a confidence interval for the mean weight was constructed. The upper bound of this interval is $6.235$ kg and its width is $0.47$ kg.

  1. a) What is the sample mean weight of the backpacks in this study?
  1. b) Determine the confidence level with which the interval was constructed.
  1. c) If the maximum margin of error is required to be $0.1$ kg with a confidence level of $99.73\%$ (corresponding to $3\sigma$), how many additional students should be included in the original sample?
Solve
Practice★★★Not started
A survey was conducted among $400$ users of a music streaming platform to find out what percentage prefers urban music. The confidence interval obtained for the…

A survey was conducted among $400$ users of a music streaming platform to find out what percentage prefers urban music. The confidence interval obtained for the proportion of users is $(0.312; 0.388)$.

  1. a) Determine the value of the sample proportion and the confidence level used in the study.
  1. b) If it is decided to conduct a new study with a sample of $1600$ users and the sample proportion remains the same, what will be the width of the new interval if working with the same confidence level?
  1. c) Justify mathematically how the width of the interval changes if we quadruple the sample size and double the critical value $z_{\alpha/2}$.
Solve

Confidence interval for a proportion

Practice★☆☆Not started
We wish to estimate the proportion of households in a city that separate organic waste for recycling. To do so, a random sample of $n = 400$ households is surveyed, of…

We wish to estimate the proportion of households in a city that separate organic waste for recycling. To do so, a random sample of $n = 400$ households is surveyed, of which $160$ state that they separate this waste.

Determine the confidence interval for the proportion of households that recycle organic waste across the whole city, using a confidence level of $90\%$.

Solve
Practice★★☆Not started
In a survey conducted among $400$ students at a high school on the use of streaming platforms, $260$ stated that they prefer watching series to movies. a) Find the point…

In a survey conducted among $400$ students at a high school on the use of streaming platforms, $260$ stated that they prefer watching series to movies.

  1. a) Find the point estimate of the proportion of students who prefer series.
  2. b) Obtain an $97 \%$ confidence interval for the true proportion of students who prefer series at that school.
E ≈ 0.052 E ≈ 0.052 p̂ = 0.65 0.598 Lower limit 0.702 Upper limit 0.55 0.75 97% Confidence n = 400 x = 260 1-α = 0.97
Solve
Practice★★☆Not started
An "eco-friendly" clothing brand claims that $30\,\%$ of its customers are under $20$ years old. To check 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 check this, a random sample of $500$ customers is taken and it is observed that $135$ of them are under $20$ years old.

  1. a) Construct a $99\,\%$ confidence interval for the proportion of customers under $20$ years old based on the sample data.
  1. b) In view of the result, can we consider the brand's claim to be consistent with the data obtained at a $99\,\%$ confidence level? Explain why.
Solve

Sample size for a mean

Before carrying out a survey, it is useful to know how much data is needed to reach a given maximum error $E$.

The graph shows $1/\sqrt{n}$: at first each extra data point lowers the error a lot, but later the benefit becomes small.

Practice★☆☆Not started
A LED light bulb factory wishes to estimate the mean lifespan of its products. It is known from previous studies that the standard deviation of the lifespan is…

A LED light bulb factory wishes 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$ should they choose so that the maximum error incurred is less than $100$ hours?

E < 100 E < 100 μ 95% Confidence σ = 500 1 - α = 0.95 z = 1.96 E < 100 Sample size n = ?
Solve
Practice★★☆Not started
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 should be the minimum sample size so that the maximum margin of error made when estimating the population mean is less than $30$ minutes, with a confidence level of $99 \%$?

Solve
Practice★★★Not started
A technology center is researching 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 researching 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 $96\%$ confidence.

  1. a) If the confidence interval is required to have a maximum length of $20$ minutes, calculate the minimum required sample size.
  1. b) After conducting the experiment with the sample size obtained in the previous part, the sample mean is observed to be $9.5$ hours. Write the resulting confidence interval in hours.
  1. c) If, due to budget constraints, only $50$ devices could be analyzed, what would be the maximum margin of error incurred if we wished to maintain $96\%$ confidence? Express the result in minutes.
E 2E μ μ - E μ + E 96% σ = 0.8 h
Solve

Sample size for a proportion

Practice★★☆Not started
An estimate is to be made of the proportion of citizens who would be willing to use public transport if it were free. In a prior study the expected proportion is…

An estimate is to be made of the proportion of citizens who would be willing to use public transport if it were free. In a prior study the expected proportion is unknown, so maximum variance ($p = q = 0.5$) is assumed.

Determine the minimum sample size required to estimate this proportion with a maximum margin of error of $4 \%$ and a confidence level of $95.44 \%$ (which corresponds to a critical value of $z_{\alpha/2} = 2$).

Solve
Practice★★★Not started
A cell 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 cell 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.

  1. a) Calculate the $98\%$ confidence interval for the population proportion of users of this mode.
  1. b) Suppose that no prior information about the proportion is available (maximum uncertainty scenario). Determine the sample size needed for the maximum margin of error to be $0.02$ with a confidence level of $95\%$.
  1. c) If the proportion obtained in the initial sample ($0.6$) is used to calculate the sample size under the same conditions as in part b) (margin of error $0.02$ and confidence level $95\%$), how many fewer users would need to be surveyed compared to the maximum uncertainty scenario?
Solve
Practice★★★Not started
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 follow-up.

  1. 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 the estimate).
  1. b) If we wanted the margin of error to be only $0.01$ while maintaining $95\%$ confidence, but suspect that the true proportion might be closer to $50\%$, what would be the new required sample size?
Margin of Error (E) Sample size (n) p=0.15 p=0.50 Width 0.06 E=0.03 n₁ E=0.01 n₂
Solve

Confidence, error, and sample size

The margin of error, the confidence, and the sample size are connected:

  • More confidence $\Rightarrow$ larger $z_{\alpha/2}$ $\Rightarrow$ wider interval (less precise).

  • More sample $\Rightarrow$ narrower interval.

  • To gain precision without losing confidence, the only way out is to increase $n$.

Two intervals: a narrow one because of a large sample and a wide one because of high confidence. large n: narrower high confidence: wider
Practice★★☆Not started
Two secondary schools, A and B, measure the mean time that their 2nd year Baccalaureate students spend studying mathematics per week. In both schools, it is known that…

Two secondary schools, A and B, measure the mean time that their 2nd year Baccalaureate students spend studying mathematics per week. In both schools, 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)$.

  1. a) Determine the confidence level used in school A.
  2. b) Determine the confidence level used in school B.
  3. c) Which of the two schools has made a more precise estimate? Justify your answer.
Solve
Practice★★★Not started
In a university entrance examination, the marks obtained by students in Applied Mathematics for Social Sciences II follow a normal distribution with a standard deviation…

In a university entrance examination, the marks obtained by students in Applied Mathematics for Social Sciences II follow a normal distribution with a standard deviation of $1.5$ points. Two independent samples are selected from different secondary schools, both of size $n$.

  • For Sample A, a confidence level of $90\%$ is used, yielding a margin of error of $0.25$ points.

  • For Sample B, a confidence level of $99\%$ is required.

  1. a) Calculate the sample size $n$ used in Sample A.
  1. b) Using the value of $n$ found in the previous part, determine the maximum admissible margin of error for Sample B.
  1. c) If it were decided to combine both samples into a single sample of size $2n$, calculate the new margin of error for a confidence level of $95\%$. Is this margin of error smaller than that of Sample A? Reason whether precision always improves when increasing the sample size regardless of changes in the confidence level.
Solve
Practice★★★Not started
The reaction time of pilots using a state-of-the-art flight simulator follows a normal distribution with unknown mean and standard deviation of $0.05$ seconds. On taking…

The reaction time of pilots using a state-of-the-art flight simulator follows a normal distribution with unknown mean and standard deviation of $0.05$ seconds. On taking a sample of $64$ pilots, a mean of $0.42$ seconds is observed.

  1. a) Obtain the confidence interval for the population mean at a confidence level of $97\%$.
  1. 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 part? Justify your answer based on the relationship between confidence intervals and population parameters.
  1. 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 by which the width is reduced or increased.
Solve

Unknown standard deviation: Student's $t$

$\sigma$ is almost never known. When it is unknown, or when the sample is small ($n<30$) and the population is approximately normal, $\sigma$ is replaced by the sample standard deviation $s$ (which divides by $n-1$) and $z_{\alpha/2}$ by a value from Student's $t$ distribution.

Back to the beginning: with $\bar{x}=130$ min, $\sigma=30$, and $n=400$, the $95\%$ interval is $130 \pm 1.96 \times 1.5 = (127.06,\ 132.94)$ minutes. We don't know exactly how much each teenager watches, but we do have a reliable range for the average of all of them, and with the formula for $n$ we know how many people need to be surveyed to narrow it.

Summary

See all the exercises in this section