What is Correlation?
Correlation is a statistical measure that tells us how strongly and in which direction two variables are related to each other.
In simple words:
Correlation tells us whether two variables tend to change together.
For example, consider Study Hours and Marks:
| Study Hours | Marks |
|---|---|
| 2 | 45 |
| 4 | 55 |
| 6 | 68 |
| 8 | 82 |
| 10 | 92 |
Here, as study hours increase, marks also tend to increase. Therefore, these two variables have a positive correlation.
Correlation coefficient
Correlation is usually represented by r, and its value ranges from:
| Correlation | Meaning |
|---|---|
| +1 | Perfect positive correlation |
| Close to +1 | Strong positive relationship |
| 0 | No linear correlation |
| Close to −1 | Strong negative relationship |
| −1 | Perfect negative correlation |
Three simple examples
1. Positive correlation
Study Hours ↑ → Marks ↑
Both variables increase together.
2. Negative correlation
Speed ↑ → Travel Time ↓
As one variable increases, the other tends to decrease.
3. No/weak correlation
Shoe Size ↔ Exam Marks
There may be no meaningful linear relationship.
Important point for your Data Visualization lecture
When we create a correlation matrix and heat map, we calculate the correlation between every pair of numerical variables and represent the values using colors.
For example:
| Study Hours | Attendance | Marks | |
|---|---|---|---|
| Study Hours | 1.00 | 0.65 | 0.88 |
| Attendance | 0.65 | 1.00 | 0.72 |
| Marks | 0.88 | 0.72 | 1.00 |
The value 0.88 means that Study Hours and Marks have a strong positive linear relationship in this example.
One caution: Correlation shows association, not causation. A high correlation does not by itself prove that one variable causes the other.
Post a Comment