How Changing Values Can Affect \(r\)
In “Correlation Has No Units,” you saw that changing measurement units by multiplying values by a positive scale factor does not change \(r\). This tutorial extends that idea: adding a constant also leaves \(r\) unchanged, while multiplying one variable by a negative number reverses the sign of the correlation.
These properties are useful when measurements are recentered, rescaled, or recorded in a reversed direction. For instance, adding 10 to every recorded value changes the numbers but not their relative positions. Multiplying values by \(-1\), however, reverses their order: values that were above the mean become below it, and vice versa.
To make the effects precise, let the original paired observations be \((x_i,y_i)\). Suppose the values are transformed to \(x_i^*=a+bx_i\) and \(y_i^*=c+dy_i\), where \(a,b,c,\) and \(d\) are constants. The correlation is defined only when both variables have some variation. When \(b\) and \(d\) are nonzero, the relationship between the original and transformed correlations is
The constants \(a\) and \(c\), which shift the variables, do not appear in the formula. The signs of the multipliers \(b\) and \(d\) determine whether \(r\) keeps or reverses its sign. If both multipliers are positive, or both are negative, the sign stays the same. If exactly one is negative, the sign flips.
Why Shifting Values Leaves \(r\) Unchanged
Adding a constant to every value shifts the mean by that same constant. For example, if \(x_i^*=x_i+10\), then \(\bar{x}^*=\bar{x}+10\). Subtracting the new mean from each transformed value cancels the added constant:
Correlation is calculated using deviations from the means. Because each \(x\)-deviation stays exactly the same after a shift, the sum of squared \(x\)-deviations and the sum of paired deviation products stay the same as well. The same reasoning applies to shifting \(y\). You can add different constants to the two variables without changing their correlation.
Worked Example: Adding Constants to Both Variables
A fictional group records the number of practice sessions completed by four students and their scores on a short skills check. The paired values are \((1,2)\), \((2,3)\), \((3,5)\), and \((4,4)\). A data-entry system then adds 10 to every session count and subtracts 2 from every score. Does that change \(r\)?
Find the original correlation. The means are \(\bar{x}=2.5\) sessions and \(\bar{y}=3.5\) points. The \(x\)-deviations are \(-1.5,-0.5,0.5,1.5\), and the \(y\)-deviations are \(-1.5,-0.5,1.5,0.5\). Thus \(S_{xx}=2.25+0.25+0.25+2.25=5\), \(S_{yy}=2.25+0.25+2.25+0.25=5\), and \(S_{xy}=2.25+0.25+0.75+0.75=4\).
The original correlation is
Apply the shifts. The transformed variables are \(x^*=x+10\) and \(y^*=y-2\). Their means are \(12.5\) sessions and \(1.5\) points. Since each variable and its mean have shifted by the same amount, the deviations remain \(-1.5,-0.5,0.5,1.5\) for \(x^*\) and \(-1.5,-0.5,1.5,0.5\) for \(y^*\). So the three sums remain \(S_{xx}=5\), \(S_{yy}=5\), and \(S_{xy}=4\), giving \(r^*=4/\sqrt{25}=0.80\).
The values and means have changed, but the deviations that determine the correlation have not. Adding constants leaves \(r\) unchanged.
Multiplying by a Positive Number
Now suppose each \(x\)-value is multiplied by a number \(b\). The transformed mean is \(b\bar{x}\), so each transformed deviation is \(b\) times its original deviation:
If \(b\) is positive, the deviation keeps its direction: a value above the mean remains above the mean, and a value below the mean remains below it. The size of each deviation changes, but that change is accounted for in both the numerator and denominator of the correlation formula. Therefore, \(r\) is unchanged. This is the same positive-rescaling principle used for unit conversions in “Correlation Has No Units.”
The same reasoning applies if \(y\) is also multiplied by a positive number. Even if the two variables are rescaled by different amounts, the effects cancel in the correlation formula. The numerical values of \(r\), its sign, and its magnitude all stay the same.
Worked Example: Multiplying Both Variables by Positive Numbers
A fictional set of four observations records a device’s setting \(x\) and its output \(y\): \((1,4)\), \((2,2)\), \((3,3)\), and \((4,1)\). The setting is multiplied by 4 and the output is multiplied by \(0.5\). Compare the correlation before and after these positive rescalings.
Calculate the original value. Both means are \(2.5\). The \(x\)-deviations are \(-1.5,-0.5,0.5,1.5\), and the \(y\)-deviations are \(1.5,-0.5,0.5,-1.5\). Therefore, \(S_{xx}=5\), \(S_{yy}=5\), and \(S_{xy}=-2.25+0.25+0.25-2.25=-4\). The original correlation is \(r=-4/\sqrt{25}=-0.80\).
Rescale and recalculate. Let \(x^*=4x\) and \(y^*=0.5y\). Each paired deviation product is multiplied by \(4(0.5)=2\), so \(S_{xy}^*=2(-4)=-8\). The squared \(x\)-deviations are multiplied by \(4^2=16\), giving \(S_{xx}^*=16(5)=80\). The squared \(y\)-deviations are multiplied by \(0.5^2=0.25\), giving \(S_{yy}^*=0.25(5)=1.25\). Thus
The denominator is 10, as a direct check confirms, so the transformed correlation remains \(-0.80\). The measurements have been rescaled by positive factors, but the linear direction and strength are unchanged.
Multiplying by a Negative Number
A negative multiplier changes more than the size of the deviations: it reverses their direction. If \(x_i^*=-x_i\), then a value above the original mean becomes below the transformed mean. Every \(x\)-deviation changes sign, while its square does not. As a result, \(S_{xx}\) stays the same, but each paired deviation product changes sign, so \(S_{xy}\) changes sign. The denominator of \(r\) remains positive, and the correlation changes sign.
More generally, multiplying one variable by \(-k\), where \(k\) is positive, flips the sign but preserves the magnitude of \(r\). Adding a constant before or after that multiplication does not change this result. In contrast, multiplying both variables by negative numbers reverses both sets of deviations, so the paired products keep their signs and \(r\) is unchanged.
Worked Example: Reversing One Variable’s Direction
A fictional data set pairs four study-time categories, coded as \(x=1,2,3,4\), with task scores \(y=1,3,2,4\). Someone recodes the study variable as \(x^*=-3x+8\). This reverses its direction and changes its scale. What happens to the correlation?
Find the original correlation. Both original means are \(2.5\). The \(x\)-deviations are \(-1.5,-0.5,0.5,1.5\); the \(y\)-deviations are \(-1.5,0.5,-0.5,1.5\). Thus \(S_{xx}=5\), \(S_{yy}=5\), and \(S_{xy}=2.25-0.25-0.25+2.25=4\). Therefore \(r=4/\sqrt{25}=0.80\).
Transform \(x\). The multiplier is \(-3\), and the added constant 8 has no effect on correlation. The transformed mean is \(\bar{x}^*=-3(2.5)+8=0.5\). The transformed values are \(5,2,-1,-4\), whose deviations from \(0.5\) are \(4.5,1.5,-1.5,-4.5\). These equal \(-3\) times the original \(x\)-deviations. Therefore \(S_{xx}^*=9(5)=45\), \(S_{xy}^*=-3(4)=-12\), and \(S_{yy}\) remains 5. The new correlation is
The check is consistent: the denominator is \(\sqrt{225}=15\), and the numerator is \(-12\). The negative multiplier reverses the sign, while its size and the added constant do not affect the correlation’s magnitude.
Worked Example: Multiplying Both Variables by Negative Numbers
Use the original pairs from the practice-session example: \((1,2)\), \((2,3)\), \((3,5)\), and \((4,4)\), for which \(S_{xx}=5\), \(S_{yy}=5\), \(S_{xy}=4\), and \(r=0.80\). Now transform both variables using \(x^*=-x\) and \(y^*=-2y\).
The new paired-deviation products are multiplied by \((-1)(-2)=2\), so \(S_{xy}^*=2(4)=8\). The \(x\)-squared deviations are unchanged, giving \(S_{xx}^*=5\). The \(y\)-squared deviations are multiplied by \((-2)^2=4\), giving \(S_{yy}^*=20\). The transformed correlation is
Both variables have had their directions reversed, so the two sign changes cancel. The correlation keeps its original positive sign and magnitude.
Common Mistakes and AP Exam Tips
- Assuming every change leaves \(r\) alone. Adding constants does not change \(r\), and positive multipliers do not change it either. A negative multiplier on exactly one variable flips the sign.
- Changing the magnitude when only the sign flips. Multiplying one variable by a negative number does not make the association stronger or weaker. For example, \(0.80\) becomes \(-0.80\), not a different magnitude.
- Forgetting that the number of negative multipliers matters. One negative multiplier reverses the sign; two negative multipliers preserve it. Count the variables whose direction has been reversed.
- Confusing a shift with a reversal. Adding a constant moves all values and the mean together, leaving deviations unchanged. A negative multiplier reverses deviations around the transformed mean.
- Multiplying by zero. If every value of a variable is multiplied by zero, the transformed variable has no variation. Its correlation with another variable is undefined, not zero.
For a full-credit explanation, name the transformation and state its effect precisely. For example: “Adding 6 to every value of \(x\) shifts the mean by 6 but leaves every deviation unchanged, so \(r\) is unchanged.” Or: “Multiplying \(x\) by a negative number reverses all \(x\)-deviations, so the paired deviation products change sign and \(r\) changes from \(0.72\) to \(-0.72\).” Avoid saying that the association itself becomes stronger or weaker when only a sign reversal occurs.
Check Your Understanding
Use the effects of shifting and multiplying values to answer these questions.
- A variable \(x\) is replaced by \(x+12\). What happens to its mean, its deviations from the mean, and its correlation with another variable?
- A correlation is \(r=-0.55\). One variable is multiplied by 3 and the other by 2. What is the new correlation?
- A correlation is \(r=0.68\), and one variable is multiplied by \(-4\). Give the new correlation and explain the sign change.
- Both variables are multiplied by negative numbers. Does the correlation’s sign change? Explain why.
- Why is the correlation undefined if all values of one variable are multiplied by zero?