Abstract

In introductory statistics texts, the power of the test of a one-sample mean when the variance is known is widely discussed. However, when the variance is unknown, the power of the Student's 𝑡-test is seldom mentioned. In this note, a general methodology for obtaining inference concerning a scalar parameter of interest of any exponential family model is proposed. The method is then applied to the one-sample mean problem with unknown variance to obtain a (1𝛾)100% confidence interval for the power of the Student's 𝑡-test that detects the difference (𝜇𝜇0). The calculations require only the density and the cumulative distribution functions of the standard normal distribution. In addition, the methodology presented can also be applied to determine the required sample size when the effect size and the power of a size 𝛼 test of mean are given.

1. Introduction

Let (𝑥1,,𝑥𝑛) be a random sample from a normal distribution with mean 𝜇 and variance 𝜎2. As presented in any introductory statistics text, such as Mandenhall et al. [1, page 425], a (1𝛾)100% confidence interval for 𝜎2 is𝐿𝜎2,𝑈𝜎2=(𝑛1)𝑠2𝜒2𝑛1,1𝛾/2,(𝑛1)𝑠2𝜒2𝑛1,𝛾/2,(1.1) where 𝑥𝑥=𝑖/𝑛, 𝑠2=(𝑥𝑖𝑥)2/(𝑛1), and 𝜒2𝜈,𝛿 is the 100𝛿th percentile of the 𝜒2 distribution with 𝜈 degrees of freedom. Moreover, for testing𝐻0𝜇=𝜇0versus𝐻𝑎𝜇=𝜇0+𝑘𝜎𝑘>0,(1.2) the null hypothesis will be rejected at significance level 𝛼 if𝑥𝜇0𝑠/𝑛>𝑡𝑛1,1𝛼,(1.3) where 𝑡𝜈,𝛿 is the 100𝛿th percentile of the Student's 𝑡 distribution with 𝜈 degrees of freedom. Although the power of this test is rarely discussed in introductory statistics texts, Lehmann [2] proved that the probability of committing Type II error of a size 𝛼 test with the hypotheses stated in (1.2) is𝛽=𝐺𝑛1,𝑘𝑛𝑡𝑛1,1𝛼,(1.4) where 𝑘=(𝜇𝜇0)/𝜎 is the effect size and 𝐺𝜈,𝜆() is the cumulative distribution function of the noncentral 𝑡 distribution with 𝜈 degrees of freedom and noncentrality 𝜆. Note that the calculation of 𝛽 involves the unknown 𝜎. A naive point estimate of 𝛽 iŝ𝛽=𝐺𝑛1,̂𝑘𝑛𝑡𝑛1,1𝛼,(1.5) where ̂𝑘=(𝑥𝜇0)/𝑠. Thus, the corresponding point estimate of the power of the size 𝛼 test that detects the difference (𝜇𝜇0) is ̂𝛽1.

In Section 2, a general methodology is proposed for obtaining inference concerning a scalar parameter of interest of an exponential family model. Applying the general methodology to the one-sample mean problem with unknown variance, a (1𝛾)100% confidence interval for 1𝛽 is derived. This interval estimate will depend only on the evaluation of the density and the cumulative distribution functions of the standard normal distribution. The methodology can also be used to determine the required sample size when the effect size and the power of a size 𝛼 test are fixed. Numerical examples are presented in Section 3 to illustrate the accuracy of the proposed method. Finally, some concluding remarks are given in Section 4.

2. Confidence Interval for the Power of the Test and Sample Size Calculation

From (1.1), for a given (𝜇𝜇0) value, a (1𝛾)100% confidence interval for (𝜇𝜇0)𝑛/𝜎 is𝜇𝜇0𝑛𝑈𝜎2,𝜇𝜇0𝑛𝐿𝜎2.(2.1) Hence, from (1.4), the corresponding confidence interval for 𝛽 is𝐿𝛽,𝑈𝛽=𝐺𝑛1,(𝜇𝜇0)𝑛/𝑈𝜎2𝑡𝑛1,1𝛼,𝐺𝑛1,(𝜇𝜇0)𝑛/𝐿𝜎2𝑡𝑛1,1𝛼.(2.2) Finally, a (1𝛾)100% confidence interval for the power of a size 𝛼 test that detects the difference (𝜇𝜇0) is1𝑈𝛽,1𝐿𝛽.(2.3)

