Confidence Interval for a Mean

Estimates the range where a population mean likely falls using sample data when the population standard deviation is unknown.

xˉ±tsn\bar{x} \pm t^{*}\frac{s}{\sqrt{n}}

Solve a problem with Confidence Interval for a Mean

Type the problem. The solver will use Confidence Interval for a Mean where Confidence Interval for a Mean is the right tool, and tell you when it is not.

Drag one in or paste from the clipboard. JPEG, PNG or WebP. You get the transcription to check before anything is solved.

How to get a better answer
  • Paste the whole problem, including the instruction word — "simplify", "solve for x" and "factor" lead to three different answers.
  • Say what you have already tried. "I got x = 4 and the book says 2" turns a solution into a diagnosis.
  • Set the level in the settings button. A calculus shortcut is not a better answer if you have not met derivatives yet.
  • For a photo, get the whole problem in frame and hold the page flat — you get the transcription to fix before anything is solved.

What each symbol means

What Confidence Interval for a Mean takes
xˉ\bar{x}
tt^{*}
ss
nn
Confidence Interval for a Mean
SymbolMeaning
xˉ\bar{x}The sample mean, the average of your data values. It estimates the unknown population mean and is located at the center of the confidence interval. Confusing it with individual data points or the population mean μ\mu leads to wrong interpretations.
tt^{*}The critical value from the Student's t-distribution, found using a t-table with your confidence level and degrees of freedom. It tells you how many standard errors to extend from the sample mean. Using a z-critical value instead gives an interval that is too narrow.
ssThe sample standard deviation, measuring the spread of your sample data around the sample mean. It estimates the unknown population standard deviation σ\sigma and uses the same units as your data. Using the population standard deviation directly (if you somehow knew it) would change the entire calculation.
nnYour sample size, the number of observations in your sample. Larger samples give narrower intervals because the standard error decreases as n\sqrt{n} increases, making your estimate more precise.

When to use it

Use this when you have a sample from a population and want to estimate where the true population mean falls, particularly with smaller samples or when population variability is unknown.

Level

Usually taught in: Statistics · Appears on: AP Statistics

Worked examples

1. Estimate population mean height from a small sample

Problem

A school measures the heights of 10 randomly selected students. The sample mean is 65 inches and the sample standard deviation is 2 inches. Construct a 95% confidence interval for the population mean height.
  1. xˉ=65,s=2,n=10,confidence level=95%\bar{x} = 65, \quad s = 2, \quad n = 10, \quad \text{confidence level} = 95\%

    We organize all given values: sample mean, sample standard deviation, sample size, and desired confidence level.

  2. df=n1=101=9df = n - 1 = 10 - 1 = 9

    Degrees of freedom for a confidence interval for the mean is df=n1=9df = n - 1 = 9.

  3. t=2.262t^{*} = 2.262

    From the t-table with 95% confidence and df=9df = 9, we find t=2.262t^* = 2.262.

  4. SE=sn=210=23.162=0.632SE = \frac{s}{\sqrt{n}} = \frac{2}{\sqrt{10}} = \frac{2}{3.162} = 0.632

    The standard error measures the precision of the sample mean: SE=snSE = \frac{s}{\sqrt{n}}.

  5. ME=tSE=2.262×0.632=1.430ME = t^{*} \cdot SE = 2.262 \times 0.632 = 1.430

    The margin of error extends the interval on either side of the sample mean: ME=tSEME = t^* \cdot SE.

  6. 65±1.430=(63.570,66.430)65 \pm 1.430 = (63.570, 66.430)

    The confidence interval is the sample mean plus and minus the margin of error.

Answer: (63.57,66.43) inches(63.57, 66.43) \text{ inches}

We use the t-distribution because the population standard deviation is unknown and we work with a modest sample size. This interval tells us we can be 95% confident that the true average height of all students at this school falls between 63.57 and 66.43 inches.

