Power Curve and Sample Size

Learn how statistical power curves change with sample size through formulas and interactive visualization.

Hypothesis TestingStatistical PowerBeta ErrorSample Size

What Is Statistical Power?

Statistical power is the probability that a test correctly rejects the null hypothesis when the alternative is true—that is, the chance of detecting an actual effect. It answers the question:

“If there truly is a difference, how likely is the test to detect it?”

A high power means a low risk of Type II error (false negative). Power depends on four factors:

  • Significance level α\alpha
  • Effect size δ=μAμ0\delta = \mu_A - \mu_0
  • Population standard deviation σ\sigma
  • Sample size nn

This article focuses on how increasing the sample size nn improves power and reshapes the power curve.


The Power Function: A Step-by-Step Derivation

We consider a one-sided ZZ-test with the following setup:

  • Null hypothesis: μ=μ0\mu = \mu_0
  • Alternative hypothesis: μ>μ0\mu > \mu_0
  • Known standard deviation σ\sigma
  • Sample mean XˉN(μ,σ2/n)\bar{X} \sim \mathcal{N}(\mu, \sigma^2 / n)

1. The Test Statistic

The standardized test statistic is:

Z=Xˉμ0σ/nN(0,1)under H0Z = \frac{\bar{X} - \mu_0}{\sigma / \sqrt{n}} \sim \mathcal{N}(0, 1) \quad \text{under } H_0

2. Rejection Region

We reject the null hypothesis if:

Z>zαZ > z_\alpha

where zαz_\alpha is the upper α\alpha quantile of the standard normal distribution, i.e.,

P(Z>zα)=α\mathbb{P}(Z > z_\alpha) = \alpha

Noncentral Distribution Under the Alternative

Now suppose the alternative is true, i.e., μ=μA\mu = \mu_A. Then:

Z=Xˉμ0σ/n=(XˉμA)+(μAμ0)σ/n=XˉμAσ/nN(0,1)+δnσZ = \frac{\bar{X} - \mu_0}{\sigma / \sqrt{n}} = \frac{(\bar{X} - \mu_A) + (\mu_A - \mu_0)}{\sigma / \sqrt{n}} = \underbrace{\frac{\bar{X} - \mu_A}{\sigma / \sqrt{n}}}_{\sim \mathcal{N}(0, 1)} + \frac{\delta \sqrt{n}}{\sigma}

So, under the alternative hypothesis:

ZN(δnσ,  1)Z \sim \mathcal{N}\left( \frac{\delta \sqrt{n}}{\sigma},\; 1 \right)

The mean shift is called the noncentrality parameter:

λ=δnσ\lambda = \frac{\delta \sqrt{n}}{\sigma}

This tells us the test statistic follows a noncentral normal distribution when the null is false.


Power Function

Power is the probability that this noncentral distribution falls into the rejection region:

Power(n)=P(Z>zαμ=μA)=1Φ(zαδnσ)\text{Power}(n) = \mathbb{P}(Z > z_\alpha \mid \mu = \mu_A) = 1 - \Phi\left(z_\alpha - \frac{\delta \sqrt{n}}{\sigma} \right)

where Φ()\Phi(\cdot) is the standard normal cumulative distribution function.


Example: How Power Changes with Sample Size

Let’s fix parameters as follows:

  • Effect size δ=0.5\delta = 0.5
  • Standard deviation σ=1\sigma = 1
  • Significance level α=0.05\alpha = 0.05

Then compute power for different nn:

Sample Size nnPower
100.158
300.385
500.553
1000.809

As nn increases, the noncentral distribution shifts right, increasing the chance it exceeds zαz_\alpha, and hence increasing power.

Key Takeaways

  • Power increases as sample size nn increases.
  • Under the alternative, the test statistic shifts right → higher chance to reject H0H_0.
  • The shift is quantified by the noncentrality parameter λ=δnσ\lambda = \frac{\delta \sqrt{n}}{\sigma}.
  • The power function shows how likely we are to detect a true effect.
  • Visualizing power curves helps in planning sample size effectively.
← Back to Encyclopedia