9.2: Correlation Coefficient (r)
- Page ID
- 58932
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\( \newcommand{\dsum}{\displaystyle\sum\limits} \)
\( \newcommand{\dint}{\displaystyle\int\limits} \)
\( \newcommand{\dlim}{\displaystyle\lim\limits} \)
\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)
( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\id}{\mathrm{id}}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\kernel}{\mathrm{null}\,}\)
\( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\)
\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\)
\( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)
\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)
\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)
\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vectorC}[1]{\textbf{#1}} \)
\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)
\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)
\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\(\newcommand{\longvect}{\overrightarrow}\)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)In the last section, we saw how trends in bivariate data arise on a spectrum from negative to positve. We got a clue that there is a quantifiable way to represent these.
This value is called the correlation coefficient, and is commonly represented by the letter \(r\). It gives us a number between –1 and 1 that describes the direction and strength of the linear relationship between two quantitative variables. The correlation coefficient was first formally developed by Karl Pearson in the early 1900s and is sometimes referred to as the "Pearson Correlation Coefficient". However, Pearson was a controversial figure and proponent of eugenics.
Why Do We Need a Number?
While scatterplots are the best way to detect patterns, human eyes can be subjective. Two people might look at the same cloud of points and come to different conclusions. Having a number associated to these trends allows us to quantify and therefore compare the strength of the correlational relationships.
Definition: Correlation Coefficient
The correlation coefficient, denoted \( r \), is a number between –1 and 1 that measures the strength and direction of a linear relationship between two quantitative variables.
Interpretation of \( r \):
- \( r > 0 \): Positive linear association
- \( r < 0 \): Negative linear association
- \( |r| \) near 1: Strong linear relationship
- \( r = 0 \): No linear relationship (though there could still be a curved pattern!)
Important: Correlation only measures the strength of a linear relationship. It does not explain cause and effect.
The adjacent figure demonstrates a variety of ways the correlation coefficient can inform and deceive.
In the top row, we see the effect on \(r\) as the data gets more spread out while keeping the same slope. This shows a less strong relationship, as there is more variability in the y-value as we move towards the center image. The x-values can explain less of the behavior of the y-value until we get to a complete lack of trend in the middle.
The second row shows how the slope only impacts the sign (positive or negative) of the correlation coefficient for perfectly correlated data. This emphasizes that slope alone does not affect \(|r|\). In data that is not perfectly correlated, the correlation coefficient will change under rotations and drop to \(r = 0\) when the data gets flat.
The third row illustrates how the correlation coefficient is ineffective at capturing non-linear relationships. This emphasizes how important it is to always plot your data!
By DenisBoigelot, original uploader was Imagecreator - Own work, CC0, Link
Examples: Interpreting Correlation
Here are three examples that help us think about how to interpret \( r \). In each case, imagine a scatterplot of the data alongside the reported value of \( r \).
Example 1: Hours of TV and Grades
A researcher collects data on 100 students, recording how many hours of television they watch per day and their GPA. The correlation is:
\( r = -0.62 \)
This is a moderately strong negative linear relationship. Students who watch more TV tend to have lower GPAs, but the relationship isn't perfect. There's still a lot of variation.
Example 2: Shoe Size and Math Score
In a satire of misused statistics, someone runs a study comparing shoe size and standardized math test scores. They report:
\( r = 0.07 \)
This value is close to zero, suggesting no linear relationship. There is no real association here and it's a reminder that not all variables will relate, even if we wish they might. However, there is a still a chance that random sampling effects lead us to a moderate or even strong correlation! We cannot take the number without considering the context too.
Example 3: Height and Arm Span
A study of 50 adult humans measures height (in cm) and arm span. The analysis reports:
\( r = 0.97 \)
This is a very strong positive linear relationship. Height and arm span tend to increase together in a nearly perfect line matching biological expectations.
In the next section, we'll explore how to calculate the correlation coefficient from raw data or technology and how this leads us directly into linear models and least-squares regression.


