Tutorials › Statistical Theory III - Theories of Inference, Multivariate Methods, and Contingency Tables › Exact Power for One- and Two-Sided t Tests

Simultaneous Inference and Power · Tutorial 286 of 972

Exact Power for One- and Two-Sided t Tests

Use the noncentral t distribution to find the exact rejection probability under a specified alternative for one- and two-sided tests.

Advanced 10 min read

What You'll Learn

  • Set up the noncentrality parameter for a t test of a contrast.
  • Calculate upper-tail, lower-tail, and two-sided power from noncentral t probabilities.
  • Express power as an expectation over the chi-square variation in the estimated variance.
  • Work through finite-sample calculations for specified alternatives and degrees of freedom.
  • Explain why degrees of freedom affect both the rejection cutoff and the power distribution.
  • Avoid common errors involving the sign of the alternative and the use of a central t distribution.

From a Test Statistic to Power

A t test rejects when its observed statistic falls in a specified tail or tails of a central t distribution. To calculate power, the probability of rejection when a particular alternative is true, use the distribution of that same statistic under the alternative. In the normal-theory setting, this is a noncentral t distribution. The calculation is finite-sample: it uses the actual residual degrees of freedom rather than replacing the t distribution with a normal approximation.

The relevant alternative must be specified quantitatively. For a contrast, for example, power depends on how far its true value is from the null value, measured relative to the true standard deviation of its estimate. The direction of the difference matters for a one-sided test; its magnitude matters for a two-sided test.

Definition: Let \(Z\sim N(0,1)\) and \(U\sim\chi^2_\nu\) be independent, where \(\nu>0\). The random variable \(T=(Z+\delta)/\sqrt{U/\nu}\) has a noncentral t distribution with \(\nu\) degrees of freedom and noncentrality parameter \(\delta\). Write its cumulative distribution function as \(F_{\nu,\delta}(t)=P(T\le t)\). When \(\delta=0\), this is the central t distribution.

For a normal-theory test of a contrast, suppose the estimate \(\hat\theta\) has mean \(\theta\) and variance \(\sigma^2 q\), with \(q>0\). The standard error is estimated using an independent residual variance estimate \(MSE\), with \(\nu\) residual degrees of freedom and \(\nu MSE/\sigma^2\sim\chi^2_\nu\). Testing \(H_0:\theta=\theta_0\) uses \(T=(\hat\theta-\theta_0)/\sqrt{MSEq}\). Under a specified alternative \(\theta\), its noncentrality parameter is \(\delta=(\theta-\theta_0)/(\sigma\sqrt q)\). These distributional conditions hold, for example, for a normal linear model when the contrast estimate is normal and independent of the residual sum of squares.

Let \(t_{p,\nu}\) denote the \(p\)-quantile of the central t distribution with \(\nu\) degrees of freedom. A test at level \(\alpha\) uses these central-t quantiles to set its rejection region. Once that region is fixed, its probability under the alternative is computed using \(F_{\nu,\delta}\).

Exact Power Formulas

Theorem: Under the noncentral t model above, the level-\(\alpha\) upper-tailed test rejects when \(T>t_{1-\alpha,\nu}\), and its power at noncentrality \(\delta\) is \(\;1-F_{\nu,\delta}(t_{1-\alpha,\nu})\). The lower-tailed test rejects when \(T<-t_{1-\alpha,\nu}\), and its power is \(\;F_{\nu,\delta}(-t_{1-\alpha,\nu})\). The two-sided test rejects when \(|T|>t_{1-\alpha/2,\nu}\), and its power is \(\;F_{\nu,\delta}(-t_{1-\alpha/2,\nu})+1-F_{\nu,\delta}(t_{1-\alpha/2,\nu})\).

Derivation. Under the specified alternative, \(T\) has cumulative distribution function \(F_{\nu,\delta}\). For the upper-tailed test, the rejection event is \(T>c\), where \(c=t_{1-\alpha,\nu}\), so its probability is \(1-P(T\le c)=1-F_{\nu,\delta}(c)\). For the lower-tailed test the event is \(T<-c\), giving probability \(F_{\nu,\delta}(-c)\). For the two-sided test, the events \(T<-c_2\) and \(T>c_2\), with \(c_2=t_{1-\alpha/2,\nu}\), are disjoint. Adding their probabilities gives the stated expression. The quantiles come from the null distribution because they determine the test; the cdf in the power calculation comes from the alternative distribution. \(\square\)

