In statistics, Correlation Analysis is a systematic method used to examine and measure the strength and direction of the relationship between two variables.
It is critical to distinguish between association and cause-and-effect:
Correlation can be classified based on the direction of movement and the nature of the relationship:
Three primary tools are used to study correlation: Scatter Diagrams, Karl Pearson's Coefficient, and Spearman's Rank Correlation.
A visual method of plotting data points on a graph to observe the pattern of relationship without calculating numerical values.
Also known as the Product Moment Correlation Coefficient ($r$), this index provides a precise numerical value of the degree of linear relationship between two variables $X$ and $Y$.
Standard Covariance and Standard Deviation method:
$$r = \frac{\sum xy}{N \sigma_x \sigma_y}$$Where deviations from arithmetic means are $x = X - \bar{X}$ and $y = Y - \bar{Y}$:
$$r = \frac{\sum (X - \bar{X})(Y - \bar{Y})}{\sqrt{\sum (X - \bar{X})^2} \sqrt{\sum (Y - \bar{Y})^2}}$$Direct Method (using raw data):
$$r = \frac{N \sum XY - (\sum X)(\sum Y)}{\sqrt{N \sum X^2 - (\sum X)^2} \sqrt{N \sum Y^2 - (\sum Y)^2}}$$When values are large, calculations are simplified by transforming variables:
$$U = \frac{X - A}{B} \quad \text{and} \quad V = \frac{Y - C}{D}$$Where $A$ and $C$ are assumed means, and $B$ and $D$ are common factors. Under this transformation:
$$r_{xy} = r_{uv}$$Developed by C.E. Spearman, this method (Rank Correlation) measures the linear association between ranks assigned to individual items. It is ideal for qualitative attributes (e.g., beauty, intelligence) or when precise measurements are unavailable.
Where $D$ is the difference between the ranks of the two variables for each observation, and $n$ is the number of observations.
When ranks are tied, a correction factor is added for each repetition:
$$r_s = 1 - \frac{6 \left[ \sum D^2 + \frac{(m_1^3 - m_1)}{12} + \frac{(m_2^3 - m_2)}{12} + \dots \right]}{n(n^2 - 1)}$$Where $m_1, m_2, \dots$ represent the number of times a rank is repeated.