Tutorials › Introduction to Statistics › Comparing T and Z Intervals for a Mean

Confidence Intervals for Means · Tutorial 589 of 996

Comparing T and Z Intervals for a Mean

Learn when a z or t interval is appropriate for a population mean, and why the t interval accounts for uncertainty in an estimated spread.

Intermediate 10 min read

What You'll Learn

  • Distinguish mean intervals that use a known population standard deviation from those that estimate it.
  • Write the z and one-sample t interval formulas and identify their critical values.
  • Explain why estimating spread leads to a t statistic with \(n-1\) degrees of freedom.
  • Compare t and z interval widths at the same confidence level.
  • Check the conditions needed to use each interval.
  • Recognize why replacing an unknown population standard deviation with the sample standard deviation in a z interval is not generally exact.

Two Ways to Build an Interval for a Mean

A confidence interval for a population mean estimates the center of a population using a sample mean and expresses uncertainty through a margin of error. The central question in choosing a method is whether the population standard deviation, \(\sigma\), is known. If it is known, the standardized sample mean follows the standard normal distribution under the normal model. If it is unknown, the usual procedure estimates spread using the sample standard deviation, \(s\), and uses a t distribution to account for the additional uncertainty.

The two formulas can look almost identical: each is a sample mean plus or minus a critical value times a standard error. The important differences are which standard deviation enters the standard error and which distribution supplies the critical value.

Definition: For a two-sided confidence interval with confidence level \(C=1-\alpha\), let \(z^*\) be the standard normal critical value with probability \(1-\alpha/2\) to its left, and let \(t^*\) be the corresponding critical value from a t distribution with \(df=n-1\). The interval for a mean with known population standard deviation is \(\bar{x}\pm z^*\sigma/\sqrt{n}\). The one-sample t interval for a mean with unknown population standard deviation is \(\bar{x}\pm t^*s/\sqrt{n}\), with \(df=n-1\).

These procedures have different requirements. A z interval for a mean assumes that \(\sigma\) is known and that observations are independent; the population is normal for an exact interval, while a sufficiently large sample can support an approximate interval when the sampling distribution of \(\bar{x}\) is close to normal. A t interval assumes that \(\sigma\) is unknown and estimated by \(s\), with independent observations. It is exact when the observations come from a normal population. With larger samples, it can be reasonably robust to moderate departures from normality, but strong skewness or influential outliers can still cause problems. The earlier material on random sampling, the 10% condition, and checking normality and outliers describes how to assess these conditions.

Why the t Critical Value Is Used

When \(\sigma\) is known, the standardized sample mean is \(\left(\bar{x}-\mu\right)/(\sigma/\sqrt{n})\). Under a normal population model, this quantity has a standard normal distribution. When \(\sigma\) is unknown, substituting \(s\) for \(\sigma\) changes the standardized quantity: its denominator now varies from sample to sample. That added variability is why the standard normal critical value is not generally the right one.

The t distribution describes the resulting statistic when the population is normal. It is centered at zero, like the standard normal distribution, but has heavier tails for finite degrees of freedom. Consequently, for a given central confidence level, its critical value is larger than the corresponding standard normal critical value. As \(df\) increases, the t distribution approaches the standard normal distribution and the critical values become closer.

Justification: If \(X_1,\ldots,X_n\) are independent observations from a normal population with mean \(\mu\) and standard deviation \(\sigma\), then \(\bar{x}\) is normally distributed and \((n-1)s^2/\sigma^2\) has a chi-square distribution with \(n-1\) degrees of freedom, independently of \(\bar{x}\). Therefore, $$ T=\frac{\bar{x}-\mu}{s/\sqrt{n}} =\frac{(\bar{x}-\mu)/(\sigma/\sqrt{n})}{\sqrt{((n-1)s^2/\sigma^2)/(n-1)}} $$ has a t distribution with \(n-1\) degrees of freedom. The denominator includes a random estimate of spread, rather than a fixed known \(\sigma\). For a central confidence level \(1-\alpha\), the t critical value satisfies \(P(-t^*\leq T\leq t^*)=1-\alpha\). Rearranging this inequality gives \(\bar{x}-t^*s/\sqrt{n}\leq\mu\leq\bar{x}+t^*s/\sqrt{n}\), the one-sample t interval.

The t critical value is not an arbitrary penalty added to an interval. It is the value that gives the target central probability for the statistic that actually applies when spread is estimated. Using \(z^*\) instead would treat the estimated standard error as if its scale were known exactly.

Worked Comparisons

Worked Example: Unknown Spread in a Small Sample

A hypothetical random sample of \(n=16\) containers has mean fill volume \(\bar{x}=52.4\) mL and sample standard deviation \(s=8.0\) mL. Construct and compare 95% intervals using the t and standard normal critical values.

Check the conditions. Suppose the containers were randomly sampled from a much larger production run, so the observations are independent and the 10% condition is reasonable. Suppose a plot of the sample shows no strong skewness or outliers and the fill volumes are reasonably consistent with a normal population. With this small sample, that normality check matters for the t procedure. The population standard deviation is not known, so the t interval is the appropriate procedure.

For a 95% interval, \(df=n-1=15\), \(t^*=2.131\), and \(z^*=1.960\). The estimated standard error is $$ SE=\frac{s}{\sqrt{n}}=\frac{8.0}{\sqrt{16}}=\frac{8.0}{4}=2.0\text{ mL}. $$ The t interval is $$ 52.4\pm 2.131(2.0)=52.4\pm4.262, $$ so it is approximately \((48.14,\ 56.66)\) mL.

