Skip to main content
Examonaut

Topic 8 · Lesson 2 of 3

Power functions and comparing tests

The power function

The power function gives the power for every possible value of the parameter. For a test with critical region X⩾6X \geqslant 6 and X∼Po(λ)X \sim \text{Po}(\lambda):

power(λ)=P(X⩾6)=1−e−λ(1+λ+λ22!+λ33!+λ44!+λ55!)\text{power}(\lambda) = \text{P}(X \geqslant 6) = 1 - e^{-\lambda}\left(1 + \lambda + \frac{\lambda^2}{2!} + \frac{\lambda^3}{3!} + \frac{\lambda^4}{4!} + \frac{\lambda^5}{5!}\right)

For geometric tests the power function is especially neat. With critical region X⩾7X \geqslant 7, power(p)=(1−p)6\text{power}(p) = (1 - p)^6; with critical region X⩽cX \leqslant c, power(p)=1−(1−p)c\text{power}(p) = 1 - (1 - p)^c.

At the value in H0H_0, the power function equals the size. For values in H1H_1 it gives the power; as the parameter moves away from H0H_0 it rises towards 1.

Power curves

A graph of the power function is a power curve. Here is the curve for the test of H0:λ=2.5H_0: \lambda = 2.5 against H1:λ>2.5H_1: \lambda > 2.5 with critical region X⩾6X \geqslant 6.

23456789100.00.20.40.60.81.0λPower

Read it like any graph: at λ=2.5\lambda = 2.5 the height is the size, 0.042; the power reaches 0.5 at about λ=5.7\lambda = 5.7; above λ=8\lambda = 8 the test almost always detects the change.

You can also work backwards from a power function. For the geometric test above, the power is at least 0.8 when (1−p)6⩾0.8(1 - p)^6 \geqslant 0.8, that is p⩽1−0.81/6=0.0365p \leqslant 1 - 0.8^{1/6} = 0.0365: the test is only reliable at detecting a fall in pp from 0.4 to below about 0.04.

Comparing tests

To compare two tests of the same hypotheses:

  • first compare their sizes: a fair comparison needs similar sizes;
  • then compare their power for the values of the parameter that matter: the test with the higher power is better at detecting a change.

If one test has the same size as another and greater power for every value in H1H_1, it is better everywhere. Other things may count too: a more powerful test may need more data, more time or more cost.

More data, more power

Counting over a longer period, or using a larger sample, usually gives a more powerful test. For the call-out example, counting over 2 days gives T∼Po(5)T \sim \text{Po}(5) under H0H_0; P(T⩾9)=0.0681\text{P}(T \geqslant 9) = 0.0681 and P(T⩾10)=0.0318\text{P}(T \geqslant 10) = 0.0318, so the critical region is T⩾10T \geqslant 10 with size 0.0318. If the true rate is 4 per day, T∼Po(8)T \sim \text{Po}(8) and the power is P(T⩾10)=0.283\text{P}(T \geqslant 10) = 0.283, against 0.215 for the one-day test, even though the two-day test has the smaller size.

The significance level and power

Raising the significance level makes the critical region larger. That increases the size (more Type I errors) but also increases the power (fewer Type II errors). There is no free lunch: for a fixed amount of data, the only way to reduce both errors is to collect more data.

Practise this topic

Both are part of Premium.