Correlation is the statistical relationship between two variables, showing whether and how strongly they move together; it is measured by the correlation coefficient \(r\) (−1 to +1).
Types of correlation
- By direction: positive (both increase together, e.g. temperature and ice-cream sales), negative (one increases, the other decreases, e.g. price and demand), zero (no relation).
- By form: linear (points lie near a straight line) and non-linear/curvilinear (points follow a curve, e.g. fertiliser dose and yield, which rises then falls).
- By number of variables: simple (two variables), multiple (one variable with several others jointly), partial (two variables with the others held constant).
- By degree: perfect (\(r = \pm1\)), high, moderate, low, or zero.
Measurement
- Scatter diagram (visual).
- Karl Pearson's coefficient: \(r = \dfrac{\mathrm{cov}(x,y)}{\sigma_x\sigma_y}\).
- Spearman's rank correlation: \(\rho = 1 - \dfrac{6\sum d^2}{n(n^2-1)}\).
Applications
- Economics and business: relation between advertising spend and sales, price and demand, income and expenditure.
- Prediction: high correlation is the basis for regression, used to forecast one variable from another.
- Data science / ML: correlation matrices for exploring data and for feature selection; dropping highly correlated (redundant) features to reduce multicollinearity.
- Finance: correlation between stock returns is used to diversify a portfolio.
- Medicine and science: e.g. relation between smoking and lung capacity, rainfall and crop yield.
- Psychology/education: checking reliability of tests (test–retest correlation).
Caution: a correlation shows association, not cause and effect; two variables may both be driven by a third factor.