Compute the Pearson correlation coefficient (r) and coefficient of determination (R²) for paired data. Visualize the linear relationship with an interactive scatter plot and regression line. Accurate hypothesis testing with t-statistic & p-value.
The Pearson correlation coefficient (denoted r) measures the strength and direction of the linear relationship between two continuous variables. Ranges from -1 to +1: r = 1 indicates a perfect positive linear relationship, r = -1 a perfect negative linear relationship, and r = 0 implies no linear correlation. Developed by Karl Pearson in the late 19th century, it remains the most widely used bivariate correlation measure in statistics, psychology, finance, and natural sciences.
The numerator is the covariance of x and y (scaled), while the denominator standardizes the measure. This produces a unitless coefficient that is invariant to linear transformations of the variables.
| |r| range | Interpretation | Typical example |
|---|---|---|
| 0.00 – 0.19 | Very weak / negligible | Random noise relationship |
| 0.20 – 0.39 | Weak correlation | Modest tendency |
| 0.40 – 0.59 | Moderate correlation | Noticeable linear trend |
| 0.60 – 0.79 | Strong correlation | Consistent linear association |
| 0.80 – 1.00 | Very strong correlation | Almost deterministic linear pattern |
Important: Correlation does not imply causation. Two variables may be highly correlated without a direct causal link (e.g., ice cream sales and drowning incidents). Always combine correlation analysis with domain knowledge.
A socioeconomic study based on 50 individuals collected years of education (X) and annual income in USD (Y: 35k, 48k, 62k, …). The Pearson correlation was r = 0.78 (p < 0.001), indicating a strong positive linear relationship between education and income. The regression line predicted a $5,200 increase in income per additional year of education. However, confounding factors like work experience and geographic location were also relevant, showcasing the need for multiple regression.
When computing r from a sample, we often test whether the true population correlation ρ is zero. The test statistic follows a t-distribution with n-2 degrees of freedom: t = r * sqrt((n-2)/(1-r²)). A low p-value (typically less than 0.05) rejects the null hypothesis of no correlation. Our calculator provides the exact two-tailed p-value using the cumulative t-distribution (implemented via the incomplete beta function, accuracy within 1e-6 compared to R's cor.test).
✅ Tip: Before computing Pearson’s r, always visualize your data. The scatter plot reveals outliers, clusters, and non‑linear patterns that the coefficient alone cannot detect.