Hypotheses, tails and rejection regions
A new filter is meant to cut stray pulses. A few quiet minutes could be luck. A hypothesis test asks: if nothing had changed, how unlikely would a result like this be? If it is unlikely enough, you have evidence of a change.
1Write H₀ and H₁ about a population parameter
| Quantity | What it is |
|---|---|
| θ | Unknown population mean per five minutes |
| S = Y₁ + Y₂ + Y₃ | Random total: the test statistic |
| s = 0 + 1 + 2 = 3 | The observed value of S |
| Parameter | H₀ | H₁ for the question asked |
|---|---|---|
| Flag probability p | p = 0.25 | p > 0.25: has it increased? |
| Mean reading μ | μ = 52 | μ > 52: has it increased? |
| Mean reading μ | μ = 52 | μ ≠ 52: has it changed at all? |
2Choose the tail and the rejection region
| H₁ says the mean is | 5% rejection rule for Z ~ N(0, 1) | Probability under H₀ |
|---|---|---|
| lower | Z ≤ −1.644854 | 0.05 in the lower tail |
| higher | Z ≥ 1.644854 | 0.05 in the upper tail |
| different (two-tailed) | Z ≤ −1.96 or Z ≥ 1.96 | about 0.025 in each tail |
- 1A critical value is the boundary of the region.
- 2The acceptance region is everything else: not enough evidence against H₀, which is not proof of H₀.
- 3For counts the region is whole numbers, and its probability may fall below 5% (page 2).
3Know what 5% means, then conclude in context
| Result | Decision | Write, in context |
|---|---|---|
| In the rejection region | Reject H₀ | There is evidence at the 5% level that the mean count is below 3. |
| Not in the region | Do not reject H₀ | There is insufficient evidence at the 5% level that the mean count is below 3. |
4Try it
1 A spinner is said to land red with probability 0.3. Ana thinks it lands red less often. Write H₀ and H₁.
2 Bags are labelled with mean mass 500 g. Test at 5% whether the mean has changed. Write H₀ and H₁ and the rejection rule for Z.
3 A one-tailed test of H₀: μ = 500 against H₁: μ > 500 at 5% gives z = 1.2. Write the conclusion.
- 1H₀: p = 0.3; H₁: p < 0.3
- 2H₀: μ = 500; H₁: μ ≠ 500; reject if Z ≤ −1.96 or Z ≥ 1.96
- 31.2 < 1.645: do not reject H₀. There is insufficient evidence at the 5% level that the mean mass is above 500 g
Exact tests for a binomial or Poisson count
With a count, you can add up exactly how likely a result this extreme would be if H₀ were true. If that tail probability is below the significance level, the result is in the rejection region.
1Binomial: add the upper tail from the observed count
A circuit returns a flag on each independent check, with constant probability p. Let X count flags in 16 checks; 8 are observed. Test H₀: p = 0.25 against H₁: p > 0.25 at the 5% level.
- Write the upper-tail probabilityX ~ Bin(16, 0.25)P(X ≥ 8)=P(8) + P(9) + … + P(16)
- Evaluate and compare with the levelP(X ≥ 8)=0.0271 < 0.05
∴a count this high would be unlikely if p were 0.25
- Answerreject H₀: there is evidence at the 5% level that p is greater than 0.25
2Poisson: total the records, then add the lower tail
A filter test records three independent five-minute counts, 0, 1 and 2 stray pulses, each Po(θ). Let S be their total. Test H₀: θ = 3 against H₁: θ < 3 at the 5% level.
- Find the distribution of the totals=0 + 1 + 2 = 3mean of S under H₀=3 × 3 = 9S ~ Po(9)
- Write the lower-tail probabilityP(S ≤ 3)=P(0) + P(1) + P(2) + P(3)=e⁻⁹(1 + 9 + 81/2 + 729/6)=0.0212
- Compare with the level0.0212 < 0.05
∴a total this low would be unlikely if θ were 3
- Answerreject H₀: there is evidence at the 5% level that the mean count per five minutes is below 3
3Find the critical count: check the next one
4Try it
1 X ~ Bin(10, p). Test H₀: p = 0.5 against H₁: p > 0.5 at 5%, when X = 9.
2 Calls arrive as Po(λ) per day. Two independent days give 1 and 2 calls in total 3. Test H₀: λ = 4 against H₁: λ < 4 at 5%.
3 X ~ Bin(20, 0.3) under H₀. Find the 5% critical region for H₁: p > 0.3, and its actual size.
- 1P(X ≥ 9) = 11/1024 ≈ 0.0107 < 0.05: reject H₀; evidence at the 5% level that p > 0.5
- 2S ~ Po(8); P(S ≤ 3) ≈ 0.0424 < 0.05: reject H₀; evidence at the 5% level that the mean is below 4 a day
- 3P(X ≥ 10) ≈ 0.0480 but P(X ≥ 9) ≈ 0.1133: reject for X ≥ 10; actual size 0.0480
Normal approximations in count tests
Adding forty exact binomial terms is slow. When the count is large, its bars follow a normal curve closely, so one normal tail does the job. The bars are whole numbers, so the boundary moves half a unit: the continuity correction.
1Binomial: use N(np, np(1 − p))
A run has 80 independent checks, each flagged with probability p. Test H₀: p = 0.4 against H₁: p > 0.4 at the 5% level. The observed flag count is 40. Use a normal approximation.
- Find the null mean and varianceX ~ Bin(80, 0.4)mean=80 × 0.4 = 32variance=80 × 0.4 × 0.6 = 19.2
- Apply the continuity correctionX ≥ 40 becomes Y > 39.5
- Standardise and find the upper tailz=(39.5 − 32) ÷ √19.2=1.7116P(Y > 39.5)=1 − Φ(1.7116) = 0.0435
∴0.0435 < 0.05
- Answerreject H₀: there is evidence at the 5% level that p is above 0.4
2Poisson: use N(λ, λ) for a large mean
- 1Next count: X ≤ 16 uses 16.5, z = −1.5309, tail 0.062893 > 0.05. The approximate region is X ≤ 15, size about 4.14%.
- 2Do not use 14.5 for X ≤ 15.
3Try it
1 X ~ Bin(50, p). Test H₀: p = 0.5 against H₁: p > 0.5 at 5%, when X = 32, using a normal approximation.
2 X ~ Po(λ) per hour. Test H₀: λ = 30 against H₁: λ < 30 at 5%, when X = 21, using a normal approximation.
- 1N(25, 12.5); z = (31.5 − 25) ÷ √12.5 ≈ 1.838; 1 − Φ(1.838) ≈ 0.0330 < 0.05: reject H₀; evidence at the 5% level that p > 0.5
- 2N(30, 30); z = (21.5 − 30) ÷ √30 ≈ −1.552; Φ(−1.552) ≈ 0.0603 > 0.05: do not reject H₀; insufficient evidence at the 5% level that the mean is below 30 an hour
Testing a population mean
A new setting is meant to raise the mean reading. One sample mean of 54 against an old 52 looks higher, but sample means wobble. The test asks how many standard errors 54 sits above 52.
1Known σ: standardise x̄ with SE = σ/√n
Calibration readings are independent observations from N(μ, 6²). Test H₀: μ = 52 against H₁: μ > 52 at the 5% level, using n = 36 readings with sample mean 54. The upper 5% point of N(0, 1) is about 1.645.
- Find the standard errorSE=6 ÷ √36 = 1
- Standardise and comparez=(54 − 52) ÷ 1 = 2 > 1.645
- Answerreject H₀: there is evidence at the 5% level that the population mean reading is above 52
Find the critical value c for the sample mean.
- Use the upper 5% pointc=52 + 1 × 1.645≈53.645
- Answerreject for x̄ > c ≈ 53.645; the observed 54 rejects
2Two-tailed: split the 5% between the tails
3Unknown variance: estimate it from a large sample
4Try it
1 Readings are N(μ, 4²). A sample of 16 has x̄ = 101.8. Test H₀: μ = 100 against H₁: μ > 100 at 5%.
2 Repeat with H₁: μ ≠ 100.
3 A large sample of 100 has x̄ = 19.6 and s² = 4. Test H₀: μ = 20 against H₁: μ < 20 at 5%.
- 1SE = 1; z = 1.8 > 1.645: reject H₀; evidence at the 5% level that the mean is above 100
- 21.8 < 1.96: do not reject H₀; insufficient evidence at the 5% level that the mean has changed
- 3SE ≈ √(4/100) = 0.2; z = −2 < −1.645: reject H₀; evidence at the 5% level that the mean is below 20
Type I and Type II errors
A test can go wrong two ways: cry wolf, or miss the wolf. A Type I error rejects H₀ when H₀ is true. A Type II error fails to reject H₀ when it is false. A fixed rule gives each a probability.
1Name the error from the truth and the decision
| Decision for the filter test | If θ = 3 is true | If θ = 1.5 is true |
|---|---|---|
| S = 3: reject H₀ | Type I error: a reduction claimed that did not happen | Correct: the reduction is found |
| S = 5: do not reject H₀ | Correct | Type II error: the reduction is missed |
2Type I: the rejection tail under H₀
| Rule and null model | P(Type I error) |
|---|---|
| S ≤ 3 under Po(9) (H₀: θ = 3 against θ < 3) | 0.021226…, exact Poisson rule |
| X ≥ 8 under Bin(16, 0.25) (H₀: p = 0.25 against p > 0.25) | 0.027129…, exact binomial rule |
| X̄ ≥ 53.644854… under N(52, 1) (H₀: μ = 52 against μ > 52; σ = 6, n = 36) | 0.05, continuous rule |
3Type II for the Poisson rule: keep the rule, change the distribution
- 1In context: concluding there is insufficient evidence of a reduction when the mean is really 1.5 per five minutes.
- 2H₁: θ < 3 holds many values; β needs one stated true value.
- 3β describes the rule over future samples. It does not turn this rejecting test into a Type II error.
4Type II for the binomial rule: the miss is the lower part
5Try it
1 X ~ Bin(20, p). The rule rejects H₀: p = 0.3 for X ≥ 10. Find P(Type I error).
2 Find P(Type II error) when p is really 0.5.
3 The observed count is 11. Which type of error could have been made? Explain.
- 1P(X ≥ 10 | p = 0.3) ≈ 0.0480
- 2P(X ≤ 9 | p = 0.5) ≈ 0.4119
- 311 ≥ 10, so H₀ is rejected: only a Type I error is possible (if p is really 0.3)
Errors and sample size for a mean test
For a mean test the rule is one line on the x̄ scale: reject when x̄ passes c. Move the true mean and the curve moves, but c stays put. The same line tells you how big a sample must be to reject.
1α on the null curve, β on the true curve
2Find the least n that rejects
| n | Observed z | Decision at 5% |
|---|---|---|
| 24 | 1.632993 | Below 1.644854: do not reject |
| 25 | 1.666667 | Above 1.644854: reject |
3Run the whole test, then conclude
- 1Name the parameter and write H₀ and H₁.
- 2Give the statistic’s distribution under H₀.
- 3Use the tail H₁ points to and the significance level.
- 4Decide, and write the conclusion in context, with “evidence” or “insufficient evidence at the 5% level”.
- 5For an error probability, keep the rule and use the distribution at the stated true value.
4Try it
1 A test of H₀: μ = 100 against H₁: μ > 100 has SE = 1 and rejects for x̄ ≥ 101.645. Find P(Type II error) when μ = 103.
2 σ = 10. The sample mean is 53. Find the least n for which a 5% test of H₀: μ = 50 against H₁: μ > 50 rejects.
3 For that test with n = 30, write the conclusion.
- 1P(X̄ < 101.645 | μ = 103) = Φ(−1.355) ≈ 0.0877
- 23√n/10 ≥ 1.645, n ≥ 30.06, so n = 31
- 3z = 3√30/10 ≈ 1.643 < 1.645: do not reject H₀; there is insufficient evidence at the 5% level that the mean exceeds 50