2. Estimate population mean calcium intake

Problem

A nutritionist measures daily calcium intake (in mg) for 15 patients and finds a sample mean of 850 mg with a sample standard deviation of 125 mg. Construct a 90% confidence interval for the population mean daily calcium intake.
  1. xˉ=850,s=125,n=15,confidence level=90%\bar{x} = 850, \quad s = 125, \quad n = 15, \quad \text{confidence level} = 90\%

    We list the given values: sample mean in mg, sample standard deviation in mg, sample size, and confidence level.

  2. df=151=14df = 15 - 1 = 14

    Degrees of freedom is df=n1=14df = n - 1 = 14.

  3. t=1.761t^{*} = 1.761

    Using a t-table for 90% confidence with df=14df = 14, we find t=1.761t^* = 1.761.

  4. SE=12515=1253.873=32.276SE = \frac{125}{\sqrt{15}} = \frac{125}{3.873} = 32.276

    The standard error is SE=sn32.276SE = \frac{s}{\sqrt{n}} \approx 32.276 mg.

  5. ME=1.761×32.276=56.852ME = 1.761 \times 32.276 = 56.852

    The margin of error is calculated as ME=t×SE56.852ME = t^* \times SE \approx 56.852 mg.

  6. 85056.852=793.148,850+56.852=906.852850 - 56.852 = 793.148, \quad 850 + 56.852 = 906.852

    The lower bound is 85056.852850 - 56.852 and the upper bound is 850+56.852850 + 56.852.

Answer: (793.15,906.85) mg(793.15, 906.85) \text{ mg}

A 90% confidence interval is appropriate here because we are estimating the population mean from a sample without knowing the population variability. We conclude that the true mean daily calcium intake for patients likely falls between 793.15 and 906.85 mg.

3. Estimate population mean monthly phone bill

Problem

A cell phone company analyzes monthly bills for 20 randomly selected customers on the same plan. The sample mean bill is $65 with a sample standard deviation of $8. Construct a 95% confidence interval for the population mean monthly bill.
  1. xˉ=65,s=8,n=20,confidence level=95%\bar{x} = 65, \quad s = 8, \quad n = 20, \quad \text{confidence level} = 95\%

    We identify the sample mean in dollars, sample standard deviation in dollars, sample of 20 customers, and 95% confidence level.

  2. df=201=19df = 20 - 1 = 19

    Degrees of freedom equals df=n1=19df = n - 1 = 19.

  3. t=2.093t^{*} = 2.093

    From the t-table at 95% confidence with df=19df = 19, we find t=2.093t^* = 2.093.

  4. SE=820=84.472=1.789SE = \frac{8}{\sqrt{20}} = \frac{8}{4.472} = 1.789

    The standard error is SE=sn1.789SE = \frac{s}{\sqrt{n}} \approx 1.789 dollars.

  5. ME=2.093×1.789=3.744ME = 2.093 \times 1.789 = 3.744

    The margin of error is ME=t×SE3.744ME = t^* \times SE \approx 3.744 dollars.

  6. 653.744=61.256,65+3.744=68.74465 - 3.744 = 61.256, \quad 65 + 3.744 = 68.744

    Subtract and add the margin of error from the sample mean to get the interval bounds.

Answer: (61.26,68.74) dollars(61.26, 68.74) \text{ dollars}

Since the company does not know the population standard deviation of monthly bills, the t-distribution is the correct choice. This 95% confidence interval indicates that the company can be 95% confident the true average monthly bill for customers on this plan is between $61.26 and $68.74.

Common mistakes

