Enter equal numbers of X and Y values. Correlation ranges from -1 to +1.
Correlation measures the strength and direction of a linear relationship between two variables. The Pearson correlation coefficient (r) is the most common measure, ranging from -1 to +1.
r = sum((xi - x_mean)(yi - y_mean)) / sqrt(sum((xi - x_mean)^2) * sum((yi - y_mean)^2))
Or equivalently:
r = (n*sum(xy) - sum(x)*sum(y)) / sqrt((n*sum(x^2) - (sum(x))^2) * (n*sum(y^2) - (sum(y))^2))
The square of the correlation coefficient (r squared) tells you the proportion of variance in one variable that is explained by the other variable.
r squared = r * r
For example, if r = 0.8, then r squared = 0.64, meaning 64% of the variance in Y can be explained by X.
For data points: (1,2), (2,4), (3,5), (4,4), (5,5)
X: 1, 2, 3, 4, 5 Y: 2, 4, 5, 4, 5 X mean = 3 Y mean = 4 n = 5 Calculating intermediate values... sum(xy) = 1*2 + 2*4 + 3*5 + 4*4 + 5*5 = 66 sum(x) = 15, sum(y) = 20 sum(x^2) = 55, sum(y^2) = 86 r = (5*66 - 15*20) / sqrt((5*55 - 225)(5*86 - 400)) r = (330 - 300) / sqrt(50 * 30) r = 30 / 38.73 r = 0.775 This indicates a strong positive correlation.
Examining relationships between variables in scientific studies.
Analyzing relationships between stock prices, portfolio diversification.
Studying relationships between behavioral variables and outcomes.
Identifying factors that affect product quality.