BIOSTATISTICS • SAMPLING & ESTIMATION

CI for a Mean — Compute CI for a mean (t-interval)

Quantify the uncertainty in a sample mean when the population standard deviation is unknown.

Historical Context & Motivation

In the biological and health sciences, researchers rarely have access to an entire population; instead, they draw a sample and attempt to generalize their findings. The fundamental challenge of statistical inference is to quantify how much uncertainty accompanies an estimate derived from limited data. When the parameter of interest is a population mean and the population standard deviation σ is unknown—as is almost always the case in practice—the classical normal-theory confidence interval breaks down, and a more nuanced tool is required. The development of the t-interval addressed precisely this gap, providing a rigorous yet practical method for constructing confidence intervals from small to moderate samples.

1809
Gauss and the Normal Distribution
Carl Friedrich Gauss formally described the normal (Gaussian) distribution in the context of astronomical errors, laying the mathematical groundwork for inference about means.
1908
Student's t-Distribution
William Sealy Gosset, publishing under the pseudonym "Student" while working at the Guinness Brewery, derived the t-distribution to handle small-sample inference when σ is unknown. His landmark paper in Biometrika revolutionized quality control and experimental science.
1934
Fisher Formalizes Degrees of Freedom
Ronald A. Fisher rigorously defined degrees of freedom and connected the t-distribution to the broader family of sampling distributions, embedding the t-interval into the framework of modern statistical theory.
1937
Neyman's Confidence Interval Theory
Jerzy Neyman published his foundational paper on confidence intervals, formalizing the frequentist interpretation: a 95 % confidence interval procedure will capture the true parameter in 95 % of repeated samples.
Modern
Standard Tool in Biostatistics
Today the t-interval is a cornerstone of clinical trials, epidemiological studies, and laboratory research, appearing in virtually every introductory biostatistics curriculum and statistical software package.

The central question the t-interval answers is deceptively simple: given a sample mean x̄ computed from n observations, what range of values for the true population mean μ is plausible at a specified confidence level? Answering this question requires understanding the sampling distribution of x̄ when s (the sample standard deviation) replaces σ—a situation that introduces extra variability captured by the heavier tails of the t-distribution.

Core Principles & Definitions

Before computing a t-interval, several foundational ideas must be firmly in place. These principles connect the concepts of sampling variability, probability distributions, and the logic of interval estimation, forming the scaffold upon which the formula rests.

1

Sampling Distribution of x̄

If repeated random samples of size n are drawn from a population with mean μ and standard deviation σ, the distribution of sample means x̄ is approximately normal (by the Central Limit Theorem for n ≥ 30, or exactly normal if the population itself is normal). The standard deviation of this distribution is σ/√n, called the standard error.
2

The t-Distribution

When σ is unknown and replaced by the sample standard deviation s, the standardized statistic (x̄ − μ)/(s/√n) follows a t-distribution with ν = n − 1 degrees of freedom. It is symmetric and bell-shaped like the normal, but has heavier tails that account for the added uncertainty of estimating σ.
3

Degrees of Freedom (df)

The parameter ν = n − 1 controls the shape of the t-distribution. Smaller df means heavier tails and wider intervals; as df → ∞ the t-distribution converges to the standard normal z-distribution.
4

Confidence Level (1 − α)

The confidence level—commonly 90 %, 95 %, or 99 %—specifies the long-run proportion of intervals that would capture μ if the sampling procedure were repeated. A 95 % CI uses α = 0.05 and the critical value tα/2, df.
5

Margin of Error

The half-width of the interval, E = tα/2 × (s/√n), quantifies the maximum expected distance between x̄ and μ at the chosen confidence level. The interval is x̄ ± E.
KEY TAKEAWAY
Think of a confidence interval as a net cast around a sample mean to catch the true population mean. A z-interval assumes you know the exact mesh size (σ), but in practice you must estimate it from the sample. The t-interval uses a slightly wider net—wider tails—to compensate for this estimation uncertainty, especially when the sample is small. As sample size grows, your estimate of σ becomes precise, the net tightens, and the t-interval converges to the z-interval.