Where Confidence Interval for a Mean usually goes wrong
Answer came out wrong
Using the z-critical value zz^* (such as 1.96 for 95% confidence) instead of the t-critical value tt^*.
Always use the t-distribution when σ\sigma is unknown and you're estimating from a sample. Look up tt^* in a t-table using your confidence level and df=n1df = n - 1.
Forgetting to divide the sample standard deviation by n\sqrt{n} and instead writing the interval as xˉ±ts\bar{x} \pm t^* s (without the square root term).
The correct formula is xˉ±tsn\bar{x} \pm t^* \frac{s}{\sqrt{n}}. Always divide ss by n\sqrt{n} before multiplying by tt^*.
Using nn instead of n1n - 1 when calculating degrees of freedom, writing df=ndf = n instead of df=n1df = n - 1.
Always calculate degrees of freedom as df=n1df = n - 1. For a sample of n=25n = 25, use df=24df = 24 to look up tt^*.
The mistakeWhy it is wrongThe fix
Using the z-critical value zz^* (such as 1.96 for 95% confidence) instead of the t-critical value tt^*.The z-distribution is used only when the population standard deviation σ\sigma is known; here we use the sample standard deviation ss, so the t-distribution is correct.Always use the t-distribution when σ\sigma is unknown and you're estimating from a sample. Look up tt^* in a t-table using your confidence level and df=n1df = n - 1.
Forgetting to divide the sample standard deviation by n\sqrt{n} and instead writing the interval as xˉ±ts\bar{x} \pm t^* s (without the square root term).The formula requires the standard error sn\frac{s}{\sqrt{n}}, not the raw sample standard deviation. Omitting n\sqrt{n} makes the interval far too wide and gives a meaningless result.The correct formula is xˉ±tsn\bar{x} \pm t^* \frac{s}{\sqrt{n}}. Always divide ss by n\sqrt{n} before multiplying by tt^*.
Using nn instead of n1n - 1 when calculating degrees of freedom, writing df=ndf = n instead of df=n1df = n - 1.One degree of freedom is consumed in computing the sample standard deviation ss, so the t-distribution has n1n - 1 degrees of freedom. Using the wrong df gives an incorrect critical value.Always calculate degrees of freedom as df=n1df = n - 1. For a sample of n=25n = 25, use df=24df = 24 to look up tt^*.

Tips and when to use something else

  • A confidence interval for the mean estimates a range; it does not test whether a specific value is plausible. If you need to test a claim about the population mean, use a One-Sample t Test instead.
  • Higher confidence levels (99% vs. 90%) produce wider intervals because they require a larger tt^* value. More confidence means less precision.
  • Larger samples reduce the standard error because of the n\sqrt{n} term, making your interval narrower and your estimate more precise. This is why larger samples are generally preferred in statistics.
  • The confidence level (such as 95%) describes the long-run behavior of the method: if you repeated sampling and constructed intervals many times, about 95% would contain the true population mean.

Frequently asked questions

What is the difference between a confidence interval and a hypothesis test?
A confidence interval estimates a range where the population mean likely lies. A hypothesis test checks whether a specific claimed value for the population mean is plausible. They are complementary: if a value falls outside your 95% confidence interval, a hypothesis test at the 5% significance level would reject it.
Why do I have to look up tt^* in a table instead of using the same critical value every time?
The critical value tt^* depends on both your chosen confidence level and your sample size (through degrees of freedom). Different confidence levels and sample sizes require different critical values, so you must consult a t-table or calculator each time.
What does 95% confident mean exactly?
It means that if you repeated your sampling procedure many times and constructed a 95% confidence interval each time, approximately 95% of those intervals would contain the true population mean. It does not mean there is a 95% probability that this specific interval contains the mean—the mean either is or is not in this interval.
Why does my confidence interval get narrower when I increase the sample size?
The margin of error includes the term sn\frac{s}{\sqrt{n}}. As nn increases, n\sqrt{n} gets larger, so the whole fraction gets smaller. A smaller margin of error produces a narrower interval, reflecting greater precision from a larger sample.

Need a different method?

The full solver is not scoped to one formula — type any problem and it will pick the method.

Open the math solver

Reviewed 2026-09-18