Correlation & Regression Analysis for Data Analysts
Pearson and Spearman correlation, scatter plots, simple linear regression, multiple regression, R-squared, and coefficient interpretation — with Indian business examples (delivery time vs returns, ad spend vs revenue, price vs demand) and Python code throughout.
Part 1 — Correlation
Correlation measures the strength and direction of a relationship between two numeric variables. It answers: do these two things tend to move together, and how strongly?
Part 2 — Simple Linear Regression
Simple linear regression fits a straight line through data to model the relationship between one input variable (X) and one output variable (Y). The line gives you the best-fit equation: Y = a + bX — where b is the slope (how much Y changes per unit increase in X) and a is the intercept (predicted Y when X = 0).
Part 3 — Multiple Linear Regression
Multiple regression uses several input variables simultaneously to predict one output. It controls for the effect of other variables — letting you see the independent contribution of each predictor.
How to Interpret Regression Output — Quick Reference
Frequently Asked Questions
What is the difference between correlation and causation?
Correlation measures the strength and direction of a linear relationship between two variables — whether they tend to move together. Causation means one variable directly causes the other to change. Correlation never proves causation. A classic example: ice cream sales and drowning rates are positively correlated — both increase in summer. But ice cream does not cause drowning; a third variable (hot weather) drives both. In business analysis, you will frequently find correlations: cities with higher average income tend to have higher AOV, longer delivery times correlate with higher return rates. These are useful observations for targeting and operations — but they do not prove that improving delivery time will reduce returns. To establish causation, you need a controlled experiment (A/B test) or a carefully designed quasi-experimental study. Always use language like "associated with" or "correlates with" rather than "causes" unless you have experimental evidence.
What is R-squared in regression and what is a good value?
R-squared (coefficient of determination) measures what proportion of the variance in the dependent variable is explained by the independent variables in the regression model. R-squared ranges from 0 to 1 (or 0% to 100%). An R-squared of 0.72 means the model explains 72% of the variation in the outcome; the remaining 28% is unexplained. What counts as "good" depends entirely on the domain: in physical sciences where conditions are controlled, R-squared above 0.95 is common. In business and social science, R-squared of 0.4–0.7 is often acceptable because human behaviour involves many unobservable factors. For an Indian e-commerce model predicting order value from city and category, R-squared of 0.35 might be quite reasonable. Never optimise solely for high R-squared — adding irrelevant variables always increases R-squared (use Adjusted R-squared instead, which penalises unnecessary variables).
What is Pearson correlation and when should you use Spearman instead?
Pearson correlation (r) measures the strength of a linear relationship between two continuous variables. It ranges from -1 (perfect negative linear relationship) to +1 (perfect positive linear relationship). 0 means no linear relationship. Pearson assumes both variables are normally distributed and the relationship is linear. Use Spearman correlation when: (1) the data is ordinal (customer satisfaction ratings 1–5, NPS scores); (2) the data is not normally distributed (income, order values — typically right-skewed); (3) the relationship is monotonic but not linear (as X increases, Y consistently increases, but not at a constant rate). In Indian business analysis, order values and delivery times are typically skewed — Spearman is more appropriate than Pearson for these. Use Pearson for normally distributed metrics like standardised test scores, manufacturing tolerances, or log-transformed financial data.
Do data analysts in India need to know regression analysis?
Knowing the concepts of correlation and simple linear regression is expected of data analysts in India at the intermediate to senior level. The specific depth depends on the role: at analytics-heavy companies (fintech, e-commerce analytics teams, consulting firms), analysts are expected to run regression models, interpret coefficients and R-squared, and communicate findings to non-technical stakeholders. At traditional companies (FMCG, manufacturing, HR functions), the expectation is more conceptual — understanding what correlation means, not building full models. For interviews, you should be able to explain: what correlation coefficient means, the difference between correlation and causation, what R-squared measures, and what a regression coefficient tells you. Running a model in Python is a plus. The deeper machine learning applications (regularisation, feature selection) are more in the data scientist domain.
EVIKA ACADEMY · NOIDA SECTOR 51
Learn Statistical Analysis on Real Data
Our curriculum covers correlation, regression, and hypothesis testing applied to real Indian business datasets — with interpretation practice and interview preparation.
Book Free Demo Class →