The noncentral t cdf can also be represented as an expectation that makes the role of variance estimation explicit. Since \(T=(Z+\delta)/\sqrt{U/\nu}\), conditioning on \(U\) gives

$$ F_{\nu,\delta}(c) = \int_0^\infty \Phi\!\left(c\sqrt{u/\nu}-\delta\right) f_{\chi^2_\nu}(u)\,du, $$

where \(\Phi\) is the standard normal cdf and \(f_{\chi^2_\nu}\) is the chi-square density with \(\nu\) degrees of freedom. Indeed, for a fixed value \(U=u\), the event \(T\le c\) is equivalent to \(Z\le c\sqrt{u/\nu}-\delta\). Its conditional probability is the integrand’s normal cdf factor. Integrating that conditional probability against the density of \(U\) gives the displayed formula. This representation also explains why replacing the random denominator with a constant generally does not give exact finite-sample power.

Worked Example: Upper-Tailed One-Sample Test

Suppose \(X_1,\ldots,X_{10}\) are independent \(N(\mu,\sigma^2)\) observations with known \(\sigma=2\). Test \(H_0:\mu=0\) against \(H_1:\mu>0\) at level \(\alpha=0.05\). Find the power when the specified alternative is \(\mu=1\).

The standard error of the sample mean is estimated by \(S/\sqrt{10}\), and the residual degrees of freedom are \(\nu=10-1=9\). The noncentrality parameter under \(\mu=1\) is \(\delta=(1-0)/(2/\sqrt{10})=\sqrt{10}/2\approx1.581\). The upper-tail critical value is \(t_{0.95,9}\approx1.833\).

Therefore the exact power is \(1-F_{9,\sqrt{10}/2}(t_{0.95,9})\), or approximately \(1-F_{9,1.581}(1.833)\). Evaluating the noncentral t tail gives power of about \(0.39\). This is the probability of rejecting the null when the true mean is 1, not the probability that the null hypothesis is true.

Worked Example: Two-Sided Contrast Test

Suppose a contrast estimate has true standard deviation \(\sigma\sqrt q=0.5\), and its estimate is tested against \(H_0:\theta=0\) using a two-sided t test with \(\nu=12\) residual degrees of freedom and \(\alpha=0.05\). Calculate power at the specified alternative \(\theta=0.75\).

The alternative gives \(\delta=(0.75-0)/0.5=1.5\). The two-sided critical value is \(t_{0.975,12}\approx2.179\). Thus the exact power is \(F_{12,1.5}(-2.179)+1-F_{12,1.5}(2.179)\).

The first term is the probability of a rejection in the lower tail even though the alternative is positive; the second is the probability of rejection in the upper tail. Both belong in a two-sided power calculation. Evaluating the two noncentral t tails gives power of approximately \(0.30\) (about \(0.29\) to \(0.30\), depending on rounding of the critical value).

Alternative Direction and Degrees of Freedom

For a lower-tailed test, the alternative should put the noncentrality in the negative direction. For instance, in the contrast setup above, if \(\theta-\theta_0<0\), then \(\delta<0\). The lower-tail formula \(F_{\nu,\delta}(-t_{1-\alpha,\nu})\) then gives the probability of rejection in the direction specified by the test. A positive alternative paired with a lower-tailed rejection rule can have low power; changing the sign of \(\delta\) without changing the rule would answer a different question.

Degrees of freedom affect power in two places: they determine the critical value and the distribution of the random denominator. The critical value is larger for many small-\(\nu\) tests at the same nominal level, while the denominator is also more variable. Consequently, comparing powers across degrees of freedom requires using each degree of freedom’s own critical value and noncentral t distribution. There is no valid exact comparison obtained by changing only the critical value or only the cdf.

