Single mean
Determines the sample size required to test whether a population mean differs from a specified hypothesized or reference mean, given a chosen significance level and statistical power.
Key takeaways
- What is calculated: Find the smallest integer n at which the exact power of the one-sample t-test reaches the target.
- Quantities you must supply: Reference mean; Anticipated mean; Standard deviation; Significance level; Power.
- Type of calculation: Power-based: it answers how much data is needed to detect a stated effect. Power 0.80 at α = 0.05 is the usual target; confirmatory studies use 0.90.
- Calculation routes: 2 are available for this design; the one selected determines the formula, the quantities requested and the result.
Methods available for Single mean
- Normal approximation (z-based) Closed-form sample size treating the population standard deviation as known. Chosen for transparency and comparability: the formula is the one tabulated in most textbooks, so a reviewer recomputing the figure will reproduce it exactly.
- Noncentral t (exact, one-sample t-test) Iterative solution using the exact distribution of the one-sample t statistic under the alternative. Chosen because it accounts for the additional uncertainty from estimating σ, which the normal approximation ignores. This is not merely a small-sample correction: the normal formula approximates this calculation at every n.
When to use
Use when the primary objective is to determine whether a population mean differs from a specified reference or hypothesized value with adequate statistical power.
Sample size
Awaiting inputs
—
Set the parameters and calculate.
Methodology — One-sample mean — noncentral t (exact)
Formula used One-sample mean — noncentral t (exact)
- Two-sided alternative selected: α is split between both tails, so the larger quantile is used and the requirement rises
where —
- μ₀
- Hypothesised reference mean under H₀. Any value on the outcome scale
- μ₁
- Anticipated mean under the alternative. Must differ from μ₀
- σ
- Population standard deviation of the outcome. σ > 0
- α
- Probability of rejecting a true null hypothesis (Type I error). 0.0001 – 0.5; conventionally 0.05, or 0.025 one-sided for regulatory non-inferiority
- 1 − β
- Probability of rejecting the null hypothesis when the specified alternative is true. 0.50 – 0.9999; conventionally 0.80 or 0.90
- ℓ
- Expected proportion of enrolled units lost before analysis. 0 – 0.95
Formulas for the 2 methods
| Calculation method | Formula |
|---|---|
| Normal approximation (z-based) | |
| Noncentral t (exact, one-sample t-test) |
How this method works
When σ is estimated from the sample, the test statistic (x̄ − μ₀)/(s/√n) does not follow a normal distribution under the alternative; it follows a noncentral t distribution with n − 1 degrees of freedom and noncentrality λ = δ√n/σ. Power is computed from that distribution and n is found by search.
The test is two-sided: H₀: μ = μ₀ against H₁: μ ≠ μ₀. α is split between the two tails, so the α-quantile is z₁₋α/₂.
Selected method — noncentral t. When the population standard deviation is unknown and the planned analysis is a one-sample t-test, the test statistic follows a noncentral t distribution under the alternative, with noncentrality λ = δ√n/σ on n − 1 degrees of freedom. The smallest n attaining the target power is found by iteration.
This is the exact calculation and is the appropriate choice whenever σ is estimated from the data. It is not merely a small-sample correction: the normal formula is an approximation to it at every n, and the two converge as n grows.
Null hypothesis. H₀: μ = μ₀
Alternative hypothesis. Two-sided H₁: μ ≠ μ₀. One-sided H₁: μ > μ₀ or μ < μ₀.
Calculation procedure
- State , and , giving the standardised effect .
- For a candidate , form the noncentrality ; the test statistic follows a noncentral t on degrees of freedom.
- Compute exact power as .
- Search upward for the smallest whose power reaches the target.
- Round up, then inflate for dropout. This is the correct calculation whenever is estimated rather than known.
Exact or approximate
Exact, to the numerical tolerance of the distribution routines.
The formula shown always matches what was computed: when a one-sided test is selected the rendered quantile changes from z1−α/2 to z1−α, and where several methods exist, the formula follows the method selected in the calculator.
Advantages & limitations
Advantages
- Correct when σ is estimated, which is the normal case in practice.
- Accounts for degrees of freedom explicitly.
- Agrees with G*Power and the R pwr package.
Limitations
- No closed form; the figure cannot be reproduced by hand.
- More sensitive to the normality assumption than the large-sample approximation.
Assumptions
- Observations are independent and identically distributed.
- The outcome is normally distributed — this matters more here than for the normal approximation, since the t distribution depends on it.
- σ is unknown and estimated by the sample standard deviation.
- Simple random sampling with no clustering.
Applicable adjustments
Supports dropout inflation. Finite population correction and clustering as for the z-based method.
Conclusion
This is the defensible figure for a protocol whose analysis is a one-sample t-test. Report it together with σ, the difference sought, α and power, since the result is conditional on all four.
References
- Guenther WC. Sample size formulas for normal theory t tests. The American Statistician. 1981;35(4):243–244. Link
- Chow S-C, Shao J, Wang H, Lokhnygina Y. Sample Size Calculations in Clinical Research. 3rd ed. Boca Raton: Chapman & Hall/CRC; 2017.
- Rosner B. Fundamentals of Biostatistics. 8th ed. Boston: Cengage; 2015.