FS1 8.1 - Size and power of a test
An effective test must control false alarms while detecting changes that matter. You will calculate size and power, derive power functions, choose a feasible rejection rule and compare tests using detection, error rates and sampling cost.
A rejection probability viewed across possible populations
Can one test be better at detecting a small increase, but worse at detecting a larger one?
Yes. A single power value describes only one alternative. To compare tests properly, look at how their rejection probabilities change across the possible true parameter values, as well as their false-alarm probabilities and sampling costs.
You already know
Type I error is rejection under a true null; Type II error is non-rejection under a specified true alternative. Keep the rejection rule fixed when evaluating it at different true parameters. Normal calculations use standard deviation, not variance.
The same mathematical probability takes different names according to which true population parameter is being considered.
Size, power and power function
For a fixed test of a specified null value, its size is its Type I error probability.
Its power at a specified true alternative is the probability of rejecting at that alternative.
The power function gives the rejection probability as a function of the true parameter, with the test rule held fixed.
Power and Type II error concern opposite decisions under the same alternative, so they are complements.
Power function for a fixed test
For critical region , define
For a simple null ,
At a specified true alternative ,
The function is defined across the parameter domain; at the null point its value is size, while at an alternative it measures detection. Not in the formula booklet: learn it.
A stated level is an upper limit for the false-alarm probability of the chosen rule. Its actual size can be smaller, especially with discrete outcomes. Increasing power by rejecting almost everything would also increase size, so power alone does not establish quality.
Worked example 1: size and power for a normal measurement
Question. A measurement has distribution . Test against , rejecting when . Find the size and the power at true mean , to four decimal places.
Plan. Evaluate the same upper tail first under the null mean, then under the specified alternative.
Why this step? The true mean changes between the two probability calculations; the variance and cutoff do not.
Answer. Size , power at .
Check. The size is just below . The alternative mean is closer to the critical region, so its rejection probability is larger.
Worked example 2 changes only the true alternative mean from to .
Worked example 2: detecting a larger normal mean
Question. Find the power of the same normal test when the true mean is .
Plan. Evaluate its unchanged critical tail under .
Why this step? Power varies with the actual mean. Replacing the cutoff by a new null-based boundary would change the test itself.
Answer. Power , to four decimal places.
Check. The cutoff lies below the true mean, so the probability exceeds . The test's size remains , because the null model has not changed.
For this test the whole power function is
where is the standard normal cumulative distribution function. This derived function is not printed in the booklet; it follows from the recalled normal tail calculation.
Watch out
Wrong: report a single power without stating the true alternative, or calculate it using the null parameter. Right: size uses the null; power uses the specified alternative with the same rejection rule.
Use an intermediate alternative.
Building a power function from the rejection event
An event description is the safest starting point for a power function. For example, a geometric rule rejecting when has rejection probability ; a rule rejecting when has probability . These are derived geometric tail consequences, not separate booklet results.
Sometimes the geometric success probability comes from another model. Suppose each independent run of a program has a Poisson number of glitches with mean . A fault-free run has probability
The Poisson probability formula is supplied in the booklet. Assuming independent runs with the same mean, the trial of the first fault-free run is geometric with this success probability.
Power function for a fault-free-run rule
Test against , rejecting if a fault-free run occurs within independent runs. Then
The size is ; the Type II error probability at a true alternative is . Here is fixed when the power function is evaluated. Not in the formula booklet: learn it.
The complement event is “every one of the first runs contains at least one glitch”. Each has probability ; independence allows multiplication. This derives the result directly from the event, without working backwards from a printed answer.
Worked example 3: ten opportunities for a fault-free run
Question. Let and reject if the first fault-free run occurs within runs. Find the size and the power at true mean , to four decimal places.
Plan. Substitute the null and alternative glitch means into the same function with .
Why this step? A lower glitch mean increases the probability of a fault-free run, making this short-wait rejection event more likely.
Answer. Size , power at .
Check. Both are probabilities between and , and the rejection probability is much larger under the substantial improvement.
Worked example 4 changes only the trial limit from to . This compares two different tests; within either test the limit stays fixed while varies.
Worked example 4: twice as many opportunities
Question. Repeat the size and power calculation for rejection within runs.
Plan. Replace by , retaining the two population means.
Why this step? More chances to see a fault-free run increase detection, but also increase false rejections under the null.
Answer. Size , power at .
Check. Both size and power exceed their values for runs. The new size is still below , using its unrounded value.
A probability of a zero count comes from one Poisson run; the probability of the first such run comes from a geometric model across independent runs. Keeping those levels separate prevents a common modelling error.
Watch out
Wrong: for rejection within runs. This is the chance of one fault-free run, not the chance of seeing one within the whole limit. Right: complement failure in every independent run to obtain , holding fixed as varies.
Deriving the event across runs makes clear which quantity is being varied.
Problem-solving
Describe rejection, find its probability under a general true parameter, then substitute the null for size or an alternative for power. A power function belongs to a fixed rule.
Choose an intermediate trial limit.
Meeting a detection target without too many false alarms
A design can require both a small Type II error at an important alternative and an upper limit on size. Satisfying only one condition is not enough.
Retain the program model, null mean , and a true alternative mean . Write
where each is the probability that one run is not fault-free. Both lie between and .
Integer limits from Type II error and size
For rejection on a fault-free run within runs, requiring at the chosen alternative gives
Requiring size at most gives
Here , and is a positive integer. Both logarithm denominators are negative, so the inequality directions matter. Not in the formula booklet: learn it.
Continue this lesson.
You’re previewing NovaLearn without an account. Create a free account to read the rest.
Create free account