Worked Example: Comparing Two Residual Degrees of Freedom

Consider two two-sided tests, each at \(\alpha=0.05\) and each evaluated at the same positive noncentrality \(\delta=1.2\). Compare the exact power expressions for \(\nu=5\) and \(\nu=30\).

For \(\nu=5\), the critical value is \(t_{0.975,5}\approx2.571\), so the power is \(F_{5,1.2}(-2.571)+1-F_{5,1.2}(2.571)\).

For \(\nu=30\), the critical value is \(t_{0.975,30}\approx2.042\), so the power is \(F_{30,1.2}(-2.042)+1-F_{30,1.2}(2.042)\).

The smaller-\(\nu\) test has the more extreme critical value, and its denominator has greater sampling variability. Both changes are reflected in its noncentral t tails. To obtain the powers, evaluate each expression with its corresponding degrees of freedom; using \(2.042\) with \(F_{5,1.2}\), for example, would not calculate the level-\(0.05\) test for \(\nu=5\). The comparison holds \(\delta\) fixed to isolate the distributional role of degrees of freedom; in a design comparison, the alternative may also change \(\delta\).

Why the Noncentrality Parameter Matters

The parameter \(\delta=(\theta-\theta_0)/(\sigma\sqrt q)\) is the alternative’s standardized distance from the null. It combines the specified effect with the true variability and the contrast’s design variance factor. For a one-sample mean, \(q=1/n\), so \(\delta=\sqrt n(\mu-\mu_0)/\sigma\). A larger sample size increases the noncentrality when the effect and \(\sigma\) stay fixed. In a contrast test, \(q\) depends on the contrast and design, so two alternatives with the same raw difference can have different power.

For a two-sided test, power is symmetric in \(\delta\): changing the sign of the alternative exchanges the lower and upper rejection tails. More generally, for fixed \(\nu\) and critical value \(c>0\), two-sided power increases as \(|\delta|\) increases. To see this, condition on \(U\) and write \(a=c\sqrt{U/\nu}>0\). Given \(U\), the probability of rejection is \(\Phi(-a-\delta)+1-\Phi(a-\delta)\). For \(\delta\ge0\), its derivative with respect to \(\delta\) is \(\phi(a-\delta)-\phi(a+\delta)\ge0\), since \(|a-\delta|\le a+\delta\) and the standard normal density decreases as the absolute value of its argument increases. Averaging over \(U\) preserves this monotonicity. Symmetry follows by replacing \(Z\) with \(-Z\). \(\square\)

Common Mistakes

  • Using the central t distribution under the alternative. The central t distribution supplies the null critical value. Under a nonzero alternative, the statistic has a noncentral t distribution, so power must use \(F_{\nu,\delta}\).
  • Using the observed standard error to define the noncentrality. The noncentrality uses the true standard deviation \(\sigma\sqrt q\), not the random observed value \(\sqrt{MSEq}\).
  • Counting only one tail in a two-sided test. A two-sided test rejects in either tail, so both probabilities must be added.
  • Ignoring the direction of a one-sided alternative. The sign of \(\delta\) must agree with the alternative and the rejection tail.
  • Changing degrees of freedom but retaining the old critical value. The test’s critical value and its noncentral t distribution must both use the correct residual degrees of freedom.
Key takeaway: Exact t-test power is the alternative probability of the test’s rejection region. Set the critical value from the central t distribution, compute the noncentrality from the specified alternative and true standard deviation, and evaluate the corresponding noncentral t tail or tails.

Check Your Understanding

Use the rejection region and noncentral t distribution to answer each question.

  1. For an upper-tailed test with level \(\alpha\), degrees of freedom \(\nu\), and noncentrality \(\delta\), write the exact power formula.
  2. Why does a two-sided power formula require two noncentral t tail probabilities?
  3. A contrast has null value 2, specified alternative value 1, and true standard deviation \(0.4\). What is its noncentrality parameter?
  4. When residual degrees of freedom change, which two parts of the exact power calculation must be updated?
  5. Explain why using a central t cdf to calculate power under a nonzero alternative is incorrect.
Clinical Biostats