Means: One and Two Groups
Calculate the minimum sample size needed for a one-sample z-test of a population mean when the population standard deviation is known. Specify the null mean, anticipated mean, known standard deviation, significance level, target power, and test direction. The calculation uses the exact normal-distribution power for the selected alternative and rounds up to the smallest integer sample size achieving the requested power.
This calculator implements the one-sample z-test for a population mean when the population standard deviation is known. This is testing whether a population mean is greater than, less than, or not equal to a specified reference value and explicitly assumes that the population standard deviation is known.
For a sample of size N, the one-sample z statistic is based on the known standard error σ/√N. Under the null hypothesis, the statistic has a standard normal distribution.
The calculator works in the planning direction: the anticipated population mean μ₁ is specified along with μ₀, σ, α, and the desired power. The mean difference used for the calculation is δ = μ₁ − μ₀.
For a two-sided test, the rejection region uses the standard-normal critical value z1−α/2. For a one-sided test, the corresponding critical value is z1−α. For each candidate integer N, the calculator evaluates the exact normal-distribution power under the anticipated alternative mean and selects the first N for which power is at least the requested target.
Because sample size must be an integer, the final result is rounded upward only in the sense of selecting the first integer that achieves the requested power. The achieved power is then reported so the user can see the actual power associated with that integer sample size.
the relevant methodological literature specifies four principal assumptions for the one-sample z-test: the outcome is continuous, the data follow a normal distribution, the sample is a simple random sample from its population, and the population standard deviation is known. This calculator does not estimate σ from the sample.
Source example: Chow, Shao, Wang, and Lokhnygina (2018), as reproduced and validated in the this method One-Sample Z-Tests documentation.
Alternative: Two-sided
μ₀: 1.5
μ₁: 2.0
σ: 1.0
α: 0.05
Target power: 0.80
Expected minimum sample size: 32
Achieved power at N = 32: 0.80743
With these inputs, the absolute standardized effect is 0.5. The implementation evaluates integer sample sizes sequentially: N = 31 gives power below 0.80, while N = 32 gives power 0.80743. Therefore the required sample size is 32. This reproduces the this method validation example.
the software, LLC. (2023). this method Sample Size Software: One-Sample Z-Tests, Chapter 414. the software, LLC. the relevant methodological literature defines the one-sample z-test, its known-standard-deviation assumption, power calculation, and sample-size examples.
Official this method One-Sample Z-Tests documentation
Chow, S.C., Shao, J., Wang, H., & Lokhnygina, Y. (2018). Sample Size Calculations in Clinical Research, 3rd Edition. Taylor & Francis/CRC Press. Note that the book's pages 45–46 as the source for its two-sided one-sample z-test validation example with μ₀ = 1.5, μ₁ = 2.0, σ = 1.0, α = 0.05, and 80% power.
. The platform provides sample-size and power procedures covering means and other common clinical-trial endpoints. This calculator uses the standard known-variance one-sample normal framework corresponding to the documented one-sample z-test.