Evaluating (2.3) requires the cumulative distribution function of the noncentral 𝑡 distribution, which is generally not discussed in introductory statistics texts. In statistics literature, various approximations of 𝐺𝜈,𝜆() have been proposed. For the rest of this section, a simple and accurate approximation of 𝐺𝜈,𝜆() will be derived.

Let 𝑋1,,𝑋𝑛 be identically independently normally distributed random variables with mean 𝜇 and variance 𝜎2. It is well known that 𝑋𝑋=𝑖/𝑛 and (𝑛1)𝑆2/𝜎2=(𝑋𝑖𝑋)2/𝜎2 are independently distributed as normal with mean 𝜇 and variance 𝜎2/𝑛 and 𝜒2 with (𝑛1) degrees of freedom, respectively. Let 𝑇=𝑛𝑋𝜇/𝜎𝑛𝑧𝑝=𝑆/𝜎𝑛𝑆𝑋𝜇𝑧𝑝𝜎,(2.4) where 𝑧𝑝 denotes the 100𝑝th percentile of the standard normal distribution, then 𝑇 follows a noncentral 𝑡 distribution with (𝑛1) degrees of freedom and noncentrality 𝑛𝑧𝑝.

Now, consider a sample (𝑥1,,𝑥𝑛) from a normal distribution with mean 𝜇 and variance 𝜎2. Let the parameter of interest be𝜓=𝑛𝑠𝑥𝜇𝑧𝑝𝜎,(2.5) where 𝑥𝑥=𝑖/𝑛 and 𝑠2=(𝑥𝑖𝑥)2/(𝑛1), then the log-likelihood function can be written as(𝜃)=𝜓,𝜎2𝑛=2log𝜎212𝜎2𝑠2𝑛1+𝜓2𝜓+𝛿𝑠𝜎2,(2.6) where 𝛿=𝑛𝑧𝑝. Denote that𝑝𝑇(𝜓)=𝑃𝜓=𝐺𝑡𝑛1,𝛿(𝜓).(2.7)

The overall maximum likelihood estimate (MLE) of 𝜃, ̂𝜃=(𝜓,𝜎2)=(𝛿(𝑛1)/𝑛,((𝑛1)/𝑛)𝑠2) is obtained by solving (𝜕(𝜃)/𝜕𝜃)|𝜃=̂𝜃=0, and the determinant of the observed information matrix evaluated at the overall mle is||𝑗𝜃𝜃̂𝜃||=||||𝜕2(𝜃)||||𝜕𝜃𝜕𝜃𝜃=̂𝜃=𝑛42(𝑛1)3𝑠4.(2.8) The constrained mle of 𝜃 at a fixed 𝜓, ̂𝜃𝜓=(𝜓,𝜎2𝜓)=(𝜓,𝑠2𝐴2/4𝑛2), where𝐴=𝛿2𝜓2+4𝑛𝑛1+𝜓2𝛿𝜓,(2.9) is obtained by solving (𝜕(𝜃)/𝜕𝜎2)|𝜃=̂𝜃𝜓=0. Moreover, the determinant of the observed nuisance information matrix evaluated at the constrained mle is||𝑗𝜎2𝜎2̂𝜃𝜓||=||||𝜕2(𝜃)𝜕𝜎2𝜕𝜎2||||𝜃=̂𝜃𝜓=8𝑛5𝑠4𝐴5(𝐴+𝛿𝜓).(2.10) Hence, the signed log-likelihood ratio statistic iŝ̂𝜃𝑟=𝑟(𝜓)=sgn𝜓𝜓2[(𝜃)(𝜓)]1/2=sgn𝜓𝜓𝑛log4𝑛(𝑛1)𝐴2+𝛿22𝑛𝛿𝜓𝐴1/2.(2.11)

It is well known that 𝑟 is asymptotically distributed as the standard normal distribution with rate of convergence 𝑂(𝑛1/2). Hence, 𝑝(𝜓) can be approximated by Φ(𝑟) where Φ() is the cumulative distribution function of the standard normal distribution. It is important to note that 𝑟 is reparameterization invariant.

