Math & Scientific
Confidence Interval Calculation: Two Mean Examples
Calculate a normal mean interval from standard error and margin of error, check two examples, and distinguish known-sigma intervals from t methods.
Identify the population quantity being estimated
A confidence interval for a mean estimates a population average from a sample. It is not a prediction interval for the next observation and does not claim that a stated fraction of individual values lies inside its endpoints. This worked example uses independent observations from a normal population whose standard deviation is known. That assumption makes the normal critical-value method appropriate. If the population spread is estimated from the same small sample, a t interval is usually the relevant basic method instead.
Write the first set of inputs
Suppose the sample mean is 80, the known population standard deviation is 12, and the sample contains 36 observations. Choose a two-sided confidence level of 95%. The form expects the standard deviation itself, not its square and not the standard error. Enter mean 80, SD 12, n 36 and confidence 95. Record the measurement unit with the result; the mean, standard deviation, standard error and interval endpoints all use that original unit.
Calculate standard error before the margin
For independent observations, the sampling standard deviation of the mean is σ/√n. Here it is 12/√36=12/6=2. This standard error is smaller than the observation-level SD because it describes averages of 36 observations. The local form uses the normal critical value 1.96 for the selected confidence level, giving margin of error 1.96×2=3.92. Dividing by n instead of √n would give a margin that is too small.
Form and check both endpoints
Subtract and add the margin to the sample mean: 80−3.92=76.08 and 80+3.92=83.92. The displayed interval should be [76.08,83.92]. Its midpoint is 80 and its total width is 7.84, twice the margin of error. These checks catch a common error in which a full width is accidentally used as a one-sided margin. The underlying normal quantile is slightly different from 1.96, so another package using more critical-value digits can differ in the last displayed decimals.
Repeat with a different scale and sample size
For mean 102, known SD 8 and n=64 at 95% confidence, the standard error is one and the margin is 1.96. The interval is [100.04,103.96]. This second calculation changes both spread and sample size. Holding other inputs fixed, increasing n by a factor of four halves the standard error and margin. It does not remove systematic measurement error, nonresponse bias or dependence among observations; those problems are not solved merely by collecting more records.
Know when the t interval changes the answer
If 12 in the first example is a sample SD rather than a known population SD, the usual one-sample t interval uses 35 degrees of freedom. Its two-sided 95% critical value is about 2.0301, giving a margin near 4.0602 rather than 3.92. The local form does not make that substitution automatically. Use a t-capable procedure when the method calls for it, especially with a small sample, and state which spread estimate and critical-value distribution were used.
Interpret the confidence statement correctly
In a repeated-sampling interpretation, the specified method would produce intervals covering the fixed population mean in about 95% of repeated samples under its assumptions. After this particular interval is observed, the fixed mean either lies inside or outside it. The confidence level does not mean 95% of individual measurements fall between the endpoints. Nor does a narrow interval establish that the sampled population is the one the reader cares about. Sampling design and measurement quality remain part of the interpretation.
Report a reproducible result
For the first example, report sample mean 80, n=36, known population SD 12, and a 95% two-sided normal interval of 76.08 to 83.92. Explain the unit and how observations were collected. Round only after forming endpoints, preserving adequate intermediate precision. A one-sided bound, a paired difference, a survey-weighted estimate or a binomial proportion needs its own method; changing a label on this mean interval would not make it an appropriate calculation for those other targets.
Calculator for the supported step
This form uses fixed normal critical values, including z=1.96 for 95%, with mean ± z×SD/√n. It does not compute a Student t critical value or a proportion interval. Supply a known population SD for the exact normal-model example, or explicitly label a justified large-sample approximation.