S2.4 - Hypothesis tests

Syllabus
2019
Topic
S2.4
Level
A2

Learning objectives

Distinguish a population, census and sample

A statistical investigation begins by defining exactly what is being studied. The population is the complete set of units of interest; a census seeks data from every population unit, while a sample survey collects data from only a subset.

Term Meaning
population every unit about which the investigation aims to draw conclusions
sampling unit one individual member or item that can be selected
sampling frame the operational list or other representation from which units are selected
census investigation intended to include every population unit
sample selected subset used to learn about the population
Approach Main advantages Main limitations
census no sampling variation; detailed information on small subgroups costly and slow; may become outdated; non-response and measurement errors can remain; unsuitable for destructive testing
sample survey quicker and cheaper; can be repeated; permits destructive testing of a limited number conclusions vary from sample to sample; selection bias or an incomplete frame can make it unrepresentative

To study the fill mass of all cans produced during one shift, the population is every can from that shift, one can is a sampling unit, and the production list or numbered stream may provide the frame. Measuring 100 selected cans is a sample survey; measuring every can is a census.

A large sample is not automatically representative, and a census is not automatically error-free. The target population and sampling frame may differ: units missing from the frame cannot be selected, while duplicated entries may be overrepresented.

Understand statistics and sampling distributions

A statistic is a quantity calculated entirely from sample observations. It may estimate or test a population feature, but its formula cannot contain an unknown population parameter. Thus Xˉ\bar X, the sample range and the number of successes are statistics; (X1μ)/σ(X_1-\mu)/\sigma is not when μ\mu and σ\sigma are unknown.

If the same random-sampling procedure were repeated with a fixed sample size, the statistic would usually change. Its sampling distribution lists every possible value of the statistic together with its probability under the stated population model.

Suppose two independent Bernoulli observations are drawn from a population with success probability 0.50.5, and let TT be the sample proportion of successes. The four equally likely ordered samples giveT=0, 12, 1T=0,\ \frac12,\ 1with probabilitiesP(T=0)=14,P(T=12)=12,P(T=1)=14.P(T=0)=\frac14,\quad P\left(T=\frac12\right)=\frac12,\quad P(T=1)=\frac14.This probability model is the sampling distribution of TT, not the distribution of a single observation.

A test statistic is a chosen statistic whose sampling distribution is known under the null hypothesis. That distribution lets an observed sample value be judged as ordinary or unusually extreme.

Do not confuse a sample distribution—the observed data values in one sample—with a sampling distribution—the distribution of a statistic over all possible samples generated by the same design.

Form and interpret a hypothesis test

A hypothesis test asks whether sample evidence is sufficiently unusual under a stated model to justify rejecting that model in favour of a specific alternative. It can therefore refine a mathematical model, but it cannot prove either hypothesis.

Component Role
null hypothesis H0H_0 precise baseline parameter value used to calculate probabilities, such as p=0.35p=0.35 or λ=8\lambda=8
alternative hypothesis H1H_1 claim supported by departure in the stated direction: <<, >> or \ne
significance level α\alpha maximum chosen probability of rejecting H0H_0 through the critical region when H0H_0 is true

State both hypotheses before using the data. Assume H0, identify the sampling distribution of a suitable test statistic, and calculate the probability of the observed value or values at least as supportive of H1. If this p-value is no greater than alpha—or the statistic lies in the precomputed critical region—reject H0; otherwise do not reject H0.

A historical breakdown rate is 88 per week and a refurbishment is claimed to have changed it. UseH0:λ=8,H1:λ8.H_0:\lambda=8,\qquad H_1:\lambda\ne8.If the observed count is outside the two-tailed critical region, do not reject H0H_0: there is insufficient evidence that the mean breakdown rate changed.

Write conclusions in the context and with evidential language. 'Do not reject H0' means the sample was not sufficiently inconsistent with H0; it does not mean H0 has been accepted or shown true.

Construct and use a critical region

A critical region is the set of test-statistic values that cause rejection of the null hypothesis. It is chosen from the sampling distribution under H0 so that its total probability—the actual significance level—does not exceed the stated level and is as close as the discrete distribution permits.

