Statistics › Section L · Linear regression and correlation › Topic L.4
Testing the significance of correlation
One sample gives one regression line - but another sample would give another. Is the observed relationship real, or the luck of this particular scatter? Inference answers with the familiar machinery: a t test on the correlation or, equivalently, the slope, a confidence interval, and the same reading habits as ever.
Is the line real?
Every regression line so far was fitted to one sample, and a different sample would have produced a slightly different slope. The inferential question is whether the underlying relationship exists at all: is the population's slope genuinely nonzero, or did this sample's scatter suggest a pattern where none exists? The answer runs on the same logic as every test in this course - hypothesis, statistic, p-value, verdict - with one new population model to write down first.
The population regression model
Behind the sample line, imagine a true line for the whole population: \(\mu_y = \beta_0 + \beta_1x\), with individual responses scattering around it with roughly constant spread. The sample's \(b_1\) estimates \(\beta_1\); the sample's residuals estimate that scatter. The conditions are remembered as LINE: Linear pattern, Independent observations, Normal residuals, Equal spread across \(x\) - checks the residuals topic ahead makes routine. Under \(H_0: \beta_1 = 0\) the population's line is flat: \(x\) predicts nothing.
Testing the slope
The test statistic is the slope over its own standard error:
with \(n - 2\) degrees of freedom - two, not one, because fitting a line spends two estimates: the slope and the intercept. Software reports \(SE_{b_1}\), the \(t\), and the p-value in every regression table. And one equivalence is worth noticing: testing \(\beta_1 = 0\) is the same as testing whether the population correlation \(\rho\) is zero - a flat true line means no linear relationship, in either vocabulary. The two-sided alternative asks whether the relationship exists; a one-sided test would need a directional claim stated in advance.
Worked example: testing r directly
The same test can start from the correlation alone:
and it gives exactly the same \(t\) as \(b_1/SE_{b_1}\) for the same data. The correlation topic's five students had \(r \approx 0.775\) between study hours and scores. 1. \(H_0: \rho = 0\); \(H_a: \rho \ne 0\). 2. Substitute, with \(r^2 \approx 0.6006\):
3. With df = 3, the two-sided \(p \approx 0.12\): fail to reject. Check: a strong-looking \(r\) from only five points is weak evidence, because tiny samples produce sizeable correlations by chance surprisingly often.
Worked example: is the study-time slope real?
A course predicts exam scores from study hours for \(n = 30\) students: the fitted slope is \(b_1 = 4.2\) points per hour with \(SE_{b_1} = 0.85\). Is there a real linear relationship? 1. \(H_0: \beta_1 = 0\); \(H_a: \beta_1 \ne 0\) - two-sided. 2. Conditions: LINE checked against a plot of the residuals against \(x\) (random scatter, no fan). 3. \(t = \frac{4.2}{0.85} \approx 4.94\) with df = 28. 4. Two-sided \(p < 0.001\): reject overwhelmingly - convincing evidence of a real linear relationship, with scores rising by about 4.2 points per additional hour studied in this course's population.
The confidence interval for the slope
The test's verdict deserves its companion interval:
with \(t^*\) at df = \(n - 2\) - 2.048 for 95% at df 28. For the study-time example: \(4.2 \pm 2.048 \times 0.85 \approx 4.2 \pm 1.74\), giving about \((2.5, 5.9)\) points per hour. Interpretation: we are 95% confident that each additional hour is associated with a score gain somewhere between about 2.5 and 5.9 points. The interval excludes 0, agreeing with the test - and it SIZES the effect, which the p-value cannot: the plausible gain could be modest or substantial, and a course designer should see both ends.
Worked example: reading the two together
A marketing study fits sales against advertising spend for \(n = 25\) stores: \(b_1 = 1.8\) thousand dollars of sales per thousand dollars of advertising, \(SE_{b_1} = 0.9\). 1. \(t = \frac{1.8}{0.9} = 2.0\) with df = 23. 2. Two-sided p-value at \(t = 2.0\), df 23: about 0.058. 3. Verdict at \(\alpha = 0.05\): fail to reject - suggestive, not convincing at this sample size. 4. Interval: \(1.8 \pm 2.069 \times 0.9 \approx (−0.06, 3.66)\): the plausible slope spans zero, from a tiny negative to a healthy positive. Check: interval spanning 0 and p exceeding 0.05 agree, exactly as the duality promises - and the honest report is "uncertain, worth a larger study", not "no effect".
Conditions before p-values
The LINE conditions are what license the \(t\) machinery, and each has its diagnostic. Linear: the residual plot shows random scatter, not a curve. Independent: observations do not influence each other (repeated measures on the same units are a different design). Normal residuals: needed for the p-value's exactness, reasonably safe at larger \(n\). Equal spread: a fan-shaped residual plot means prediction errors grow with \(x\), and the SE-based p-value quietly misstates. The habit, developed fully in the residuals topic: plot the residuals, then trust the table.
Common mistakes to avoid
First, wrong degrees of freedom: \(n - 2\) for a slope test - two estimates, two losses. Second, treating a small p-value as a large effect: a slope can be significant yet small, and only the interval says how large - the study-time interval runs from a modest 2.5 to a substantial 5.9 points per hour. Third, skipping the residual plot: a curved relationship can produce a "significant" slope that is the wrong model entirely. Fourth, reading the slope's p-value as the correlation's proof of causation - significance makes the association real, not causal. Fifth, one-sided tests chosen after seeing the data. Sixth, comparing p-values across studies with different \(n\): significance tracks sample size, and the intervals carry the comparison.
Key takeaways
Inference for regression asks whether the population's line is flat. The model: \(\mu_y = \beta_0 + \beta_1x\) with LINE conditions - linear, independent, normal residuals, equal spread. The test: \(t = b_1/SE_{b_1}\) on \(n - 2\) degrees of freedom, equivalent to testing \(\rho = 0\) with \(t = r\sqrt{n-2}/\sqrt{1-r^2}\) (five students with \(r = 0.775\): \(t \approx 2.12\), \(p \approx 0.12\)); the study-time example gives \(t = 4.94\), df 28, \(p < 0.001\) - real. The companion interval \(b_1 \pm t^* SE_{b_1}\): (2.5, 5.9) points per hour, sizing what the p-value only certifies. The marketing example shows the other verdict: \(t = 2.0\), \(p \approx 0.058\), interval spanning 0 - uncertain, not absent. Significance makes an association real; the interval says what it is worth.
Flashcards
Flashcard
The population regression line
Test your understanding
Question 1 of 5
A slope test uses which degrees of freedom?
Question 2 of 5
Five students give r ≈ 0.775. The test statistic t = r√(n − 2)/√(1 − r²) is about:
Question 3 of 5
The 95% interval for the study-time slope comes out (2.5, 5.9) points per hour. This means:
Question 4 of 5
Testing H0: β1 = 0 is equivalent to testing:
Question 5 of 5
A slope test gives t = 2.0 at df 23 (p ≈ 0.058). At α = 0.05, the honest conclusion:
