Power of a Hypothesis Test Applet

This applet illustrates the fundamental principles of statistical hypothesis testing through the simplest example: the test for the mean of a single normal population, variance known (the Z test).

The basic set-up of the test is this: using only n independent observations tex2html_wrap_inline19 from a normal distribution with unknown mean (but known variance), the task is to decide whether to accept a null hypothesis tex2html_wrap_inline21 for a specified value of tex2html_wrap_inline23 , or to reject the null hypothesis in favor of some alternative hypothesis. In most applications, there are only three alternative hypotheses of interest:

  1. tex2html_wrap_inline25 ;
  2. tex2html_wrap_inline27 ;
  3. tex2html_wrap_inline29 ,
respectively, ``upper-tailed,'' ``lower-tailed,'' and ``two-tailed.'' The testing framework consists of computing a ``test statistic''

displaymath31

and then rejecting the null hypothesis if the appropriate condition is satisfied. In the order the alternative hypotheses are given above, the null hypothesis is rejected if

  1. tex2html_wrap_inline33 ;
  2. tex2html_wrap_inline35 ;
  3. tex2html_wrap_inline37 ,
where tex2html_wrap_inline39 represents the upper tex2html_wrap_inline41 critical point of the standard normal distribution.

This hypothesis testing procedure is set up to give the null hypothesis ``the benefit of a doubt;'' that is, to accept the null hypothesis unless there is strong evidence to support the alternative. If tex2html_wrap_inline43 is true, the above test statistic follows a standard normal distribution, so the probability of erroneously rejecting tex2html_wrap_inline43 is just tex2html_wrap_inline41 . If tex2html_wrap_inline49 is true, however, the test statistic Z does not follow a standard normal distribution -- it follows a normal distribution with a different mean, and thus, the probability of (correctly) rejecting the null hypothesis is larger than tex2html_wrap_inline41 . This probability is knows as the ``power'' of the test, and it depends on the true value of tex2html_wrap_inline55 . (Clearly, a test would have more power for an extreme value of tex2html_wrap_inline55 than for a tex2html_wrap_inline55 that is very close to tex2html_wrap_inline23 .

To use this applet, you must specify the null-hypothesized mean tex2html_wrap_inline23 , the true mean tex2html_wrap_inline55 , the value of tex2html_wrap_inline67 , and select the appropriate alternative hypothesis. Clicking on the ``Show it!'' button will give a plot -- the black curve represents the distribution of the test statistic when the null hypothesis is true. The portion shaded in red represents the probability of being beyond the cut-off point(s) when the null hypothesis is true (the Type I error rate, or tex2html_wrap_inline41 ). The blue curve represents the distribution of the test statistic under the particular value of tex2html_wrap_inline55 you gave. The blue shaded area represents the power of the test for that particular value of tex2html_wrap_inline55 .

by R. Todd Ogden, Dept. of Statistics, Univ. of South Carolina
ogden@stat.sc.edu