How this calculator works
Pearson correlation divides the centred cross-product total by the geometric mean of the two squared-deviation totals. Sample or population divisors cancel when all summaries use the same convention. A value near +1 indicates an increasing straight-line relationship and a value near -1 a decreasing one. Constant variables have no defined correlation. Summary inputs must respect the covariance bound |Cov| ≤ SDx × SDy.
Formula
r = Σ((x - meanX)(y - meanY))/sqrt(Σ(x - meanX)² Σ(y - meanY)²) = Cov(x,y)/(SDx × SDy).
Worked example
For x = 1, 2, 3 and y = 2, 4, 5, the cross-product total is 3 and the squared totals are 2 and 14/3. Thus r = sqrt(27/28) ≈ 0.981981.
Advertisement
Frequently asked questions
Does r squared always describe explained variation?
It equals regression R squared for ordinary simple linear regression with an intercept on these pairs. Other model settings may differ.
Is Pearson suitable for curved trends?
It describes linear association. A strong curved pattern can have a small coefficient; inspect a scatter plot.
Why do summary inputs sometimes fail?
Mixing sample covariance with population standard deviations, different data sets or inconsistent rounding can violate the correlation bound.