Experiment No. 8

 

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 HoursMarks
245
455
668
882
1092

            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:

−1≤r≤+1
-1 \leq r \leq +1
CorrelationMeaning
+1Perfect positive correlation
Close to +1Strong positive relationship
0No linear correlation
Close to −1Strong negative relationship
−1Perfect 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 HoursAttendanceMarks
Study Hours1.000.650.88
Attendance0.651.000.72
Marks0.880.721.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