Linear Correlation & Regression
Linear Correlation Calculator
Statistics »
Linear Regression »
Binomial Distribution »
Sampling »
Statistics and Probability
Understanding Correlation
Linear correlation measures the strength and direction of a linear relationship between two variables. It's quantified by Pearson's correlation coefficient ($r$), which ranges from -1 to +1.
- $r = +1$: Perfect positive linear relationship.
- $r = -1$: Perfect negative linear relationship.
- $r \approx 0$: No significant linear relationship.
The line of best fit (or regression line) is a straight line that best represents the data on a scatter plot. Its equation is typically written as $y = mx + b$.
Important: Correlation does not imply causation! A strong relationship doesn't mean one variable *causes* the other.
Core Formulas
Pearson's Correlation Coefficient ($r$)
$$ r = \frac{n(\sum xy) - (\sum x)(\sum y)}{\sqrt{[n(\sum x^2) - (\sum x)^2][n(\sum y^2) - (\sum y)^2]}} $$Regression Line ($y = mx + b$)
Slope ($m$):
$$ m = \frac{n(\sum xy) - (\sum x)(\sum y)}{n(\sum x^2) - (\sum x)^2} $$Y-Intercept ($b$):
$$ b = \bar{y} - m\bar{x} = \frac{\sum y - m(\sum x)}{n} $$