Mathematics/Lessons/Hypothesis Testing/Testing for Correlation
Statistics · Hypothesis Testing · Year 2

Testing for Correlation

A scatter diagram can suggest a relationship, but only a formal test can say whether it's likely to be more than coincidence.

9 min read 3 worked examples

The product-moment correlation coefficient

The product-moment correlation coefficient (PMCC), $r$, is calculated from a bivariate sample — the same $r$ introduced earlier as something to interpret is now something a sample can estimate. A sample's $r$ can be nonzero purely by chance, even if the true population has no correlation at all — a hypothesis test decides whether the sample's $r$ is unusual enough to conclude the population correlation, $\rho$, is genuinely nonzero.

Setting up the test

The population parameter being tested is $\rho$ (the true, population-level correlation coefficient). The hypotheses are always about $\rho$:

$H_0: \rho=0$ — no linear correlation in the population.
$H_1: \rho\neq0$ (two-tailed), or $\rho>0$ / $\rho<0$ (one-tailed), depending on the wording.

The test statistic is the sample's own PMCC, $r$, computed from the paired data. Rather than a formula, its critical value is read from a table of critical values of the PMCC, based on the sample size $n$ and the significance level.

Why H₀ is always ρ = 0

Testing "no correlation" as the null hypothesis mirrors every other hypothesis test in this course: $H_0$ states the "nothing interesting is happening" scenario, and the test asks whether the data gives strong enough evidence to move away from it. A nonzero sample $r$ is expected even under $H_0$, purely from natural sampling variation — the test's job is judging whether the observed $r$ is bigger than that natural variation would typically produce.

Reaching a conclusion

Compare the sample's $|r|$ (or $r$ directly, for a one-tailed test in a specific direction) against the critical value from the table. If it exceeds the critical value, reject $H_0$ — there is evidence of genuine correlation in the population. Otherwise, there is insufficient evidence.

Strategy — larger samples need smaller r to be significant

Critical value tables show that as $n$ increases, the critical value of $r$ needed for significance decreases. A modest correlation is much stronger evidence with a large sample than the same correlation would be with a small one — small samples can easily produce a large $r$ purely by chance.

Worked example 1

A two-tailed correlation test
A sample of $n=12$ pairs gives a PMCC of $r=0.61$. Test, at the 5% significance level, whether there is evidence of correlation in the population. (Critical value for $n=12$ at 5%, two-tailed: $0.576$.)
MethodState hypotheses, compare |r| to the critical value, then conclude
1
$H_0: \rho=0$, $H_1: \rho\neq0$.
Testing for any correlation, in either direction.
2
$|r| = 0.61$. Critical value $=0.576$.
Compare the sample statistic to the table value.
3
Since $0.61>0.576$, there is sufficient evidence to reject $H_0$.
The observed correlation exceeds what's needed for significance.
4
There is evidence, at the 5% level, of genuine correlation between the two variables in the population.
Conclusion in context.
▪ concluded
Examiner's eye

For a two-tailed test, compare $|r|$ (the magnitude) against the table's critical value — the sign of $r$ tells you the direction of any correlation found, but doesn't affect whether the result is significant.

Worked example 2

A one-tailed correlation test
A researcher believes that as advertising spend increases, sales increase too, and tests this specific claim with $n=15$ pairs, finding $r=0.42$. At the 5% level, the one-tailed critical value for $n=15$ is $0.441$. Test the researcher's claim.
MethodState a one-sided H₁, then compare r directly (not |r|)
1
$H_0: \rho=0$, $H_1: \rho>0$ — the researcher specifically expects positive correlation.
"As spend increases, sales increase" specifies a direction.
2
$r=0.42$. Critical value (one-tailed, 5%) $=0.441$.
Compare against the one-tailed table value.
3
Since $0.42<0.441$, there is insufficient evidence to reject $H_0$.
The sample r falls short of the required threshold.
4
There is not enough evidence, at the 5% level, to conclude that advertising spend and sales are positively correlated in the population.
Conclusion in context — note this doesn't prove no correlation exists.
▪ concluded
The key insight

A one-tailed critical value is smaller than the corresponding two-tailed one at the same significance level (since all the "risk budget" sits on one side) — but the sample's $r$ must also genuinely be positive (matching $H_1$'s direction) for a rejection to make sense; a strongly negative $r$ could never support $H_1:\rho>0$, however large its magnitude.

Worked example 3

Interpreting "insufficient evidence" correctly · Challenge
A test finds insufficient evidence to reject $H_0:\rho=0$ for a sample relating hours of exercise to resting heart rate. A student concludes "this proves there is no relationship between exercise and heart rate." Explain why this conclusion overstates what the test has shown.
MethodRecall what "not rejecting H₀" actually means
1
Failing to reject $H_0$ means the sample didn't provide strong enough evidence against it — not that $H_0$ has been proven true.
The fundamental limit of any hypothesis test.
2
A genuine (but weaker, or nonlinear) relationship could still exist between the variables without producing a large enough linear PMCC to be detected by this test, especially with a small sample.
The test only checks for a specific kind of evidence (linear correlation, given the sample size).
3
A more accurate conclusion: "there is insufficient evidence, from this sample, of linear correlation" — not a categorical claim that no relationship exists.
Matches exactly what the test can and can't establish.
▪ explained
Look deeper — this is a universal feature of hypothesis testing

This limitation isn't specific to correlation testing — every hypothesis test in this course can only ever provide evidence against $H_0$, never proof for it. "Insufficient evidence to reject" is a statement about the strength of the sample's evidence, not a verdict on the underlying truth.

Common mistake

Never confuse the population parameter $\rho$ with the sample statistic $r$ — hypotheses are always written in terms of $\rho$ (what's true of the population), while $r$ (calculated from the sample) is the evidence used to test them. Writing "$H_0: r=0$" is a common but incorrect notational slip.

Check yourself

A sample of $n=10$ pairs gives $r=-0.68$. Test, at the 5% level, $H_0:\rho=0$ against $H_1:\rho\neq0$, given a two-tailed critical value of $0.632$ for $n=10$.
(Hint: for a two-tailed test, compare |r| against the critical value.)

Method
1
$|r|=0.68>0.632$.
2
Sufficient evidence to reject $H_0$ — there is evidence of correlation (negative) in the population.
|r| exceeds the critical value.
▪ solved