## Sample size to test mean

Use this calculator to find the minimum sample size required to test mean $\mu$.

Sample Size to test mean | ||
---|---|---|

Confidence Level ($1-\alpha$) | ||

Power ($1-\beta$) | ||

Mean under H0 : ($\mu_0$) | ||

Mean under H1 : ($\mu_1$) | ||

Standard Deviation ($\sigma$) | ||

Results | ||

Effect Size ($ES$) | ||

Z value: $Z_{1-\alpha/2}$ | ||

Z value: $Z_{1-\beta}$ | ||

Required Sample Size : ($n$) | ||

## Sample size to test mean

The $ES$ is defined as $$ ES=\frac{|\mu_1-\mu_0|}{\sigma} $$

where $\mu_0$ is the mean under $H_0$ and $\mu_1$ is the mean under $H_1$, $\sigma$ is the standard deviation.

The formula for determining the sample size required to ensure that the test has a specified power is
`$$ n =\bigg(\frac{Z_{1-\alpha/2}+Z_{1-\beta}}{ES}\bigg)^2 $$`

where

- $\alpha$ is the selected level of significance,
- $1-\beta$ is the selected power and
- $ES$ is the effect size.