In statistics literatures, various likelihood-based small sample asymptotic methods have been proposed. In particular, if the model is a canonical exponential family model and the canonical parameter is 𝜃=(𝜓,𝜆), Lugannani and Rice [3] derive1𝑝(𝜓)=1Φ(𝑟)𝜙(𝑟)𝑟1𝑞,(2.12) where 𝜙() is the density function of the standard normal distribution, 𝑟 is defined in (2.11), and 𝑞 takes the form||𝑗𝑞=𝑞(𝜓)=𝜓𝜓𝜃𝜃̂𝜃||||𝑗𝜆𝜆̂𝜃𝜓||1/2.(2.13) This approximation has a rate of convergence 𝑂(𝑛3/2). It is important to note that 𝑟 is reparameterization invariant whereas 𝑞 is not.

For a general exponential family model with canonical parameter 𝜑=𝜑(𝜃) and a scalar parameter 𝜓=𝜓(𝜃), to obtain inference concerning 𝜓 based on the Lugannani and Rice (1980) [3] method, 𝑟 remains unchanged as in (2.11) because it is reparameterization invariant, but 𝑞 has to be re-expressed in the canonical parameter scale, 𝜙 scale. To achieve this, let 𝜑𝜃(𝜃) and 𝜑𝜆(𝜃) be the derivatives of 𝜑(𝜃) with respect to 𝜃 and 𝜆, respectively. Denote 𝜑𝜓(𝜃) to be the row of 𝜑𝜃1(𝜃) that corresponds to 𝜓, and 𝜑𝜓(𝜃)2 is the square length of the vector 𝜑𝜓(𝜃). Let 𝜒(𝜃) be a rotated coordinate of 𝜑(𝜃) that agrees with 𝜓(𝜃) at ̂𝜃𝜓. Then𝜑𝜒(𝜃)=𝜓̂𝜃𝜓𝜑𝜓̂𝜃𝜓𝜑(𝜃)(2.14) can be viewed operationally as the scalar parameter of interest in 𝜑(𝜃) scale.

Since (𝜃)=(𝜑(𝜃)), by the chain rule in differentiation, we have||𝑗𝜑𝜑̂𝜃||=||𝑗𝜃𝜃̂𝜃||||𝜑𝜃̂𝜃||2,||𝑗(𝜆𝜆)̂𝜃𝜓||=||𝑗𝜆𝜆̂𝜃𝜓||||𝜑𝜆̂𝜃𝜓𝜑𝜆̂𝜃𝜓||1.(2.15) Hence, an estimated variance for ̂̂𝜃|𝜒(𝜃)𝜒(𝜓)| in 𝜑(𝜃) scale is |𝑗(𝜆𝜆)(̂𝜃𝜓)|/|𝑗𝜑𝜑(̂𝜃)|. Thus, 𝑞=𝑞(𝜓), as defined in (2.13) and expressed in 𝜑(𝜃) scale, is||𝜒̂𝜃̂𝜃𝑞=𝑞(𝜓)=sgn𝜓𝜓𝜒𝜓||||𝑗𝜑𝜑̂𝜃||||𝑗(𝜆𝜆)̂𝜃𝜓||1/2.(2.16) Therefore, 𝑝(𝜓) can be obtained from (2.12) with 𝑟 and 𝑞 being defined in (2.11) and (2.17), respectively.

Note that the model being considered is an exponential family model with canonical parameter1𝜑(𝜃)=𝜎2,1𝜎2𝑠𝑥𝑛𝜓𝑧𝑝𝜎2.(2.17) From (2.17), we have𝜑𝜃1(𝜃)=0𝜎4𝑠𝑛𝜎2𝑥𝜎4+𝑠𝜓𝑛𝜎4𝛿2𝑛𝜎23/2,||𝜑𝜃̂𝜃||𝑠=𝑛𝜎6,||𝜑𝜎2̂𝜃𝜓𝜑𝜎2̂𝜃𝜓||=1𝜎8𝜓1+𝐵2,(2.18) where𝐵=𝑥+𝑠𝜓𝑛𝛿𝜎2𝜓2𝑛.(2.19) Moreover, by obtaining the inverse of 𝜑𝜃(𝜃), we have𝜑𝜓(𝜃)=𝑛𝜎2𝑠(𝐵,1).(2.20) Hence, from (2.14), we can obtain||𝜒̂𝜃̂𝜃𝜒𝜓||=11+𝐵2|||||𝑛𝜓+(𝑛1)𝑠𝛿𝐴2+4𝛿𝑛(𝑛1)4|||||.𝑛(𝑛1)𝑠𝐴(2.21) Thus, from (2.16), we have||𝑞=𝑞(𝜓)=sgn𝜓𝜓𝛿𝐴2||4𝑛𝜓𝐴+4𝛿𝑛(𝑛1)𝐴+𝛿𝜓𝑛(𝑛1)𝐴5/2.(2.22) Finally, 𝑝(𝜓)=𝐺𝑛1,𝛿(𝜓) can be approximated from (2.12) with rate of convergence 𝑂(𝑛3/2).

