Have you ever wondered if two things are connected—like hours of study and test scores, or screen time and sleep quality?
That’s where the correlation coefficient comes in!
Table of Contents
🙋 What Is the Correlation Coefficient?
The correlation coefficient (often called “r”) is a number between -1 and 1 that tells you how strongly two things are related.
Value of r | What it means |
---|---|
+1 | Perfect positive correlation (both go up together) |
0 | No correlation (completely unrelated) |
–1 | Perfect negative correlation (one goes up, the other goes down) |
🧮 The Formula (Don’t Worry—We’ll Make It Easy)
The full formula looks like this:
r = Σ[(x - x̄)(y - ȳ)] / √[Σ(x - x̄)² * Σ(y - ȳ)²]
But don’t panic! Let’s walk through what that means in simple terms.
🪜 Step-by-Step: How to Calculate It
Let’s say you have two sets of numbers (X and Y) for the same items. For example:
Student | Study Hours (X) | Test Score (Y) |
---|---|---|
A | 2 | 60 |
B | 4 | 70 |
C | 6 | 75 |
D | 8 | 85 |
Find the mean (average) of X and Y
- Mean of X = (2 + 4 + 6 + 8) / 4 = 5
- Mean of Y = (60 + 70 + 75 + 85) / 4 = 72.5
Subtract the mean from each value
Create columns for:
- (X – X̄)
- (Y – Ȳ)
Multiply the results
Multiply the differences together:(X - X̄)(Y - Ȳ)
Square the differences for X and Y
Make two new columns:
- (X – X̄)²
- (Y – Ȳ)²
Plug everything into the formula
Add up the results and apply the formula:
r = Σ[(x - x̄)(y - ȳ)] / √[Σ(x - x̄)² * Σ(y - ȳ)²]
This gives you a value for r.

🧪 In Our Example…
If you follow all the steps, you’d get a result close to r ≈ 0.98, meaning there’s a very strong positive correlation between study hours and test scores!
📌 Things to Remember
- Correlation does not mean causation! Two things might be related without one causing the other.
- A strong positive r means the two values increase together.
- A strong negative r means when one increases, the other decreases.
- If r is near 0, there’s probably no relationship.
🏙️ Real-Life Examples
- Ice cream sales vs. temperature → Positive correlation
- Number of absences vs. test performance → Negative correlation
- Shoe size vs. intelligence → No correlation