Statistical Calculators › Variances and Confidence Intervals › Sample Size for a Prediction Interval
← All Calculators

Variances and Confidence Intervals

Sample Size for a Prediction Interval

Determine the minimum sample size required for a normal-distribution prediction interval to achieve a specified half-width when predicting a future observation or the mean of a future sample. The calculation accounts for both future-observation variability and uncertainty in the estimated population mean.

Prediction Interval Design

Specify the prediction interval, variability, future sample size, and desired precision.
k = 1 gives a prediction interval for one future observation. k > 1 gives a prediction interval for the mean of k future observations.

Required Sample Size

The result is the smallest integer n for which the prediction-interval half-width is no greater than the specified target.
Enter the design parameters and click Calculate Sample Size.

Methodology

This calculator uses the normal-distribution prediction-interval framework described by Meeker, Hahn, and Escobar. For an initial sample of size n from a normal population with unknown mean and known or planned standard deviation σ, the prediction interval for the mean of k future observations has half-width

H(n) = t1−α/2, n−1 × σ × √(1/k + 1/n)

for a two-sided interval with confidence level 1 − α. The required sample size is the smallest integer n for which H(n) is less than or equal to the specified half-width.

For a one-sided prediction bound, the two-sided critical probability is replaced by the one-sided probability:

H(n) = t1−α, n−1 × σ × √(1/k + 1/n)

The expression contains two sources of uncertainty. The term 1/k represents variation in the future sample mean, while 1/n represents uncertainty arising from estimating the population mean from the initial sample. When k = 1, the calculation is the prediction interval for a single future observation.

Important lower limit on achievable precision

Unlike an ordinary confidence interval for a population mean, a prediction interval does not shrink to zero width as the initial sample size becomes arbitrarily large. As n approaches infinity, its half-width approaches the future-sample variability term:

H(∞) = z × σ / √k

where z is the corresponding normal critical value. Therefore, a requested half-width at or below this limiting value cannot be achieved by increasing the initial sample size alone.

Assumptions

Worked Example

Suppose a two-sided 95% prediction interval is required for one future observation. Assume a planning standard deviation of 10 units and a maximum acceptable prediction-interval half-width of 20 units.

Confidence = 95%
σ = 10
k = 1
Desired half-width = 20

Smallest solution: n = 86

At n = 86, the calculation uses t0.975,85 = 1.9882679 and gives a half-width of approximately 19.99794. At n = 85 the half-width remains above 20, so 86 is the minimum integer sample size satisfying the requirement.

References

Meeker, W. Q., Hahn, G. J., & Escobar, L. A. (2017). Statistical Intervals: A Guide for Practitioners and Researchers, 2nd ed. Wiley. Chapter 10, “Sample Size Requirements for Prediction Intervals,” including Section 10.2, “Sample Size for a Normal Distribution Prediction Interval.”

Meeker, W. Q., & Hahn, G. J. (1982). “Sample Sizes for Prediction Intervals.” Journal of Quality Technology, 14(4), 201–206. The paper addresses sample-size requirements for prediction intervals for a single future observation and for the mean of a future sample from a normal population.

NCSS. NCSS Statistical Software. NCSS documentation describes prediction intervals for individual predicted responses and distinguishes them from intervals for the mean response. The normal-theory prediction-interval framework uses Student's t distribution under the usual normal-error assumptions.

Meeker, Hahn & Escobar — Chapter 10  ·  Meeker & Hahn (1982)  ·  NCSS Regression Documentation