• Nakafa

    Nakafa

    Learn free and with quality.
Subject
    • Grade 10
    • Grade 11
    • Grade 12
Exercises
Holy
  • Quran
Articles
  • Politics
  • Community
  • About

Command Palette

Search for a command to run...

Statistics

Product Moment Correlation

What Is Product Moment Correlation?

Product Moment Correlation, often called Pearson Correlation or simply denoted by rrr, is the most commonly used statistical measure to determine how strong and in what direction the linear relationship (straight-line pattern) is between two quantitative variables (numbers).

The value of rrr tells us whether the two variables tend to move in the same direction (positive), opposite directions (negative), or if there is no linear relationship at all.

Correlation from Scatter Diagrams

The most intuitive way to understand the value of rrr is by looking at how the data points are scattered on a diagram:

Strong Positive Correlation

rrr approaching +1 means both variables tend to move in the same direction.

Example of Strong Positive Correlation
Data points cluster very closely forming an upward-sloping straight line pattern.

If your data points look like this (rising from bottom left to top right and tightly clustered), the rrr value will be close to +1.

Weak Positive Correlation

rrr being positive but close to 0 means both variables tend to move in the same direction, but not very strongly.

Example of Weak Positive Correlation
Points tend to rise, but are more spread out from the straight line.

If the points still show an upward trend but are more scattered like this, the rrr value is positive but smaller (closer to 0).

Strong Negative Correlation

rrr approaching -1 means both variables tend to move in opposite directions.

Example of Strong Negative Correlation
Data points cluster very closely forming a downward-sloping straight line pattern.

If the points fall from top left to bottom right and are very tightly clustered, the rrr value will be close to -1.

No Linear Correlation

rrr approaching 0 means the two variables have no linear relationship.

Example of No Linear Correlation
Data points are scattered randomly without forming a straight line pattern.

When the points are scattered randomly without a clear linear pattern, the rrr value will be close to 0.

How is r Calculated?

The Pearson correlation coefficient (rrr) essentially measures how synchronously two variables (X and Y) move relative to their own variations.

Imagine this:

  1. Individual Variation:

    Each variable (X and Y) has its own variability. Some values fluctuate a lot (large variation), while others are stable (small variation). This is measured by SSxxSS_{xx}SSxx​ for X and SSyySS_{yy}SSyy​ for Y (formulas below).

  2. Joint Variation (Covariance):

    We also need to know how X and Y vary together. When X increases, does Y also tend to increase? Or decrease? This measure of joint variation is called covariance, calculated using SSxySS_{xy}SSxy​.

    • If SSxySS_{xy}SSxy​ is large and positive: X and Y often move in the same direction.
    • If SSxySS_{xy}SSxy​ is large and negative: X and Y often move in opposite directions.
    • If SSxySS_{xy}SSxy​ is close to zero: No clear pattern of joint movement.
  3. Standardizing the Measure:

    The problem is that the value of SSxySS_{xy}SSxy​ (covariance) is heavily influenced by the units of the data. For example, the covariance between height (cm) and weight (kg) will have a different value if we measure height in meters and weight in grams, even if the relationship is the same.

    To overcome this, we need to standardize the covariance measure. This is done by dividing the covariance (SSxySS_{xy}SSxy​) by a measure of the individual variations (adjusted using square roots: SSxxSSyy\sqrt{SS_{xx} SS_{yy}}SSxx​SSyy​​).

    r=How much X and Y vary togetherStandardized measure of individual X and Y variations=SSxySSxxSSyyr = \frac{\text{How much X and Y vary together}}{\text{Standardized measure of individual X and Y variations}} = \frac{SS_{xy}}{\sqrt{SS_{xx} SS_{yy}}}r=Standardized measure of individual X and Y variationsHow much X and Y vary together​=SSxx​SSyy​​SSxy​​

The result of this division is rrr, the Pearson Correlation Coefficient. Because it's standardized, its value will always be between -1 and +1, regardless of the original data units. This allows us to compare the strength of linear relationships between different pairs of variables.