Visual Explanation — The t-Distribution and Confidence Interval

The solid violet curve shows a t-distribution with df = 5; the dashed cyan curve is the standard normal. Notice the t-distribution's heavier tails, meaning more probability resides far from zero. The pink dashed lines mark the critical values ±t* that capture the central 95 % area. Because the tails are heavier, t* > z* = 1.96, producing a wider confidence interval.

The diagram above illustrates the key visual intuition behind the t-interval. When degrees of freedom are small, the t-distribution allocates more probability to extreme values, reflecting the additional uncertainty introduced by estimating σ with s. As a consequence, the critical value tα/2 used to build a 95 % interval is larger than the familiar z* = 1.96 from the standard normal. For df = 5, t0.025, 5 ≈ 2.571—about 31 % larger. This means the interval stretches further in both directions, appropriately widening the net of plausible values for μ. As n increases and df grows, the t-distribution converges to the standard normal, and the two intervals become virtually indistinguishable beyond about df = 30.

Mathematical Framework

The derivation of the t-interval begins with the observation that if the population is normally distributed (or the sample size is large enough for the Central Limit Theorem to apply), the quantity T = (x̄ − μ) / (s/√n) follows a t-distribution with n − 1 degrees of freedom. Inverting this pivotal quantity to isolate μ yields the confidence interval formula.

T-STATISTIC (PIVOTAL QUANTITY)
T = (x̄ − μ) / (s / √n) ~ t(df = n − 1)
x̄ = sample mean, μ = population mean, s = sample standard deviation, n = sample size. This quantity follows a t-distribution with n − 1 degrees of freedom.
CONFIDENCE INTERVAL FOR μ
x̄ ± t_{α/2, n−1} × (s / √n)
tα/2, n−1 = critical value from the t-table for a two-tailed area of α (e.g., α = 0.05 for 95 % CI). The term s/√n is the estimated standard error of x̄.
MARGIN OF ERROR
E = t_{α/2, n−1} × (s / √n)
E represents the half-width of the interval. The interval is equivalently written as (x̄ − E, x̄ + E).

From a probabilistic standpoint, P(−tα/2 ≤ T ≤ tα/2) = 1 − α. Algebraic rearrangement yields P(x̄ − E ≤ μ ≤ x̄ + E) = 1 − α, which is the probability statement underlying the confidence interval. It is critical to interpret this correctly: once data are collected and the interval computed, μ is either inside or outside; the "95 %" refers to the long-run coverage rate of the procedure.

Assumptions Checklist
The t-interval is valid when: (1) the data are a simple random sample from the population; (2) the observations are independent; and (3) the population distribution is approximately normal, or the sample size is large enough (n ≥ 30) for the CLT to ensure approximate normality of x̄. For small samples from skewed populations, consider nonparametric alternatives or bootstrap methods.

Factors Affecting Width & Correct Interpretation

Understanding what makes a confidence interval wider or narrower is essential for study design. Three quantities interact to determine the margin of error E = tα/2 × (s/√n): the confidence level (which determines tα/2), the sample variability s, and the sample size n. Researchers can control the confidence level and, through study design, the sample size; the variability s is a property of the data.

Each vertical bar represents the 95 % t-interval for x̄ = 50 with s = 10 at different sample sizes. As n increases, the interval narrows dramatically because the standard error s/√n decreases and the critical value t* shrinks toward 1.96.
How each factor influences the width of the t-interval
FactorChangeEffect on Interval Width
Confidence level (1 − α)Increase (e.g., 95 % → 99 %)Wider — larger t* is needed to capture more of the distribution
Sample size (n)IncreaseNarrower — s/√n shrinks and t* approaches z*
Sample variability (s)IncreaseWider — more spread in the data inflates the standard error
Common Interpretation Mistake
A 95 % CI does NOT mean "there is a 95 % probability that μ lies in this interval." The true μ is fixed; it either is or is not within the computed interval. The correct interpretation is: "We are 95 % confident that this interval captures μ," meaning that 95 % of intervals constructed by this procedure across many repeated samples would contain the true mean.

