4.18 Hypothesis testing: means, proportions, correlation and errors
Studying this course? Keep your progress in one place.
Key facts
- Hypotheses are about the population parameter, never the sample statistic. If , reject .
- Never conclude is proved: say "insufficient evidence to reject".
- known: -test. unknown: -test with degrees of freedom. Paired data: test the differences.
- Binomial and Poisson tests are one-tailed in IB; the critical region has probability below .
- A Type I error rejects a true ; a Type II error fails to reject a false one.
The language of a test
State hypotheses about the population, find the -value, compare with and conclude cautiously in context.
The null hypothesis states a parameter equals a value (for example ). The alternative hypothesis is (two-tailed) or / (one-tailed).
The significance level is the probability of rejecting when it is true. The -value is the probability, if is true, of a result at least as extreme as the one observed. If , reject . For a two-tailed test, double the tail probability.
The critical region is the set of test statistics that lead to rejection; its boundary is the critical value.
- 1
State hypotheses
H0 and H1 about the population
- 2
Choose the level
significance level alpha
- 3
Find the p-value
under H0, using the GDC
- 4
Compare
reject H0 if p < alpha
- 5
Conclude in context
cautious wording
A test at the level gives . What is the correct conclusion?
Tests for a population mean
Use a -test when is known and a -test when it is not; for paired data test the differences.
known (normal population, or large ): under , , so use the -test.
unknown: use the one-sample -test with degrees of freedom, whatever the sample size. The GDC gives and the -value.
Matched pairs: take the differences as a single sample and test . Unpaired samples are independent.
| z-test | t-test | |
|---|---|---|
| When | σ known (or large n) | σ unknown |
| Distribution | Normal | t-distribution |
| Degrees of freedom | Not needed | n − 1 |
z-test
- When:
- σ known (or large n)
- Distribution:
- Normal
- Degrees of freedom:
- Not needed
t-test
- When:
- σ unknown
- Distribution:
- t-distribution
- Degrees of freedom:
- n − 1
Worked example
, , , , . Test at the level.
- 1
Standard error .
- 2
.
- 3
.
- 4
, so reject .
The population standard deviation is unknown and . Which test is used?
Proportions and Poisson means
Use the binomial or Poisson distribution under , and find or .
Proportion: . Poisson mean: , rescaled to the period observed.
For the -value for observing is .
These tests are one-tailed only in IB.
The critical region for a discrete variable is found by testing values: choose the region with the largest probability still less than the significance level.
Example: , , gives , so reject .
| Proportion | Poisson mean | |
|---|---|---|
| Null hypothesis | p = p₀ | λ = λ₀ |
| Distribution under H0 | B(n, p₀) | Po(λ₀) |
| p-value when H1 is "greater" | P(X ≥ x) | P(X ≥ x) |
Proportion
- Null hypothesis:
- p = p₀
- Distribution under H0:
- B(n, p₀)
- p-value when H1 is "greater":
- P(X ≥ x)
Poisson mean
- Null hypothesis:
- λ = λ₀
- Distribution under H0:
- Po(λ₀)
- p-value when H1 is "greater":
- P(X ≥ x)
Worked example
under and . Find the critical region at the level.
- 1
Test values from the lower end.
- 2
.
- 3
, which is too large.
For and an observed value , which probability is the -value?
Type I and Type II errors
Type I rejects a true ; Type II fails to reject a false one.
A Type I error is rejecting when it is true. Its probability is that of the critical region under : for continuous tests, but for discrete tests the actual probability, which may be below (for example ).
A Type II error is not rejecting when it is false. Its probability is found under a specific true value of the parameter: .
| H0 is true | H0 is false | |
|---|---|---|
| Reject H0 | Type I error | Correct decision |
| Do not reject H0 | Correct decision | Type II error |
H0 is true
- Reject H0:
- Type I error
- Do not reject H0:
- Correct decision
H0 is false
- Reject H0:
- Correct decision
- Do not reject H0:
- Type II error
Worked example: normal
, , , at . Find if the true .
- 1
Critical region: .
- 2
Not rejecting means .
- 3
Under : with .
A medical test fails to detect a disease that the patient has. Which error is this, if is that the patient is healthy?
Testing for correlation
Test with technology; a small -value is evidence of correlation, not causation.
For data from a bivariate normal population, the sample product-moment correlation coefficient estimates the population coefficient .
Test against (or , ). Use technology; in examinations the data or output will be given.
If the significance level, reject : there is sufficient evidence of a linear correlation. Example: , at .
- 1
State the hypotheses
H₀: ρ = 0 against H₁: ρ ≠ 0 (or ρ > 0, ρ < 0)
- 2
Use technology
get r and the p-value, e.g. r = 0.78, p = 0.004
- 3
Compare p with α
p < α: reject H₀
- 4
Conclude in context
evidence of a linear correlation, not causation
- Hypotheses against
- Decision: evidence of correlation
A correlation test gives with at the level. What is the conclusion?
Try an exam question
A coin is claimed to be fair. To test whether it is biased towards heads it is tossed times and gives heads. Test at the significance level.
[4 marks]
- [1] and .
- [1]Under , .
- [1]-value .
- [1], so reject : sufficient evidence the coin is biased towards heads.
That's the notes covered.
Carry on to the next subtopic.
Try a question
Which of the following are the correct hypotheses for the inspector's test?
1 mark, marked against the mark scheme
Which of the following are the correct hypotheses for the inspector's test?
1 mark, marked against the mark scheme