City University of Hong Kong · FACULTY OF STATISTICS

BIOS6902 Chap.7 Hypothesis Testing: Errors, Power and Neyman-Pearson

- one subject, every graph, every model, every mark
7 Chapters3-page Bible
Our own words - no uploaded lecturer files
Updated for this semester
Chapter 7 of 11 · BIOS6902

Hypothesis Testing: Errors, Power and Neyman-Pearson

Eight cups, and the whole apparatus

The story the course opens with concerns a colleague of Fisher who insisted she could taste which liquid had gone into the cup first. Eight cups were prepared, four each way, and presented in a shuffled order; she picked out all four of one kind without error.

Guessing would produce that outcome once in seventy attempts, about fourteen in a thousand, and since that sits below one in twenty the result counted as significant. Every piece of modern testing is already there: a claim of no ability, a statistic, a probability worked out under that claim, and a line drawn in advance.

Formally, a test opposes a null hypothesis to an alternative, with the two parameter sets disjoint.

A simple hypothesis names a single value; a composite one names more. You choose a test statistic and a rejection region, and the test is the indicator of that region. Two mistakes are possible and they are not symmetric in consequence: rejecting a true null, and failing to reject when the alternative holds.

The power function records the probability of rejection at every parameter value and therefore describes both mistakes at once.

Size, level, and a distinction that gets examined

A test has a given size when the worst-case probability of false rejection across the null set equals that number, and a given level when the worst case is merely bounded by it.

Every test of a given size has that level; the converse fails whenever the supremum is not attained. With discrete data this is routine rather than exotic: achievable rejection probabilities come in jumps, usually no region has probability exactly one in twenty, and the resulting test is mildly conservative.

Saying so explicitly when a question involves a small binomial sample is a cheap mark.

Against a simple alternative there is an optimal answer. The Neyman-Pearson lemma says the test that rejects for large values of the likelihood ratio is the most powerful test at that level against that particular alternative. The result is elegant and narrow.

Real alternatives are almost never a single point, because a clinician asks whether a drug works rather than whether its effect is exactly some specific number, so a test optimal against one alternative may be poor against the next.

The two general-purpose procedures do the actual work.

The two statistics you will actually use

A Wald test divides the distance between the estimate and the null value by a standard error and compares the result with a normal critical value.

It is cheap, it applies wherever asymptotic normality does, and its main subtlety is which standard error belongs in the denominator: under the null's own logic the null value goes under the square root, whereas an interval uses the estimate.

A likelihood-ratio test compares the largest achievable likelihood under the null with the largest achievable overall, and rejects when that ratio is small.

Wilks' theorem is what makes the ratio usable for composite hypotheses.

Under regularity and under the null, twice the negative logarithm of the ratio converges to a chi-square distribution whose degrees of freedom equal the difference in dimension between the unrestricted and restricted parameter sets. Degrees of freedom count constrained parameters, not observations, and getting that count wrong is the most common technical error in answers on this material.

Applied to a rate, the two procedures usually point the same way at moderate sample sizes, and comparing them on the same data is worth doing precisely because agreement cannot be assumed in general.

In this chapter

What this chapter covers

  • 01

    The tea-tasting experiment as the original test

  • 02

    Null and alternative, simple and composite

  • 03

    Type I and Type II error, and the power function

  • 04

    Size against level, and why discrete data separate them

  • 05

    The Neyman-Pearson lemma and its narrow scope

  • 06

    Wald tests, and which standard error belongs in the denominator

  • 07

    Likelihood-ratio tests and Wilks' theorem

Worked example · free

Finding a critical value and then the power it delivers

Q [8 marks]. AskSia-authored practice. For a normal sample with unit variance, test a point null against a specific larger alternative using an upper rejection region. Find the threshold for a given size, then the power, then its limit. The weighting shown is a study aid, not a University marking scheme.
Figure 7.1 One threshold, two shaded areas.Figure 7.1 One threshold, two shaded areas. The red area is the chance of rejecting a true null; the blue area is the chance of missing a real effect.reject beyond hereunder the nullunder the alternativefalse rejectionmissed detectionmoving the threshold trades one shaded area for the other
Figure 7.1 One threshold, two shaded areas. The red area is the chance of rejecting a true null; the blue area is the chance of missing a real effect.
  • 2State the distribution of the sample mean under the null.
  • 2Solve for the threshold that gives the required size.
  • 2Recompute the distribution under the alternative and obtain the power.
  • 2Take the limit in the sample size and interpret it.