If \(z^*\) is substituted while keeping \(s\) in the standard error, the result is $$ 52.4\pm1.960(2.0)=52.4\pm3.920, $$ or \((48.48,\ 56.32)\) mL. This z-based interval is narrower, but it does not account correctly for estimating the population spread from only 16 observations. Under the stated normal model, the t interval is the calibrated 95% procedure. Its interpretation is that the method used to construct intervals in this way would capture the population mean fill volume in about 95% of repeated samples.

Worked Example: Known Population Spread

In a hypothetical setting, a measurement process has a population standard deviation known from complete calibration records to be \(\sigma=15\) units. A random sample of \(n=36\) independent measurements has \(\bar{x}=120\) units. Construct a 90% confidence interval for the population mean.

Check the conditions. The sample is described as random and independent, and the known \(\sigma\) is a genuine population standard deviation, not an estimate from these 36 observations. Assume the sampled population is normal or that the sample is large enough for the sampling distribution of the mean to be approximately normal. These conditions support the z interval.

For 90% confidence, \(z^*=1.645\). The standard error is calculated using the known population standard deviation: $$ SE=\frac{\sigma}{\sqrt{n}}=\frac{15}{\sqrt{36}}=2.5\text{ units}. $$ Thus the interval is $$ 120\pm1.645(2.5)=120\pm4.1125, $$ which gives approximately \((115.9,\ 124.1)\) units.

This is a z interval because the population spread is known. Using a t critical value merely because the sample size is 36 would not match the stated model: there is no spread estimate \(s\) replacing an unknown \(\sigma\). If the value 15 were instead only an estimate, this example would not justify the z procedure.

Worked Example: How the Difference Shrinks with More Degrees of Freedom

A hypothetical random sample of \(n=100\) independent measurements has \(\bar{x}=73.2\) seconds and \(s=12.0\) seconds. Assume the population spread is unknown, and the sample shows no severe skewness or influential outliers. Compare the 95% t interval with the interval obtained by using \(z^*\) and \(s\).

The 10% condition is reasonable if the population contains at least 1,000 measurements, and the sample size is large enough that modest nonnormality is less concerning. Because \(\sigma\) is unknown, the t interval remains the appropriate choice. Here \(df=99\), and the 95% critical values are approximately \(t^*=1.984\) and \(z^*=1.960\). The standard error is $$ SE=\frac{12.0}{\sqrt{100}}=1.20\text{ seconds}. $$ The t interval is $$ 73.2\pm1.984(1.20)=73.2\pm2.3808, $$ or approximately \((70.82,\ 75.58)\) seconds.

Using \(z^*\) with the same estimated standard error gives $$ 73.2\pm1.960(1.20)=73.2\pm2.352, $$ or \((70.85,\ 75.55)\) seconds. The endpoints are close because \(df=99\) makes the t distribution close to standard normal. The t procedure is still the one justified by the unknown population spread; closeness of the answers does not make the two methods identical.

How to Choose and What to Report

For the same sample, confidence level, and standard error, a finite-df t interval has a larger margin of error than a z interval because \(t^*>z^*\). This comparison isolates the effect of the critical value. In practice, changing from a z procedure to a t procedure also commonly means using \(s\) instead of \(\sigma\), so the full interval widths can differ for more than one reason.

SituationStandard errorCritical valueMean interval
Population standard deviation \(\sigma\) is known\(\sigma/\sqrt{n}\)\(z^*\)\(\bar{x}\pm z^*\sigma/\sqrt{n}\)
Population standard deviation is unknown and estimated by \(s\)\(s/\sqrt{n}\)\(t^*\) with \(df=n-1\)\(\bar{x}\pm t^*s/\sqrt{n}\)

In most applications, \(\sigma\) is unknown. A sample standard deviation does not become a known population standard deviation just because it is available or calculated precisely. Therefore, the usual interval for a mean is a one-sample t interval. A z interval is appropriate when the population standard deviation really is known under the problem’s model.

A complete report should identify the method, state the interval in the variable’s units, and give a contextual interpretation. For example, the first example supports reporting a 95% one-sample t interval of approximately 48.14 to 56.66 mL for the population mean fill volume, subject to its sampling and distribution conditions. The interval estimates a population mean; it does not assert that 95% of individual container volumes fall between its endpoints.

Common Mistake

Wrong reasoning: “The sample is large, so I can use \(z^*\) even though \(\sigma\) is unknown.” A large sample can make the t critical value close to the z critical value, but it does not turn \(s\) into a known \(\sigma\). When spread is estimated, the t statistic is the standard procedure. For large \(df\), the numerical difference may be small; for small \(df\), using \(z^*\) can make the interval noticeably too narrow. The choice should follow what is known about the population spread, not only the sample size.

Key takeaway: Use \(z^*\sigma/\sqrt{n}\) when the population standard deviation is known. When it is unknown and estimated by \(s\), use \(t^*s/\sqrt{n}\) with \(df=n-1\). The t critical value accounts for the extra uncertainty from estimating spread.

Check Your Understanding

Answer each question using the distinction between known and estimated population spread.

  1. A random sample has \(n=12\), with \(\bar{x}=30\) and \(s=4\). The population standard deviation is unknown. Which distribution supplies the critical value, and what are the degrees of freedom?
  2. For the same confidence level and standard error, why is the finite-df t interval generally wider than the z interval?
  3. A researcher has a sample standard deviation from a sample of 200 observations but no known population standard deviation. Does the sample size alone justify using a z interval? Explain.
  4. In a correctly specified z interval for a mean, what does \(\sigma\) represent, and why is it not interchangeable with \(s\)?
  5. What happens to the t critical value relative to \(z^*\) as the degrees of freedom become very large?