Pearson Correlation & Simple Linear Regression Engine
Takes bivariate paired observations (X,Y) or summary statistics, derives the least-squares regression line y=β0+β1x, evaluates Pearson r, Spearman rank ρ, and standard error of regression residuals.
Your data
Sample size: 8 pairs.
Results
Fitted line: y^=40.0238+2.1369x, with R2=0.9939.
Pearson correlation r
0.9969 (strong positive association)
Coefficient of determination R2
99.39% of the variance in y explained
Slope β1
2.1369
Standard error of the slope SE(β1)
0.0685
Slope test statistic t
31.208
Degrees of freedom
6
For every 1-unit increase in x, the predicted y changes by 2.1369 units. The line accounts for 99.4% of the variation in y.
Scatter plot: x across, y up, with the fitted line.
How this calculator works
Helps students understand the geometric and algebraic derivation of Ordinary Least Squares minimization.
Inputs: Paired coordinate arrays (x, y) or summary metrics (n,xˉ,yˉ,sx,sy,r).
Outputs: Slope (β1), intercept (β0), correlation coefficient (r), coefficient of determination (R2),t-test for slope significance.