The correlation coefficient is a statistical measure that quantifies the strength and direction of the linear relationship between two variables. Its values range from -1 to 1, where:
- 1 indicates a perfect positive linear correlation (both variables increase together),
- -1 indicates a perfect negative linear correlation (one variable increases as the other decreases),
- 0 indicates no linear correlation between the variables.
The most common type is the Pearson correlation coefficient, which is calculated as the covariance of the variables divided by the product of their standard deviations. It shows how closely data points fit on a line of best fit. The closer the coefficient is to ±1, the stronger the linear relationship; values near 0 indicate a weak or no linear relationship. The significance of the correlation coefficient can be tested with a p-value to determine if the correlation is statistically meaningful.