So, the value of rrr is determined by comparing how strongly X and Y move together relative to how much they move individually.

Product Moment Correlation Formula

To calculate the value of rrr precisely, we use formulas involving the Sum of Squares:

r=SSxySSxxSSyyr = \frac{SS_{xy}}{\sqrt{SS_{xx} SS_{yy}}}r=SSxx​SSyy​​SSxy​​

What are SSxySS_{xy}SSxy​, SSxxSS_{xx}SSxx​, and SSyySS_{yy}SSyy​?

These measure how varied our data is:

  1. SSxxSS_{xx}SSxx​ (Sum of Squares for x): Measures how spread out the x data is from its mean.

    SSxx=∑(x−xˉ)2=∑x2−(∑x)2nSS_{xx} = \sum (x - \bar{x})^2 = \sum x^2 - \frac{(\sum x)^2}{n}SSxx​=∑(x−xˉ)2=∑x2−n(∑x)2​
  2. SSyySS_{yy}SSyy​ (Sum of Squares for y): Measures how spread out the y data is from its mean.

    SSyy=∑(y−yˉ)2=∑y2−(∑y)2nSS_{yy} = \sum (y - \bar{y})^2 = \sum y^2 - \frac{(\sum y)^2}{n}SSyy​=∑(y−yˉ​)2=∑y2−n(∑y)2​
  3. SSxySS_{xy}SSxy​ (Sum of Products of deviations for x and y): Measures how x and y vary together.

    SSxy=∑(x−xˉ)(y−yˉ)=∑xy−(∑x)(∑y)nSS_{xy} = \sum (x - \bar{x})(y - \bar{y}) = \sum xy - \frac{(\sum x)(\sum y)}{n}SSxy​=∑(x−xˉ)(y−yˉ​)=∑xy−n(∑x)(∑y)​

Key:

  • nnn: Number of data pairs (x, y).
  • ∑x\sum x∑x, ∑y\sum y∑y: Sum of all x and y values.
  • ∑x2\sum x^2∑x2, ∑y2\sum y^2∑y2: Sum of the squares of each x and y value.
  • ∑xy\sum xy∑xy: Sum of the product of each x and y pair.
  • xˉ\bar{x}xˉ, yˉ\bar{y}yˉ​: Mean of x and y values.

By calculating these three SS values and plugging them into the formula for rrr, we get the Product Moment Correlation Coefficient.

Interpreting the Value of r

Once we have the value of rrr, we can interpret its strength and direction using the following general guidelines:

Value of rrrCorrelation StrengthDescription
111Perfect PositiveAll points lie exactly on an upward sloping line.
0.7≤r<10.7 \le r < 10.7≤r<1Strong PositiveClear and strong positive linear relationship.
0.3<r<0.70.3 < r < 0.70.3<r<0.7Moderate PositiveModerately visible positive linear relationship.
0<r≤0.30 < r \le 0.30<r≤0.3Weak PositiveVery low positive linear relationship.
000No Linear CorrelationNo linear relationship at all.
−0.3≤r<0-0.3 \le r < 0−0.3≤r<0Weak NegativeVery low negative linear relationship.
−0.7<r<−0.3-0.7 < r < -0.3−0.7<r<−0.3Moderate NegativeModerately visible negative linear relationship.
−1<r≤−0.7-1 < r \le -0.7−1<r≤−0.7Strong NegativeClear and strong negative linear relationship.
−1-1−1Perfect NegativeAll points lie exactly on a downward sloping line.
Previous

Correlation Analysis Concept

Next

Coefficient of Determination

  • Product Moment CorrelationCalculate Pearson's correlation coefficient (r) to measure linear relationships. Learn formulas, scatter plot analysis, and interpret r values from -1 to +1.
On this page
  • What Is Product Moment Correlation?
  • Correlation from Scatter Diagrams
    • Strong Positive Correlation
    • Weak Positive Correlation
    • Strong Negative Correlation
    • No Linear Correlation
  • How is r Calculated?
  • Product Moment Correlation Formula
  • Interpreting the Value of r
  • Comments
  • Report
  • Source code