Worked Example — Blood Pressure Study

A clinical researcher measures the systolic blood pressure (mm Hg) of a random sample of n = 20 adults from a large population. The sample yields x̄ = 126.4 mm Hg and s = 14.8 mm Hg. She wishes to construct a 95 % confidence interval for the true mean systolic blood pressure μ. Assume the population of blood pressures is approximately normally distributed.

Constructing a 95 % t-Interval for Mean Systolic BP
1
Step 1 — Verify ConditionsThe sample is a simple random sample of n = 20 independent observations. The problem states the population is approximately normal. Since n < 30, this normality assumption matters; if a histogram or normal probability plot were available, we would inspect it. With the normality assumption granted, the t-procedure is appropriate.
2
Step 2 — Identify the Given ValuesSample mean x̄ = 126.4, sample standard deviation s = 14.8, sample size n = 20, confidence level = 95 % (so α = 0.05, α/2 = 0.025).
3
Step 3 — Find the Critical Value t*Degrees of freedom: df = n − 1 = 19. From a t-table or software, t0.025, 19 = 2.093.
t* = 2.093
4
Step 4 — Compute the Standard ErrorSE = s / √n = 14.8 / √20 = 14.8 / 4.472 ≈ 3.310.
SE ≈ 3.310
5
Step 5 — Compute the Margin of ErrorE = t* × SE = 2.093 × 3.310 ≈ 6.928.
E ≈ 6.93
6
Step 6 — Construct the IntervalLower bound = x̄ − E = 126.4 − 6.93 = 119.47. Upper bound = x̄ + E = 126.4 + 6.93 = 133.33.
95 % CI: (119.47, 133.33) mm Hg
7
Step 7 — Interpret the ResultWe are 95 % confident that the true mean systolic blood pressure of the adult population lies between 119.47 and 133.33 mm Hg. If this sampling procedure were repeated many times, approximately 95 % of the resulting intervals would contain the true population mean.

z-Interval vs. t-Interval — Strengths & Limitations

Students often wonder when to use a z-interval versus a t-interval. The decision hinges on a single question: do you know the population standard deviation σ? In biostatistical practice, the answer is almost universally no—σ is unknown and must be estimated by s. The table below compares the two procedures and highlights where each is appropriate.

Side-by-side comparison of z- and t-confidence intervals for a mean
Featurez-Intervalt-Interval
Knowledge of σσ is knownσ is unknown; estimated by s
Reference DistributionStandard normal (z)t-distribution with df = n − 1
Critical Value (95 %)z* = 1.960 (always)t* varies; e.g., 2.093 for df = 19
Interval WidthNarrower for same nWider (heavier tails), narrows with increasing n
Practical UseRare; mostly textbook exercisesDefault for nearly all real research
Robustness to Non-normalityRelies on CLT; moderate robustness for n ≥ 30Same CLT protection; more sensitive at small n
KEY TAKEAWAY
The t-interval is not a "second-class" version of the z-interval—it is the correct procedure whenever σ is estimated from data. Think of it this way: using a z-interval when σ is unknown is like using a ruler you haven't calibrated; the t-interval honestly accounts for the ruler's own measurement error. In biostatistics, virtually every confidence interval for a mean should be a t-interval.

Limitations & Cautions

  • Normality assumption: For very small samples (n < 15) from heavily skewed or outlier-prone populations, the t-interval may provide poor coverage. Always inspect a histogram or Q–Q plot.
  • Independence: The procedure assumes independent observations. Clustered or longitudinal data require more complex methods (e.g., mixed models).
  • Outliers: Both x̄ and s are sensitive to extreme values. A single outlier can dramatically shift the interval. Consider robust alternatives or trimmed means when outliers are present.

