22
$\begingroup$

Can anyone help me understand the Pearson correlation formula? the sample $r$ = the mean of the products of the standard scores of variables $X$ and $Y$.

I kind of understand why they need to standardize $X$ and $Y$, but how to understand the products of both the z scores?

This formula is also called "product-moment correlation coefficient", but what's the rationale for the product action? I am not sure if I have made my question clear, but I just want to remember the formula intuitively.

$\endgroup$
6
  • 11
    $\begingroup$ You might want to read the paper "Thirteen Ways to Look at the Correlation Coefficient" (Rodgers & Nicewander 1988). As the title implies, it discusses thirteen different intuitive views of the correlation coefficient. So hopefully at least one will click :) $\endgroup$
    – half-pass
    Commented Sep 25, 2013 at 1:53
  • 10
    $\begingroup$ 13 Ways can be found here $\endgroup$
    – dimitriy
    Commented Sep 25, 2013 at 2:18
  • 4
    $\begingroup$ A 14th way to understand the correlation (in terms of products of the z scores) comes down to understanding the covariance of the standardized variables, as illustrated at stats.stackexchange.com/questions/18058/…. $\endgroup$
    – whuber
    Commented Sep 25, 2013 at 15:06
  • 4
    $\begingroup$ ...And a 15th way uses the circles shown at stats.stackexchange.com/a/46508/919: a least-squares fit minimizes the total area of the circles (there are at least two ways to do this when the points do not precisely line up) and the correlation coefficient is then their average area (when both variables are standardized). $\endgroup$
    – whuber
    Commented Sep 25, 2013 at 19:33
  • 2
    $\begingroup$ Possible duplicate of What is covariance in plain language? $\endgroup$ Commented Nov 3, 2017 at 12:56

1 Answer 1

20
$\begingroup$

In the comments, 15 ways to understand the correlation coefficent were suggested:


The 13 ways discussed in the Rodgers and Nicewander article (The American Statistician, February 1988) are

  1. A Function of Raw Scores and Means,

    $$r =\frac{\sum\left(X_i - \bar{X}\right)\left(Y_i - \bar{Y}\right)}{\sqrt{\sum\left(X_i-\bar{X}\right)^2\left(Y_i-\bar{Y}\right)^2}}.$$

  2. Standardized Covariance,

    $$r = s_{XY}/(s_Xs_Y)$$

    where $s_{XY}$ is sample covariance and $s_X$ and $s_Y$ are sample standard deviations.

  3. Standardized Slope of the Regression Line,

    $$r = b_{Y\cdot X}\frac{s_X}{s_Y} = b_{X\cdot Y}\frac{s_Y}{s_X},$$

    where $b_{Y\cdot X}$ and $b_{X \cdot Y}$ are the slopes of the regression lines.

  4. The Geometric Mean of the Two Regression Slopes,

    $$r = \pm \sqrt{b_{Y\cdot X}b_{X\cdot Y}}.$$

  5. The Square Root of the Ratio of Two Variances (Proportion of Variability Accounted For),

    $$r = \sqrt{\frac{\sum\left(Y_i - \hat{Y_i}\right)^2}{\sum\left(Y_i-\bar{Y}\right)^2}} = \sqrt{\frac{SS_{REG}}{SS_{TOT}}} = \frac{s_\hat{Y}}{s_Y}.$$

  6. The Mean Cross-Product of Standardized Variables,

    $$r = \sum z_X z_Y / N.$$

  7. A Function of the Angle Between the Two Standardized Regression Lines. The two regression lines (of $Y$ vs. $X$ and $X$ vs. $Y$) are symmetric about the diagonal. Let the angle between the two lines be $\beta$. Then

    $$r = \sec(\beta)\pm \tan(\beta).$$

  8. A Function of the Angle Between the Two Variable Vectors,

    $$r = \cos(\alpha).$$

  9. A Rescaled Variance of the Difference Between Standardized Scores. Letting $z_Y - z_X$ be the difference between standardized $X$ and $Y$ variables for each observation,

    $$r = 1 - s^2_{(z_Y - z_X)} / 2 = s^2_{(z_Y+z_X)}/2 - 1.$$

  10. Estimated from the "Balloon" Rule,

    $$r \approx \sqrt{1 - (h/H)^2}$$

    where $H$ is the vertical range of the entire $X-Y$ scatterplot and $h$ is the range through the "center of the distribution on the $X$ axis" (that is, through the point of means).

  11. In Relation to the Bivariate Ellipses of Isoconcentration,

    $$r = \frac{D^2 - d^2}{D^2 + d^2}$$

    where $D$ and $d$ are the major and minor axis lengths, respectively. $r$ also equals the slope of the tangent line of an isocontour (in standardized coordinates) at the point the contour crosses the vertical axis.

  12. A Function of Test Statistics from Designed Experiments,

    $$r = \frac{t}{\sqrt{t^2 + n-2}}$$

    where $t$ is the test statistic in a two-independent sample $t$ test for a designed experiment with two treatment conditions (coded as $X=0, 1$) and $n$ is the combined total number of observations in the two treatment groups.

  13. The Ratio of Two Means. Assume bivariate normality and standardize the variables. Select some arbitrarily large value $X_c$ of $X$. Then

    $$r = \frac{\mathbb{E}(Y\,|\,X\gt X_c)}{\mathbb{E}(X\,|\,X\gt X_c)}.$$

(Most of this is verbatim, with very slight changes in some of the notation.)

Some other methods (perhaps original to this site) are

  • Via circles. $r$ is the slope of the regression line in standardized coordinates. This line can be characterized in various ways, including geometric ones, such as minimizing the total area of circles drawn between the line and the data points in a scatterplot.

  • By coloring rectangles. Covariance can be assessed by coloring rectangles in a scatterplot (that is, by summing signed areas of rectangles). When the scatterplot is standardized, the net amount of color--the total signed error--is $r$.

$\endgroup$
3
  • 2
    $\begingroup$ Thank you, @Avraham, for trying to bring this unanswered thread to some closure by posting an answer here. $\endgroup$
    – whuber
    Commented Jun 24, 2014 at 16:24
  • 1
    $\begingroup$ to make links explicit, 14th way (in terms of products of the z scores) comes down to understanding the covariance of the standardized variables): stats.stackexchange.com/questions/18058/… and 15th way (a least-squares fit minimizes the total area of the circles (there are at least two ways to do this when the points do not precisely line up) and the correlation coefficient is then their average area (when both variables are standardized)) way: stats.stackexchange.com/a/46508/919 $\endgroup$ Commented Oct 11, 2021 at 23:09
  • 1
    $\begingroup$ Rovine and von Eye 1995/2012 claim to extend the list given in Rodgers and Nicewander 1987/2012. $\endgroup$
    – Galen
    Commented Mar 22, 2022 at 18:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.