Pearson Correlation Coefficient
(r)
What is Pearson's r?
• • Pearson's r measures the linear relationship
between two variables.
• • Values range from -1 to 1:
• - r = 1: Perfect positive correlation
• - r = -1: Perfect negative correlation
• - r = 0: No correlation
• • It is used in statistics to understand the
strength and direction of the relationship.
Formula of Pearson's r
• Pearson's r is calculated using the formula:
• r = Σ(xy) - [Σx * Σy / n] / sqrt([Σx^2 - (Σx)^2/n] *
[Σy^2 - (Σy)^2/n])
• Where:
• • r: Pearson correlation coefficient
• • x and y: Values of two variables
• • n: Number of pairs of scores
Steps to Calculate Pearson's r
• 1. Find the mean of both x and y values.
• 2. Subtract the mean from each x and y value
(get deviations).
• 3. Multiply the deviations for x and y (get
products).
• 4. Square the deviations for x and y.
• 5. Sum the products and the squared
deviations.
• 6. Use the formula to calculate r.
Example Calculation
• Example:
• x: [2, 3, 5, 6]
• y: [1, 2, 4, 5]
• 1. Calculate means (x̄ and ȳ):
• Mean of x = 4, Mean of y = 3
• 2. Find deviations (x - x̄ ) and (y - ȳ):
Interpreting Pearson's r
• • r > 0: Positive correlation (as x increases, y
increases).
• • r < 0: Negative correlation (as x increases, y
decreases).
• • r = 0: No correlation.
• • The closer |r| is to 1, the stronger the linear
relationship.