Correlation: Measuring the Relationship Between Variables
Last updated: Jul 26, 2026
Medium
Importance:
Introduction
Correlation is a statistical measure that describes the strength and direction of the relationship between two variables. It shows whether variables move together (positively), move in opposite directions (negatively), or have no relationship at all.
Correlation is widely used in statistics, finance, machine learning, and scientific research to understand how variables are related and to guide predictions and decision-making.
Why is Correlation Important?
Correlation helps to:
Understand relationships between two or more variables
where x̄ and ȳ are the means of X and Y respectively.
Types of Correlation
1. Positive Correlation
Both variables move in the same direction — as one increases, the other also increases.
Example: Height and weight tend to increase together.
2. Negative Correlation
Variables move in opposite directions — as one increases, the other decreases.
Example: As the price of a product increases, demand tends to decrease.
3. No Correlation (Zero Correlation)
No predictable relationship exists between the two variables.
Example: Shoe size and exam scores generally show no relationship.
Interpreting the Correlation Coefficient
Value of r
Strength of Relationship
+0.7 to +1.0
Strong positive correlation
+0.3 to +0.7
Moderate positive correlation
0 to +0.3
Weak positive correlation
0
No correlation
-0.3 to 0
Weak negative correlation
-0.7 to -0.3
Moderate negative correlation
-1.0 to -0.7
Strong negative correlation
Key Properties of Correlation
Correlation values always range between -1 and +1.
A correlation of 0 does not necessarily mean no relationship — it may indicate a non-linear one.
Correlation does not imply causation.
Correlation is symmetric: correlation(X, Y) = correlation(Y, X).
Outliers can significantly distort correlation values.
Correlation vs Causation
Aspect
Correlation
Causation
Meaning
Two variables move together
One variable directly causes a change in another
Implies Cause?
No
Yes
Example
Ice cream sales and drowning rates both rise in summer
Smoking directly causes increased lung cancer risk
Requires
Statistical relationship only
Controlled experiments or strong causal evidence
Where is Correlation Used?
Field
Application
Finance
Analyzing relationships between asset prices
Machine Learning
Feature selection and multicollinearity checks
Healthcare
Studying relationships between lifestyle and disease
Marketing
Understanding link between ad spend and sales
Weather Science
Relating temperature and humidity patterns
Social Science
Studying relationships between social variables
Advantages
Quantifies the strength and direction of relationships between variables
Simple to calculate and interpret
Useful for identifying trends before deeper analysis
Helps in feature selection for machine learning models
Applicable across many fields and data types
Limitations
Does not imply a cause-and-effect relationship
Only measures linear relationships (Pearson's correlation)
Sensitive to outliers, which can skew results
Can produce misleading results with small sample sizes
Doesn't capture complex, non-linear relationships well
Real-World Examples
Application
Correlation Use
Stock Market
Correlation between different stock prices
Healthcare
Relationship between exercise and heart health
Marketing
Correlation between advertising budget and sales
Education
Relationship between study hours and exam scores
Climate Studies
Correlation between CO2 levels and temperature
Best Practices
Always visualize data with a scatter plot before interpreting correlation.
Remember that correlation does not prove causation.
Check for outliers, as they can distort the correlation coefficient.
Use Spearman's correlation for non-linear or ranked data instead of Pearson's.
Combine correlation analysis with domain knowledge before drawing conclusions.
Interview Tip
A common interview question is:
"What is correlation, and why doesn't it imply causation?"
A strong answer is:
Correlation measures the strength and direction of the relationship between two variables, ranging from -1 to +1. A positive correlation means both variables increase together, while a negative correlation means one increases as the other decreases. Correlation doesn't imply causation because two variables can be related due to a third factor or pure coincidence, without one actually causing the other.
Mentioning the range of values and a clear example of correlation without causation makes your answer stronger.
Conclusion
Correlation is a powerful statistical tool for understanding how two variables relate to one another. While it reveals valuable patterns and relationships in data, it's important to remember that correlation does not equal causation. Understanding correlation is essential for statistics, machine learning, finance, and any field that relies on data-driven insights.
Premium Content
Sign in to check if you have access to this premium tutorial, or upgrade to premium.
Technically reviewed by:ExamAdda Technical Review Team
Technical Reviewers, ExamAdda
Software engineers at ExamAdda who check every article's definitions, complexity claims and code examples before and after publishing.
Published
Jul 26, 2026
Last updated
Jul 26, 2026
Content Verification Methodology
Definitions and complexity claims were checked against authoritative computer-science references. Code examples were compiled and tested with standard, boundary and edge-case inputs.