actual significance=P(test statistic lies in the critical regionH0)\text{actual significance}=P(\text{test statistic lies in the critical region}\mid H_0)

For an upper-tailed test with JPo(9)J\sim Po(9) under H0H_0, tables giveP(J13)=0.9261,P(J14)=0.9585.P(J\le13)=0.9261,\qquad P(J\le14)=0.9585.HenceP(J14)=0.0739>0.05,P(J15)=0.04150.05.P(J\ge14)=0.0739>0.05,\qquad P(J\ge15)=0.0415\le0.05.The 5% critical region is therefore J15J\ge15. An observed value of 15 or more is significant at the 5% level.

Because a discrete tail changes in jumps, the actual significance is often below the nominal level. Moving the boundary one integer further inward here would make the rejection probability too large; moving it outward would be valid but unnecessarily conservative.

State a critical region as values such as J ≥ 15, not as the probability statement P(J ≥ 15). The region contains outcomes; its probability under H0 measures the chance of entering it.

Choose a one-tailed or two-tailed test

The wording of the alternative hypothesis fixes the tail structure before the sample is inspected. A directional claim uses one tail; a claim of any change uses both tails.

Claim Alternative Extreme evidence
parameter has decreased H1:θ<θ0H_1:\theta<\theta_0 small test-statistic values: lower tail
parameter has increased H1:θ>θ0H_1:\theta>\theta_0 large test-statistic values: upper tail
parameter has changed H1:θθ0H_1:\theta\ne\theta_0 unusually small or large values: two tails

For a one-tailed test, the critical-region probability is placed in the stated tail. For a two-tailed test at nominal level alpha, choose lower and upper regions with probabilities as close as practical to alpha/2 while keeping their combined probability no greater than alpha. Discreteness may prevent equal tails or an exact total.

Testing whether a historical proportion 0.350.35 has changed requires H0:p=0.35H_0:p=0.35 and H1:p0.35H_1:p\ne0.35, so both unusually few and unusually many successes oppose H0H_0. Testing whether it has fallen uses H1:p<0.35H_1:p<0.35 and only the lower tail.

Do not choose one or two tails after seeing whether the sample result is high or low. That changes the testing rule to favour the observed data and invalidates the stated significance level.

Test Binomial proportions and Poisson means

For a Binomial test, the parameter is a population success probability p; for a Poisson test, it is the mean event rate lambda for a stated exposure. Under H0, that exact parameter determines the sampling distribution used for the test.

Test Distribution under H0H_0
nn independent fixed-probability trials, testing p=p0p=p_0 XB(n,p0)X\sim B(n,p_0)
Poisson count over tt base exposure units, testing rate λ=λ0\lambda=\lambda_0 per unit XPo(tλ0)X\sim Po(t\lambda_0)

Use this order: (1) define the parameter and state H0 and H1; (2) translate the observed count and direction into the correct tail or tails; (3) calculate an exact tail probability from tables/formulae or construct a critical region; (4) compare with alpha; (5) reject or do not reject H0 and give a contextual conclusion.

Suppose 8 of 40 items fail and the historical failure proportion is 0.350.35. To test whether it is lower, useH0:p=0.35,H1:p<0.35,XB(40,0.35).H_0:p=0.35,\qquad H_1:p<0.35,\qquad X\sim B(40,0.35).The lower-tail probability isP(X8)=0.0303<0.05.P(X\le8)=0.0303<0.05.Reject H0H_0: there is sufficient evidence at the 5% level that the failure proportion is lower than 0.350.35.

Use an approximation only when suitable, preserving the null model: a rare-event Binomial may use Po(np0)Po(np_0), while a sufficiently spread Binomial or Poisson count may use a matched Normal distribution with continuity correction. For example, six weeks at a null Poisson rate of 6 per week gives total mean 36 and may be approximated by N(36,36)N(36,36).

For a discrete two-tailed test, construct both rejection tails and add their null probabilities to obtain the actual significance. Do not automatically double one observed-tail probability unless that rule is justified by the chosen test; discrete tails are often unequal.

Keep the parameter in the hypotheses, not the observed statistic: write H0:p=p0 or H0:lambda=lambda0, not H0:X=x. A non-significant result is insufficient evidence for H1, not evidence that the null parameter is exactly correct.