A sample correlation coefficient $r$ is never exactly $0$, even when two variables are completely unrelated β random variation always produces some apparent pattern. A hypothesis test decides whether the sample value of $r$ is far enough from $0$ to be convincing evidence of correlation in the whole population.
$\mathrm{H}_1: \rho > 0$ or $\mathrm{H}_1: \rho < 0$ (one-tailed) · $\mathrm{H}_1: \rho \neq 0$ (two-tailed)
| The claim in the question | Alternative hypothesis |
|---|---|
| "There is positive correlation" / "$y$ tends to increase with $x$" | $\mathrm{H}_1: \rho > 0$ |
| "There is negative correlation" / "$y$ tends to decrease as $x$ increases" | $\mathrm{H}_1: \rho < 0$ |
| "There is some correlation" / "the variables are related" (no direction) | $\mathrm{H}_1: \rho \neq 0$ |
The general language of hypothesis testing β significance level, critical value, "sufficient evidence" β is the same as in Year 1: see The Language of Hypothesis Testing.
If $\mathrm{H}_0$ is true, the sampling distribution of $r$ depends only on the sample size $n$. From it we get a critical value: the smallest value of $|r|$ that is significant at a given level. Exams provide these in a table β the values below were calculated from the $t$ distribution using $r_{\text{crit}} = \dfrac{t}{\sqrt{t^2 + n - 2}}$ with $n - 2$ degrees of freedom (you do not need this formula).
| $n$ | One tail $5\%$ | One tail $2.5\%$ | One tail $1\%$ | One tail $0.5\%$ |
|---|---|---|---|---|
| Two tails $10\%$ | Two tails $5\%$ | Two tails $2\%$ | Two tails $1\%$ | |
| 4 | 0.9000 | 0.9500 | 0.9800 | 0.9900 |
| 5 | 0.8054 | 0.8783 | 0.9343 | 0.9587 |
| 6 | 0.7293 | 0.8114 | 0.8822 | 0.9172 |
| 7 | 0.6694 | 0.7545 | 0.8329 | 0.8745 |
| 8 | 0.6215 | 0.7067 | 0.7887 | 0.8343 |
| 9 | 0.5822 | 0.6664 | 0.7498 | 0.7977 |
| 10 | 0.5494 | 0.6319 | 0.7155 | 0.7646 |
| 11 | 0.5214 | 0.6021 | 0.6851 | 0.7348 |
| 12 | 0.4973 | 0.5760 | 0.6581 | 0.7079 |
| 13 | 0.4762 | 0.5529 | 0.6339 | 0.6835 |
| 14 | 0.4575 | 0.5324 | 0.6120 | 0.6614 |
| 15 | 0.4409 | 0.5140 | 0.5923 | 0.6411 |
| 16 | 0.4259 | 0.4973 | 0.5742 | 0.6226 |
| 17 | 0.4124 | 0.4821 | 0.5577 | 0.6055 |
| 18 | 0.4000 | 0.4683 | 0.5425 | 0.5897 |
| 19 | 0.3887 | 0.4555 | 0.5285 | 0.5751 |
| 20 | 0.3783 | 0.4438 | 0.5155 | 0.5614 |
| 25 | 0.3365 | 0.3961 | 0.4622 | 0.5052 |
| 30 | 0.3061 | 0.3610 | 0.4226 | 0.4629 |
| 40 | 0.2638 | 0.3120 | 0.3665 | 0.4026 |
| 50 | 0.2353 | 0.2787 | 0.3281 | 0.3610 |
$\mathrm{H}_1: \rho < 0$ β reject $\mathrm{H}_0$ if $r \leqslant -r_{\text{crit}}$
$\mathrm{H}_1: \rho \neq 0$ β halve the significance level for each tail; reject if $|r| \geqslant r_{\text{crit}}$
- State $\mathrm{H}_0: \rho = 0$ and $\mathrm{H}_1$, defining $\rho$ as the population correlation coefficient between the two named variables.
- State the significance level and whether the test is one- or two-tailed.
- Find the critical value for the sample size $n$ (halving the level for a two-tailed test), or use a given $p$-value.
- Compare $r$ with the critical value (or the $p$-value with the significance level).
- Conclude in context, using non-assertive language: "there is sufficient evidence to suggestβ¦".
For a random sample of $10$ students, the correlation coefficient between time spent on homework and exam mark is $r = 0.62$. Test at the $5\%$ level whether there is positive correlation.
For $15$ towns, the correlation coefficient between altitude and mean January temperature is $r = -0.41$. Test at the $5\%$ level whether temperature tends to fall as altitude increases.
A researcher believes reaction time and age are related but does not predict a direction. For $20$ adults, $r = 0.47$. Test at the $5\%$ level.
Statistical software usually reports a $p$-value instead of comparing with a table. The $p$-value is the probability, if $\mathrm{H}_0$ is true, of a sample correlation at least as extreme as the one observed.
For a sample of $12$ cities, the correlation between population density and the percentage of journeys made by public transport is $r = 0.55$. Software gives a one-tailed $p$-value of $0.0320$. Test at the $5\%$ level and at the $1\%$ level whether there is positive correlation.
In Regression and Exponential Models, $8$ students' revision hours and scores gave $r = 0.991$. Test at the $1\%$ level whether there is positive correlation, and comment on using the regression line.
Null hypothesis
$\mathrm{H}_0: \rho = 0$ β always.
Alternatives
$\rho > 0$, $\rho < 0$ (one tail) or $\rho \neq 0$ (two tails).
$\rho$ vs $r$
$\rho$ population (hypotheses); $r$ sample (test statistic).
Critical value
Depends on $n$ and the level; from the table.
Two-tailed
Halve the significance level for each tail.
$p$-value
Reject $\mathrm{H}_0$ if $p <$ significance level.
Assumption
Random sample from a bivariate normal population.
Conclusion
In context; "evidence to suggest", never "proves".
Causation
Significant correlation still does not show cause.
Ten questions, from routine to exam-style. Use the table of critical values in Section 2.
A biologist wants to test the claim that the longer a plant's leaves, the taller it grows. Write suitable hypotheses, defining any symbols.
βΆ Show solution
$\mathrm{H}_0: \rho = 0$, $\mathrm{H}_1: \rho > 0$,
where $\rho$ is the population product moment correlation coefficient between leaf length and plant height.
A sample of size $8$ gives $r = 0.65$. Test at the $5\%$ level for positive correlation.
βΆ Show solution
$\mathrm{H}_0: \rho = 0$, $\mathrm{H}_1: \rho > 0$. Critical value ($n = 8$, $5\%$ one tail) $= 0.6215$.
$0.65 > 0.6215$: reject $\mathrm{H}_0$. There is sufficient evidence to suggest positive correlation.
For $25$ cars, the correlation between engine size and fuel economy (miles per gallon) is $r = -0.30$. Test at the $5\%$ level whether there is negative correlation.
βΆ Show solution
$\mathrm{H}_0: \rho = 0$, $\mathrm{H}_1: \rho < 0$. Critical region $r \leqslant -0.3365$.
$-0.30 > -0.3365$: not in the critical region, do not reject $\mathrm{H}_0$.
There is insufficient evidence at the $5\%$ level to suggest negative correlation between engine size and fuel economy.
For $30$ pairs of observations, $r = 0.39$. Test at the $5\%$ level whether there is correlation (in either direction).
βΆ Show solution
$\mathrm{H}_0: \rho = 0$, $\mathrm{H}_1: \rho \neq 0$. Two-tailed $5\%$, so $2.5\%$ in each tail: critical value $0.3610$.
$|0.39| \geqslant 0.3610$: reject $\mathrm{H}_0$. There is sufficient evidence of correlation.
A test of $\mathrm{H}_0: \rho = 0$ against $\mathrm{H}_1: \rho > 0$ gives a $p$-value of $0.032$. State the conclusion at (a) the $5\%$ level, (b) the $2.5\%$ level.
βΆ Show solution
(a) $0.032 < 0.05$: reject $\mathrm{H}_0$ β evidence of positive correlation.
(b) $0.032 > 0.025$: do not reject $\mathrm{H}_0$ β insufficient evidence.
For a sample of $40$, $r = 0.25$. Test for positive correlation at (a) the $1\%$ level, (b) the $5\%$ level. Comment.
βΆ Show solution
(a) Critical value $0.3665$; $0.25 < 0.3665$: do not reject $\mathrm{H}_0$.
(b) Critical value $0.2638$; $0.25 < 0.2638$: do not reject $\mathrm{H}_0$.
Even at $5\%$ the result is not significant, though it is close. (At $10\%$ one tail it would be: the critical value there is $0.2070$.)
Explain why $r = 0.7$ is significant at the $5\%$ level (one tail) for a sample of $10$ but not for a sample of $6$.
βΆ Show solution
Critical values: $n = 10$ gives $0.5494$; $n = 6$ gives $0.7293$.
With only a few points, a high $r$ can easily happen by chance when there is no real correlation, so a larger $r$ is needed before it counts as evidence. $0.7 > 0.5494$ but $0.7 < 0.7293$.
For six days, hours of sunshine $x$ and cold drinks sold $y$ (in tens) were: $(3, 14)$, $(5, 19)$, $(6, 21)$, $(8, 26)$, $(9, 27)$, $(11, 33)$. Calculate $r$ and test at the $1\%$ level for positive correlation.
βΆ Show solution
Calculator: $r = 0.997$ (3 s.f.).
$\mathrm{H}_0: \rho = 0$, $\mathrm{H}_1: \rho > 0$; $n = 6$, $1\%$ one tail: critical value $0.8822$.
$0.997 > 0.8822$: reject $\mathrm{H}_0$. Strong evidence of positive correlation between sunshine and drinks sold.
A researcher expects a sample correlation of about $0.45$. Using the table, find the smallest sample size for which $r = 0.45$ would be significant evidence of positive correlation at the $5\%$ level.
βΆ Show solution
Need the critical value to be at most $0.45$.
$n = 14$: $0.4575 > 0.45$ (not significant). $n = 15$: $0.4409 \leqslant 0.45$ (significant).
Smallest sample size: $n = 15$.
A teacher thinks that students' marks in a mock exam and in the final exam are related. For a random sample of $18$ students, $r = 0.48$, and software gives a two-tailed $p$-value of $0.0438$.
(a) State suitable hypotheses. (b) Carry out the test at the $5\%$ level using the $p$-value. (c) Confirm your conclusion using a critical value. (d) The teacher claims this shows that doing well in the mock causes students to do well in the final exam. Comment. (e) State an assumption needed for the test to be valid.
βΆ Show solution
(a) No direction is predicted: $\mathrm{H}_0: \rho = 0$, $\mathrm{H}_1: \rho \neq 0$, where $\rho$ is the population correlation coefficient between mock and final marks.
(b) Two-tailed $p$-value $0.0438 < 0.05$: reject $\mathrm{H}_0$. There is sufficient evidence at the $5\%$ level to suggest a correlation between mock and final marks.
(c) Two-tailed $5\%$, $n = 18$: critical value $0.4683$. $|0.48| \geqslant 0.4683$, so reject $\mathrm{H}_0$ β
(d) Correlation does not imply causation. Both marks are likely to depend on the student's underlying ability and effort, so the mock need not cause the final result.
(e) The students are a random sample from a population in which the marks have a bivariate normal distribution.