A Link Between Slope and Correlation
In “Positive and Negative Slopes in Context,” you learned that the sign of the regression slope \(b\) describes the direction of the line’s predicted response as the predictor increases. In earlier tutorials on correlation, you learned that the sign of \(r\) describes the direction of the linear association. These two signs are connected: when both variables vary, a least-squares regression line with a positive slope has a positive correlation, and one with a negative slope has a negative correlation.
The size of the slope and the size of the correlation answer different questions. The slope is measured in response units per predictor unit, while \(r\) is unitless and summarizes the direction and strength of the linear association. The relationship between them includes the standard deviations of the two variables.
Because standard deviations are positive whenever their variables vary, the ratio \(s_y/s_x\) is positive. Multiplying \(r\) by this positive ratio cannot reverse its sign. Therefore, when both variables vary, \(b\) and \(r\) have the same sign. If \(r=0\), the slope is also zero.
This sign relationship is useful as a check. If a scatterplot has a clear downward linear direction, its correlation should be negative and the least-squares slope should be negative. If a reported slope and correlation have opposite signs, check whether the variables were assigned consistently, the equation was copied correctly, or a value was entered incorrectly.
Why the Signs Match
The formula follows from the standard definitions used for correlation and the least-squares slope. Let \(S_{xx}\) be the sum of the squared deviations of the predictor values from their mean, and let \(S_{xy}\) be the sum of the products of paired deviations:
When the predictor varies, the least-squares slope is \(b=S_{xy}/S_{xx}\). When both variables vary, the sample standard deviations and correlation give \(s_x^2=S_{xx}/(n-1)\) and \(r=S_{xy}/((n-1)s_xs_y)\). Substitute these expressions into \(r(s_y/s_x)\):
The cancellation is valid when both variables vary, so \(s_x\) and \(s_y\) are positive. The key sign fact is simpler than the full calculation: \(s_y/s_x\) is positive, so \(r(s_y/s_x)\) has the same sign as \(r\). The factor changes the numerical size to account for the variables’ measurement scales; it does not change the direction.
Using the Relationship with Summary Statistics
The formula can connect a correlation to a slope when the standard deviations are known. It can also check whether the direction of a reported slope is consistent with the correlation. Remember that the slope’s units are response units per predictor unit, as explained in “Slope Units and Rates of Change.” The ratio \(s_y/s_x\) has exactly those units.
Worked Example: Sunlight and Seedling Height
A fictional greenhouse sample records \(x\), daily hours of sunlight, and \(y\), seedling height in centimeters. The sample correlation is \(r=0.75\), the sample standard deviation of sunlight is \(s_x=4\) hours, and the sample standard deviation of height is \(s_y=12\) centimeters. Find the least-squares slope and explain what its sign tells you.
Both variables vary, so apply the relationship:
The slope is positive, matching the positive correlation. In context, for each additional hour of daily sunlight, the line predicts a 2.25-centimeter increase in seedling height. This is a description of the fitted line’s predicted response, not a claim that every seedling grows by exactly that amount or that sunlight alone causes the difference.
The sign check can be done separately from the arithmetic: \(s_y/s_x\) is positive, so multiplying \(r=0.75\) by it must produce a positive slope. If the calculation had produced a negative slope, that would signal an arithmetic or input error.
Worked Example: Screen Time and Sleep
In a fictional sample of students, let \(x\) be recreational screen time on a typical evening, in hours, and \(y\) be sleep that night, in hours. Suppose \(r=-0.60\), \(s_x=2\) hours, and \(s_y=5\) hours. Calculate the slope and interpret its direction.
Use \(s_y/s_x\) as the positive conversion factor from predictor units to response units:
The slope is negative, just like \(r\). The line predicts 1.5 fewer hours of sleep for each additional hour of recreational screen time in the evening. The units show why the standard deviation ratio matters: although both measurements use hours, they refer to different variables, and the slope is a rate of predicted sleep change per screen-time hour.
The interpretation concerns the observed linear pattern represented by the model. It does not say that each student who spends another hour on a screen will necessarily lose 1.5 hours of sleep. Other variables could be related to both screen time and sleep, and an association alone does not establish causation.
Zero Correlation and a Zero Slope
When both variables vary, the formula also explains the case \(r=0\). The ratio \(s_y/s_x\) is positive, and \(0\) multiplied by that ratio is \(0\). Thus, the least-squares slope is zero. The fitted line is horizontal: its predicted response does not change as the predictor increases.
A zero correlation describes no linear association in the data; it does not prove that the variables have no relationship of any kind. As discussed in “Correlation Measures Only Linear Association,” a curved pattern can exist even when the linear correlation is zero.
Worked Example: Delivery Distance and Customer Rating
A fictional delivery service examines \(x\), delivery distance in kilometers, and \(y\), a customer rating on a numerical scale. In a sample, both variables vary, with \(s_x=3\) kilometers, \(s_y=1.2\) rating points, and \(r=0\). Find the slope and describe what the result says about the fitted line.
The slope is zero, so the least-squares line is horizontal. Based on this linear model, predicted customer ratings do not increase or decrease as delivery distance increases. This does not rule out a curved or more complicated pattern in the data; the scatterplot should still be examined before making a broader description.
Here both variables vary, so \(r\) is defined and the formula applies. That detail matters: the relationship between the signs is not a claim that every zero slope must come from a defined correlation.
When One Variable Does Not Vary
The formula \(b=r(s_y/s_x)\) requires both variables to vary. If either variable is constant, its standard deviation is zero and the correlation is undefined. The slope’s status, however, depends on which variable is constant.
- If \(x\) does not vary, there is no horizontal spread in the predictor values. The least-squares slope is undefined because its denominator \(S_{xx}\) is zero. The correlation is also undefined.
- If \(y\) is constant but \(x\) varies, the least-squares slope is defined and equals zero: every response value is the same, so the fitted line is horizontal. The correlation is undefined because \(s_y=0\). Do not use the formula involving \(r\) in this case.
This distinction prevents a common overgeneralization. It is accurate to say the slope and correlation have the same sign when both variables vary. It is not accurate to say that the slope is always undefined whenever either variable is constant. When the response is constant and the predictor varies, the slope is zero even though \(r\) is undefined.
Check for a Sign Mismatch
The relationship gives a quick consistency check among a scatterplot, a correlation, and a regression equation. For the same paired observations, with \(x\) as the predictor and \(y\) as the response, their directions should agree: an upward linear pattern goes with positive \(r\) and positive \(b\), while a downward linear pattern goes with negative \(r\) and negative \(b\).
If the reported signs do not agree, do not try to explain the disagreement as a normal feature of regression. First check that the same observations and variables are being used, that the response and predictor have not been switched, and that the signs were copied correctly. Also check whether an axis or variable was transformed in a way that reverses direction. As noted in “Effect of Changing Units on \(r\),” multiplying exactly one variable by a negative number reverses the correlation’s sign; the direction of a regression slope changes consistently when the variable values themselves are reversed.
Worked Example: Checking a Reported Direction
A fictional environmental report models \(y\), daily stream turbidity in measurement units, from \(x\), hours since rainfall. It reports \(r=-0.50\), \(s_x=4\) hours, \(s_y=6\) turbidity units, and a slope of \(+0.75\) turbidity units per hour. Check whether the reported slope agrees with the other summaries.
Calculate the slope implied by the correlation and standard deviations:
The implied slope is negative, but the reported slope is positive. The values therefore do not agree. Since \(s_y/s_x\) is positive, a negative correlation cannot produce a positive slope for the same data with the same predictor and response. The report should be checked for a transcription error, a reversed variable assignment, or summaries taken from different analyses. From the information given, we can identify the inconsistency but cannot know which reported value is wrong.
Common Mistakes and AP Exam Tips
- Thinking the slope and correlation have the same numerical value. They have the same sign when both variables vary, but their magnitudes differ by the factor \(s_y/s_x\). The slope also has units; \(r\) does not.
- Ignoring which standard deviation goes where. Use the response standard deviation in the numerator and the predictor standard deviation in the denominator: \(s_y/s_x\). This produces response units per predictor unit.
- Claiming the formula applies when a variable is constant. State that both variables must vary for the identity involving \(r\) to apply. If \(y\) is constant and \(x\) varies, the slope is zero but \(r\) is undefined.
- Calling a zero correlation no relationship. It indicates no linear association, not necessarily no association. A curved pattern may still be present.
- Interpreting the slope as a guaranteed individual change. Describe what the regression line predicts for a one-unit increase in the predictor. Do not claim every individual follows that exact change.
- Overlooking a sign mismatch. For full-credit reasoning, connect the signs explicitly: the standard deviation ratio is positive, so \(b\) must have the same sign as \(r\) when both variables vary. If they disagree, identify what should be checked.
A concise AP-style explanation could say: “Because \(s_y/s_x\) is positive, \(b=r(s_y/s_x)\) has the same sign as \(r\). Thus, the negative correlation corresponds to a negative slope, meaning the line predicts a lower response as the predictor increases.” Add the variable names and units when interpreting a particular situation.
Check Your Understanding
Use the relationship between slope, correlation, and standard deviations. Remember to check whether both variables vary.
- A sample has \(r=0.40\), \(s_x=5\), and \(s_y=10\). Find the slope and state its sign.
- A sample has a negative correlation, and both variables vary. What must be true about the least-squares slope? Explain why.
- If both variables vary and \(r=0\), what is the slope? What does that say about the fitted line?
- The predictor varies, but every response value is identical. Is the slope defined? Is the correlation defined? Explain.
- A report gives a negative correlation and a positive slope for the same predictor and response. Name two checks that could help locate the inconsistency.