Why Power Depends on the Difference Between Two Means
A two-sample Z test compares the means of two independent populations when their variances are known. Its power is not a single number: it depends on the true difference between the population means. A test designed to detect a substantial difference will generally have less power against a small difference, because the sample means are then less likely to cross the rejection threshold.
For planning or interpretation, the key steps are to identify the test's rejection region, find the distribution of the test statistic under the alternative of interest, and calculate the probability that the statistic falls in that region. The sample sizes of the two groups enter separately through the variance of the difference in sample means.
The Statistic and Its Rejection Region
Let \(\bar X_1\) and \(\bar X_2\) be the two sample means. Independence gives the variance of their difference by adding the two variances. The standard error is therefore
Under the null hypothesis \(H_0:\mu_1-\mu_2=0\), \(Z\sim N(0,1)\). The critical values are chosen to give the test its specified significance level \(\alpha\). Write \(\Phi(z)=P(W\le z)\) for the standard normal cumulative distribution function when \(W\sim N(0,1)\), and let \(z_q\) satisfy \(\Phi(z_q)=q\).
| Alternative | Rejection region at level \(\alpha\) |
|---|---|
| \(H_1:\delta>0\) | \(Z>z_{1-\alpha}\) |
| \(H_1:\delta<0\) | \(Z<-z_{1-\alpha}\) |
| \(H_1:\delta\ne 0\) | \(Z<-z_{1-\alpha/2}\) or \(Z>z_{1-\alpha/2}\) |
The rejection region is set using the null distribution and the chosen \(\alpha\). It does not move when evaluating power at an alternative. Power is the probability of rejecting the null when the alternative's parameter values are true; equivalently, it is one minus the Type II error probability at those values.
Distribution Under an Alternative and Power Formulas
Under a specified alternative with difference \(\delta\), the mean difference \(\bar X_1-\bar X_2\) has mean \(\delta\) and variance \(SE^2\). Consequently, the same test statistic used for the rejection rule has a shifted distribution under the alternative:
The quantity \(\lambda\) is the alternative mean difference measured in standard-error units. For a positive alternative difference, it shifts the distribution to the right; a negative difference shifts it to the left. To obtain power, calculate the probability of the null rejection region under this shifted distribution.
For example, the upper-tailed formula follows directly from the rejection event. Under the alternative, write \(Z=\lambda+W\), where \(W\sim N(0,1)\). Then
For a two-sided test, the rejection events are disjoint: \(Z<-z_{1-\alpha/2}\) and \(Z>z_{1-\alpha/2}\). Evaluating each event under \(Z\sim N(\lambda,1)\) gives the sum of the two tail probabilities in the formula. The same reasoning gives the lower-tailed expression.
Worked Power Calculations
Worked Example: Power for an Upper-Tailed Test
A hypothetical study compares mean processing times for two independent normal populations. The known standard deviations are \(\sigma_1=9\) and \(\sigma_2=12\) seconds, with sample sizes \(n_1=36\) and \(n_2=64\). Test \(H_0:\delta=0\) against \(H_1:\delta>0\) at \(\alpha=0.05\). Find the power when the true difference is \(\delta=4\) seconds.
Method. Use the upper-tailed Z rejection region and evaluate it under the specified alternative. The two sample sizes and variances must be used in their respective terms:
The alternative shift is \(\lambda=4/\sqrt{4.5}=1.8856\). At level \(0.05\), \(z_{0.95}=1.6449\), so reject \(H_0\) when \(Z>1.6449\). Thus
The power is 0.5951, or about 59.51%. A common error is to report \(\Phi(-0.2408)\approx0.4049\) as the power. That is the probability of falling below the upper-tail cutoff, not the probability of rejecting; the rejection probability is its complement. The result is consistent with a right-shifted alternative distribution, for which rejection is more likely than non-rejection.
Worked Example: Power for a Two-Sided Test
A hypothetical comparison of two independent normal measurement populations has known standard deviations \(\sigma_1=10\) and \(\sigma_2=14\), and sample sizes \(n_1=25\) and \(n_2=49\). A two-sided test of \(H_0:\delta=0\) has \(\alpha=0.05\). Find its power when the true difference is \(\delta=7\).
Method. Find the standard error and alternative shift, then add the probabilities of both rejection tails. First,
The two-sided critical value is \(z_{0.975}=1.9600\), so the rejection region is \(Z<-1.9600\) or \(Z>1.9600\). Under the alternative, \(Z\sim N(2.4749,1)\), giving
The power is 0.6967. The lower-tail contribution rounds to 0.0000 to four decimals, but it is included in the formula. A frequent mistake is to compute only the upper tail without first recognizing that the test is two-sided. Here the omitted tail is tiny, but for other alternatives or sample sizes it need not be.
Worked Example: Power for a Lower-Tailed Test
A hypothetical experiment compares independent normal populations with known standard deviations \(\sigma_1=5\) and \(\sigma_2=10\). The sample sizes are \(n_1=25\) and \(n_2=100\). Test \(H_0:\delta=0\) against \(H_1:\delta<0\) at \(\alpha=0.10\). Calculate the power when \(\delta=-3\).
Method. The lower-tailed rejection boundary is the negative critical value. Calculate the standard error using the separate variances and sample sizes:
Since \(z_{0.90}=1.2816\), reject when \(Z<-1.2816\). Under the alternative, the probability of rejection is
The power is 0.7995. The sign of the alternative matters: for a negative \(\delta\), the distribution shifts toward the lower-tail rejection region. A common error is to use a positive critical boundary or to subtract the negative shift as if it were positive; keeping the event \(Z<-1.2816\) visible prevents both mistakes.
Interpreting Power and Avoiding Errors
For fixed known variances and sample sizes, increasing \(|\delta|\) increases \(|\lambda|\), moving the alternative distribution farther from the null center. Power therefore rises in the direction of the chosen one-sided alternative. Increasing either sample size reduces its contribution \(\sigma_j^2/n_j\) to the standard error, which generally makes a fixed nonzero difference easier to detect. In a two-sided test, power can also be contributed by the tail opposite the direction of the true difference, although that contribution may be very small.
The formulas use the variances of the two sample means, not a pooled variance. In particular, the standard error is \(\sqrt{\sigma_1^2/n_1+\sigma_2^2/n_2}\); it is not obtained by adding the standard deviations, nor by treating \(n_1\) and \(n_2\) as interchangeable when their variances differ. The known-variance assumption is important: if the variances are estimated from the samples, this is not the known-variance Z procedure and these standard normal power formulas do not apply as written.
Power is always tied to a specified alternative value. For a one-sided test, the direction in the alternative must agree with the rejection tail. For a two-sided test, both rejection tails must be counted. Keep the rejection event fixed from the null test, shift the statistic's distribution to the alternative mean \(\lambda\), and then evaluate the probability.
Check Your Understanding
For each problem, use the stated known-variance normal model and round the final power to four decimals.
- A one-sided upper test has \(\alpha=0.05\), \(\sigma_1=6\), \(\sigma_2=8\), \(n_1=16\), \(n_2=25\), and true difference \(\delta=3\). What is its power? (Answer: 0.3909)
- A two-sided test has \(\alpha=0.10\), \(\sigma_1=4\), \(\sigma_2=5\), \(n_1=16\), \(n_2=25\), and true difference \(\delta=-2\). What is its power, including both tails? (Answer: 0.4099)
- A lower-tailed test has \(\alpha=0.05\), \(\sigma_1=3\), \(\sigma_2=4\), \(n_1=9\), \(n_2=16\), and true difference \(\delta=-2\). Find its power. (Answer: 0.4088)
- A one-sided upper test has \(\alpha=0.01\), \(\sigma_1=12\), \(\sigma_2=9\), \(n_1=36\), \(n_2=81\), and true difference \(\delta=5\). Find the standard error and power. (Answer: \(SE=\sqrt{5}=2.2361\); power \(=0.4640\))
- A two-sided test has \(\alpha=0.05\), any positive sample sizes, and any known population standard deviations. If the true difference is exactly \(\delta=0\), what is its power under this model? (Answer: 0.0500)