Under the null the sample mean is normal about the null value with variance equal to the reciprocal of the sample size. Requiring the probability of exceeding the threshold to equal the chosen size gives a threshold equal to the null value plus the upper critical value divided by the square root of the sample size. Under the alternative the sample mean is normal about the alternative value with the same variance, so the power is one minus the standard normal distribution function evaluated at the critical value minus the square root of the sample size times the gap between the hypotheses. As the sample size grows that argument tends to minus infinity and the power tends to one, which is consistency of the test.
Sia tip — Write the distribution of the statistic twice, once under each hypothesis, before doing any algebra. Almost every error in power calculations is the result of using the null distribution where the alternative was needed.
Glossary

Key terms

Null Hypothesis
The statement about the parameter that a test is designed to challenge, usually expressing no effect or no difference.
Power Function
The probability of rejecting the null, recorded at every parameter value, so it describes false rejection and successful detection at once.
Type I Error
Rejecting a null hypothesis that is in fact true. Its worst-case probability across the null set is what a size or level constrains.
Size
The largest probability of false rejection over the null set, attained rather than merely bounded.
Level
An upper bound on the probability of false rejection over the null set, which may not be achieved exactly when the statistic is discrete.
Neyman-Pearson Lemma
The result that, for a simple null against a simple alternative, the likelihood-ratio test is most powerful among all tests of a given level.
Wald Statistic
The distance between an estimate and a null value divided by a standard error, compared with a normal critical value.
Wilks' Theorem
The result that twice the negative log likelihood ratio has an approximate chi-square distribution under the null, with degrees of freedom equal to the dimension reduction.
FAQ

Hypothesis Testing: Errors, Power and Neyman-Pearson FAQ

Why is the Type I error controlled rather than the Type II error?

Because the two mistakes fall on different parties and carry different costs. Rejecting a true null means announcing an effect that does not exist, which propagates into practice, into later research and into decisions; the convention fixes that rate in advance and then buys as much detection ability as the budget allows. It is a convention about who bears the risk, not a mathematical necessity.

Which standard error goes under the square root in a Wald test?

The one implied by the hypothesis you are assuming. A test computes a probability under the null, so the null value belongs in the denominator; an interval assumes no particular value, so the estimate belongs there. Both forms of the test statistic exist in the literature and both are defensible, but mixing them inside one calculation is not.

How do I count the degrees of freedom for a likelihood-ratio test?

Subtract the dimension of the restricted parameter set from the dimension of the unrestricted one. It counts how many free parameters the null gives up, never how many observations you have. Testing a single mean against a fixed value costs one dimension; testing whether two groups share a two-parameter distribution costs two.

Is the Neyman-Pearson lemma useful in practice?

Directly, rarely: it requires the alternative to be a single specified value, which real questions almost never supply. Indirectly, constantly: it explains why likelihood ratios appear everywhere in testing, and the general likelihood-ratio test is the natural extension of it to composite hypotheses.

Study strategy

Exam move

Write out the four-line answer skeleton and use it every time: both hypotheses in parameter terms, the statistic and its null distribution, the rejection region or the p-value, then the decision with its scope. Most marks in a testing question are for the fourth line, which is the one students leave out.

Working through Hypothesis Testing: Errors, Power and Neyman-Pearson in BIOS6902? Sia is AskSia’s AI Statistics tutor — ask any BIOS6902 Hypothesis Testing: Errors, Power and Neyman-Pearson question and get a clear, step-by-step explanation grounded in how BIOS6902 is taught and assessed. Read this chapter free, then take your hardest questions to Sia.

A+Everything unlocked
Unlocks this Bible + all 16 of your City University of Hong Kong subjects - and 1,000+ Bibles across every Australian university.
Sia - your BIOS6902 tutor, unlimited, worked the way the exam marks it
The full 3-page Bible + practice bank with worked solutions
Chrome extension - sync your LMS so Sia knows your deadlines
Bilingual EN / Chinese on every Bible and every Sia answer
$0.99 Trial
30-day money-back · cancel in one tap · how it works