Skip to main content
Examonaut

Topic 8 · Lesson 1 of 3

Errors, size and power

Two kinds of error

  • A Type I error is rejecting H0H_0 when H0H_0 is true.
  • A Type II error is not rejecting H0H_0 when H0H_0 is false.

In context: for H0:λ=2.5H_0: \lambda = 2.5 (call-outs per day) against H1:λ>2.5H_1: \lambda > 2.5, a Type I error is concluding that the rate of call-outs has increased when it is still 2.5 per day; a Type II error is finding no evidence of an increase when the rate really has increased.

The two errors pull against each other. Making it harder to reject H0H_0 (a smaller critical region) reduces the chance of a Type I error but increases the chance of a Type II error.

Size

The size of a test is the probability of a Type I error:

size=P(reject H0∣H0 true)=P(test statistic in the critical region∣H0)\text{size} = \text{P}(\text{reject } H_0 \mid H_0 \text{ true}) = \text{P}(\text{test statistic in the critical region} \mid H_0)

It is the actual significance level. For a discrete distribution it is usually less than the nominal significance level, because the critical region must have probability at most that level.

For example, for H0:λ=2.5H_0: \lambda = 2.5 against H1:λ>2.5H_1: \lambda > 2.5 at the 5% level with one Poisson observation: P(X⩾5)=0.1088\text{P}(X \geqslant 5) = 0.1088 and P(X⩾6)=0.0420\text{P}(X \geqslant 6) = 0.0420, so the critical region is X⩾6X \geqslant 6 and the size is 0.0420.

Type II errors

A Type II error can only happen if H0H_0 is false, so its probability depends on the true value of the parameter. You must be given a value to work with:

P(Type II error)=P(test statistic not in the critical region∣the given true value)\text{P}(\text{Type II error}) = \text{P}(\text{test statistic not in the critical region} \mid \text{the given true value})

In the example, if the true rate is λ=4\lambda = 4, then

P(Type II error)=P(X⩽5∣λ=4)=0.7851\text{P}(\text{Type II error}) = \text{P}(X \leqslant 5 \mid \lambda = 4) = 0.7851

The test would miss a rise from 2.5 to 4 call-outs per day more than three times in four. That is typical of a test on a single small count.

Power

The power of a test is the probability of rejecting H0H_0 when it is false, for a given true value:

power=1−P(Type II error)=P(test statistic in the critical region∣true value)\text{power} = 1 - \text{P}(\text{Type II error}) = \text{P}(\text{test statistic in the critical region} \mid \text{true value})

In the example the power at λ=4\lambda = 4 is 1−0.7851=0.21491 - 0.7851 = 0.2149, and at λ=6\lambda = 6 it is P(X⩾6∣λ=6)=0.5543\text{P}(X \geqslant 6 \mid \lambda = 6) = 0.5543. The further the true value is from the value in H0H_0, the more powerful the test.

Notice that every one of these calculations is the same kind of probability, P(in the critical region)\text{P}(\text{in the critical region}) or its complement, worked out with different parameter values. Set out clearly which value you are using each time.

Worked example

A geometric test

For H0:p=0.4H_0: p = 0.4 against H1:p<0.4H_1: p < 0.4 at the 5% level, with one observation X∼Geo(p)X \sim \text{Geo}(p):

Show solution
  1. Critical region X⩾cX \geqslant c with 0.6c−1⩽0.050.6^{c - 1} \leqslant 0.05: c−1⩾5.86c - 1 \geqslant 5.86, so X⩾7X \geqslant 7.
  2. Size =0.66=0.0467= 0.6^6 = 0.0467.
  3. If in fact p=0.2p = 0.2: power =P(X⩾7)=0.86=0.262= \text{P}(X \geqslant 7) = 0.8^6 = 0.262, and P(Type II error)=0.738\text{P}(\text{Type II error}) = 0.738.

Worked example

A binomial test

For H0:p=0.5H_0: p = 0.5 against H1:p>0.5H_1: p > 0.5, with 12 trials and critical region X⩾10X \geqslant 10:

Show solution
  • size =P(X⩾10∣p=0.5)=0.0193= \text{P}(X \geqslant 10 \mid p = 0.5) = 0.0193;
  • power when p=0.8p = 0.8: P(X⩾10∣p=0.8)=0.558\text{P}(X \geqslant 10 \mid p = 0.8) = 0.558.

Practise this topic

Both are part of Premium.