By reindexing all the necessary equations, we have𝐺𝑛1,𝑘𝑛𝑡𝑛1,1𝛼1=1Φ(𝑟)𝜙(𝑟)𝑟1𝑞,(2.23) where 𝜙() and Φ() are the density and cumulative distribution functions of the standard normal distribution, and𝑘𝑟=sgn𝑛1𝑡𝑛1,1𝛼𝑛log4𝑛(𝑛1)𝐴2+𝑛𝑘22𝑘𝑛3/2𝑡𝑛1,1𝛼𝐴1/2,𝑘𝑞=sgn𝑛1𝑡𝑛1,1𝛼𝑛(𝑛1)𝐴5/2||𝑘𝑛𝐴24𝑛𝐴𝑡𝑛1,1𝛼+4𝑘𝑛3/2||(𝑛1)𝐴+𝑘𝑛1/2𝑡𝑛1,1𝛼,𝐴=𝑘𝑛𝑡𝑛1,1𝛼.+𝑘2𝑛𝑡2𝑛1,1𝛼+4𝑛𝑛1+𝑡𝑛1,1𝛼.(2.24) Finally, with a predetermined effect size 𝑘 and power of a size 𝛼 test, the sample size can be obtained by iterations.

Note that DiCiccio and Martin [4] derived an asymptotic approximation of marginal tail probabilities for a real-valued function of a random vector where the function has continuous gradient that does not vanish at the mode of the joint density of the random vector. Applied to the noncentral 𝑡 distribution problem, the results are identical. Nevertheless, the approach of DiCiccio and Martin [4] is quite different from the proposed method. More specifically, DiCiccio and Martin [4] worked directly from the log density and treated the parameters as fixed whereas the proposed method works from the log-likelihood function where the data are observed.

3. Numerical Example

Figure 1 plots the power function of a one-sample 𝑡 test against the effect size 𝑘 for 𝑛=2,3 and 𝛼=0.05,0.01. The exact method is obtained from the built-in cumulative distribution function of the noncentral 𝑡 distribution in 𝑅. From the plot, it is clear that the signed log-likelihood ratio does not provide satisfactory results. The proposed method and the built-in function of 𝑅 are very close even when the sample size is 2. It is interesting to note that the built-in function of 𝑅 has a discontinuity point in the 𝑛=2,𝛼=0.01 case.

Now, consider the data set recorded in Mandenhall et al. [1, page 103] 0.46,0.61,0.52,0.48,0.57,0.54.(3.1)

For testing the hypothesis𝐻0𝜇=0.5versus𝐻𝑎𝜇=𝜇1>0.5,(3.2) the power function of a size 0.05 test and the corresponding 95% confidence bands are plotted in Figure 2. From Figure 2, the approximated power at 𝜇1=0.52 is 0.5764. Furthermore, the 95% confidence interval for the power of the above test when 𝜇1=0.52 is (0.1856,0.8992). At first, the confidence interval seems too wide. However, by examining (2.3), the result is not too surprising because (2.3) depends on (1.1). Since 𝜒2 distribution is a skewed distribution, by defining the confidence interval of 𝜎2 to have equal tail coverage, (1.1) is a wide interval and hence (2.3) is a wide interval.

Finally, to illustrate the determination of the sample size, let the effect size be 0.8, and at 𝛼=0.025, let the power be at least 0.9, then the proposed method gives 𝑛=19 with power 0.909.

4. Summary and Conclusion

The (1𝛾)100% confidence interval for the power of the size 𝛼 Student's 𝑡-test detecting the difference (𝜇𝜇0) is presented. The major advantages of the presented confidence interval are that it depends only on the evaluations of the density and cumulative distribution functions of the standard normal distribution and that it is extremely accurate. The 𝑅 source code is available from the author upon request.

As a final note, the proposed method can be applied to any distribution that belongs to the exponential family model with known canonical parameters. Although the method depends on the correct specification of the underlying distribution, Fraser et al. [5] examined a special case when the error distribution of the regression model is misspecified and the likelihood-based method still gives results that are more accurate than the existing Central Limit Theorem-based approximations.