Why Slope and Correlation Tests Can Agree
In simple linear regression, a slope describes the direction and size of the mean response’s change per unit increase in the predictor. Correlation describes the direction and strength of a linear association on a unit-free scale. When the regression model and sampling assumptions are appropriate, a test of whether the population slope is zero is equivalent to a test of whether the population correlation is zero. The equivalence is useful because it lets us express the same evidence in regression language or correlation language.
The equivalence is not a license to treat every dataset with a zero sample correlation as having no relationship. It concerns a particular linear parameter, and exact t inference also depends on the sampling model. In particular, a fixed-predictor regression analysis and a test about a population correlation do not automatically have the same interpretation.
For a random predictor with finite, positive variance, the key population relationship is \(\operatorname{Cov}(X,Y)=\beta_1\operatorname{Var}(X)\), provided the simple linear conditional-mean model holds and the errors have conditional mean zero. Thus a zero slope gives zero covariance and hence zero correlation when both variables have positive variance. Conversely, zero correlation gives zero covariance and therefore a zero slope. The bivariate normal assumption supplies the familiar exact t-test result for correlation; a zero-covariance equivalence by itself does not guarantee that result.
The Sample Statistics and Their Equivalence
Write the centered sums of squares and cross-products as
When \(S_{xx}>0\), the least-squares slope is \(b_1=S_{xy}/S_{xx}\). When both \(S_{xx}\) and \(S_{yy}\) are positive, the sample correlation is \(r=S_{xy}/\sqrt{S_{xx}S_{yy}}\). The residual sum of squares is \(SSE=\sum_{i=1}^n(y_i-\hat{y}_i)^2\), and \(MSE=SSE/(n-2)\) estimates the error variance.
The condition \(|r|<1\) is essential: it ensures that the residual sum of squares is positive, so \(MSE>0\) and the displayed statistics are defined. If \(|r|=1\), all observed points lie exactly on a straight line; the usual residual-based standard error is zero, and this t statistic is not defined. The case \(n=2\) is also excluded because there are no residual degrees of freedom.
Why the Statistics Match
The equality follows from the definitions of \(b_1\), \(r\), and the regression residual sum of squares. In simple linear regression with an intercept, the fitted values use the least-squares slope, so the residual sum of squares is the total centered variation in \(y\) minus the variation explained by the fitted line:
Since \(MSE=SSE/(n-2)\), substituting \(b_1=S_{xy}/S_{xx}\) into the slope statistic gives
The first factor in the final expression is exactly the sample correlation, including its sign. Therefore the two statistics have the same sign and magnitude, and—under the conditions for exact t inference—the same degrees of freedom, p-value, and test decision. The algebraic identity uses the sample definitions; the claim that the statistic has an exact t distribution requires the model assumptions stated above.
Worked Example: Checking Both Forms of the Statistic
Worked Example: Checking Both Forms of the Statistic
A hypothetical study records a response and predictor for \(n=8\) independent observations. The centered summaries are \(S_{xx}=20\), \(S_{yy}=45\), and \(S_{xy}=12\). Assume the simple linear model with independent normal errors of common positive variance. Calculate the slope t statistic and verify it using the sample correlation.
Method and conditions. Use the regression slope formula and then the correlation form. Here \(n=8>2\), both sums of squares are positive, and the calculated correlation will have magnitude below 1, so both forms are defined.
Step 1: Calculate the slope and correlation.
Step 2: Calculate the regression standard error. First,
There are \(n-2=6\) residual degrees of freedom, so \(MSE=37.8/6=6.3\). The estimated standard error of the slope is
Step 3: Calculate the slope statistic.
Step 4: Verify with the correlation form.
Both forms give \(t\approx1.0690\) with 6 degrees of freedom. The calculation checks the identity. The common mistake to avoid is writing \(\sqrt{20\cdot45}=900\): the product is 900, but its square root is 30.
Using the Equivalence for a Test
For a two-sided test, the hypotheses \(H_0:\beta_1=0\) versus \(H_A:\beta_1\ne0\) correspond to \(H_0:\rho=0\) versus \(H_A:\rho\ne0\) under the random-predictor model described above. A positive-slope alternative corresponds to a positive-correlation alternative, and a negative-slope alternative corresponds to a negative-correlation alternative. Because the statistics are identical, the same t critical value or p-value is used. State the target parameter and the model before interpreting the result; a correlation test is not automatically justified just because a regression line was fitted.
Worked Example: Testing a Zero Correlation and Slope
A hypothetical random-pair study measures two quantities on each of 12 independent subjects. Assume the pairs are sampled from a bivariate normal population and the sample correlation is \(r=0.65\). Test the null of zero population correlation, equivalently zero population regression slope, against a two-sided alternative at the 5% significance level.
Method and assumptions. Under the bivariate normal model, use the correlation-form statistic with \(n-2\) degrees of freedom. The same statistic tests the conditional regression slope.
Step 1: Set up the hypotheses and degrees of freedom. The hypotheses are \(H_0:\rho=0\) versus \(H_A:\rho\ne0\); equivalently, \(H_0:\beta_1=0\) versus \(H_A:\beta_1\ne0\). The degrees of freedom are \(12-2=10\).
Step 2: Calculate the statistic.
Step 3: Make the decision. For a two-sided test at level 0.05 with 10 degrees of freedom, the critical value is approximately \(2.228\). Since \(|2.7049|>2.228\), reject \(H_0\). The sample provides evidence of a nonzero population correlation and, under the stated model, a nonzero population slope.
The result is not a claim that one variable causes the other. It is evidence against a zero linear association under the assumed sampling model. The common mistake is to use the one-sided critical value for a two-sided alternative; the stated hypotheses require two tails.
What the Equivalence Does Not Say
A zero correlation does not prove independence, nor does it rule out a nonlinear relationship. In simple linear regression, the slope describes the linear component of the mean response. A curved pattern can have zero slope and zero correlation while still showing a strong dependence between the variables. Also, even where the population slope and correlation are both zero, an exact t test may fail if the normal-error or bivariate-normal assumptions do not hold.
The distinction between fixed and random predictors is another important exam point. With fixed \(x_i\), the exact regression t test concerns the slope conditional on those predictor values. It does not, by itself, test a population correlation, because the fixed design does not specify a population distribution for \(X\). For independently sampled random pairs under a bivariate normal model, the correlation is a population parameter and the two tests coincide.
Worked Example: Zero Correlation Does Not Rule Out a Relationship
Consider a hypothetical population consisting of five equally likely predictor-response pairs: \((-2,4),(-1,1),(0,0),(1,1),(2,4)\). Calculate the population linear slope and correlation, then interpret what they do and do not establish.
Method and common mistake. Compute the centered sums and apply the slope and correlation definitions. The trap is to interpret a zero result as proof of no relationship.
Step 1: Calculate the means. The predictor mean is \(\bar{x}=(-2-1+0+1+2)/5=0\), and the response mean is \(\bar{y}=(4+1+0+1+4)/5=2\).
Step 2: Calculate the centered sums. The predictor sum of squares is
The response deviations from 2 are \(2,-1,-2,-1,2\), so
The cross-product sum is
Step 3: Calculate slope and correlation.
Nevertheless, the response is exactly \(y=x^2\) at every listed point. There is a clear nonlinear relationship. These data do not satisfy a normal-error simple linear model, so the zero t statistic does not justify an exact t-test conclusion under that model. The correct interpretation is narrower: the linear slope and correlation are zero, while the variables are not independent and their relationship is not absent.
Conditions and Exam Traps
- Check the degrees of freedom. The regression t statistic uses \(n-2\), so exact inference requires \(n>2\).
- Check that the statistic exists. Require \(S_{xx}>0\), \(S_{yy}>0\), and \(|r|<1\) for the displayed identity in its usual finite form. Perfect sample correlation makes the residual-based statistic undefined.
- Distinguish algebra from distribution. The two expressions are algebraically equal when defined. An exact t reference distribution requires the stated normal-error assumptions for fixed-design regression or the bivariate normal model for random pairs.
- Do not overstate a null result. Failure to reject zero slope or zero correlation is not proof of no association, and a zero correlation cannot exclude curvature.
- Keep the parameter clear. A fixed-predictor model supports inference about a conditional regression slope; a population correlation requires a random-pair population model.
Check Your Understanding
For each question, state the relevant condition or calculation before interpreting the result.
- For \(n=9\), suppose \(S_{xx}=16\), \(S_{yy}=25\), and \(S_{xy}=8\). Calculate \(r\), \(SSE\), \(MSE\), and the common test statistic. (Answer: \(r=0.4000\), \(SSE=21\), \(MSE=3\), and \(t\approx1.1547\) with 7 degrees of freedom.)
- In an independent bivariate normal sample of size 11, \(r=0.60\). For a two-sided 5% test of zero correlation, calculate the statistic and state the decision using the 9-degree-of-freedom critical value \(2.262\). (Answer: \(t=0.60\sqrt{9}/\sqrt{0.64}=2.2500\); do not reject because \(2.2500<2.262\).)
- A regression sample has \(n=6\) and \(r=1\). Can the usual correlation-form t statistic be calculated? Explain the relevant condition. (Answer: No; \(|r|=1\) makes \(1-r^2=0\), so the statistic is undefined.)
- For equally likely pairs \((-1,1),(0,0),(1,1)\), the population correlation is zero. Does that establish independence? (Answer: No; \(Y=X^2\) for every pair, so there is a nonlinear deterministic relationship.)
- A regression study treats all predictor values as fixed and assumes independent normal errors with common variance. What parameter does its exact slope t test address, and does that alone define a population correlation? (Answer: It tests the conditional regression slope; no, a fixed-predictor model alone does not specify a random predictor population or its correlation.)