Connection to Advanced Methods

The one-sample t-interval is the simplest member of a broad family of t-based inference procedures. Its logic—estimating a standard error, choosing a critical value from the appropriate reference distribution, and constructing an interval as estimate ± margin of error—generalizes directly to more complex settings. Understanding this foundational case prepares you for the multi-sample and regression extensions you will encounter in advanced biostatistics coursework.

How the one-sample t-interval concept extends to advanced methods
One-Sample t-Interval (This Lesson)Advanced Extensions
Estimates μ for one populationTwo-sample t-interval estimates μ₁ − μ₂ (independent groups)
Uses s from a single samplePaired t-interval uses the standard deviation of differences within matched pairs
Assumes normality or large nBootstrap CI makes no distributional assumption; resamples from data
Fixed-sample frequentist approachBayesian credible interval incorporates prior information about μ
Single predictor (none); purely descriptiveCI for a regression coefficient β₁ uses the same t-logic with SE(β̂₁)

Looking forward, every time you see a confidence interval reported in a clinical trial—whether for a mean difference, an adjusted regression coefficient, or a hazard ratio—the same intellectual machinery is at work: a point estimate, a standard error, a reference distribution, and a critical value. Mastering the one-sample t-interval gives you the conceptual blueprint for interpreting all of these.

Practice Problems

PROBLEM 1CONCEPTUAL
Explain why the t-distribution has heavier tails than the standard normal distribution. What practical consequence does this have for the width of a confidence interval when n is small?
PROBLEM 2BASIC CALCULATION
A sample of n = 16 serum cholesterol values (mg/dL) from a normally distributed population yields x̄ = 210 and s = 32. Compute a 95 % confidence interval for the population mean cholesterol level. (Use t0.025, 15 = 2.131.)
PROBLEM 3INTERMEDIATE
A biostatistician wants a 95 % CI for mean hemoglobin (g/dL) with a margin of error no larger than 0.5 g/dL. From a pilot study, s ≈ 1.8 g/dL. Using z* ≈ 1.96 as an approximation for planning purposes, estimate the minimum sample size required. Then explain why the actual required n might be slightly larger.
PROBLEM 4APPLIED
A researcher measures the fasting blood glucose (mg/dL) of n = 12 patients enrolled in a diabetes prevention trial: 98, 102, 115, 107, 92, 111, 99, 105, 120, 95, 108, 113. (a) Compute x̄ and s. (b) Construct a 90 % CI for the mean fasting glucose (t0.05, 11 = 1.796). (c) Is it plausible that the population mean is 100 mg/dL?
PROBLEM 5CRITICAL THINKING
A colleague constructs a 95 % t-interval from a sample of n = 8 reaction times and obtains (1.20, 4.80) seconds. She notices the interval is very wide and proposes switching to a 90 % z-interval to get a narrower result. Critique this approach on both statistical and conceptual grounds.

Summary — Confidence Interval for a Mean (t-Interval)

The t-interval provides a range of plausible values for a population mean μ when the population standard deviation σ is unknown. The formula is x̄ ± tα/2, n−1 × (s/√n), where the critical value tα/2 comes from the t-distribution with df = n − 1. The interval width depends on the confidence level, the sample size n, and the sample variability s.

Key assumptions include random sampling, independence, and approximate normality of the population (or large n via the CLT). The t-distribution's heavier tails relative to the standard normal honestly widen the interval to account for estimating σ with s. As n increases, the t-interval converges to the z-interval, and the same logical framework extends to two-sample tests, paired designs, and regression coefficients in advanced biostatistics.

Varsity Tutors • Biostatistics • CI for a Mean — Compute CI for a mean (t-interval)