Accepts x,y data pairs, one per line with comma or space separators, and fits a least-squares regression line y=ax+b together with the coefficient of determination R squared.
| Item | Formula / Note | Source / Standard |
|---|---|---|
| Least squares | Minimise residual sum of squares | Legendre 1805 |
| Regression coefficients | b = Sxy/Sxx | Regression analysis |
| Intercept | a = ȳ − b·x̄ | Regression basics |
| R squared | R² = 1 − SSE/SST | Coefficient of determination |
| Correlation | r = Sxy/√(Sxx·Syy) | Pearson 1895 |
| Residual diagnostics | Residuals i.i.d., no trend | Regression diagnostics |
线性回归计算器采用最小二乘法,对输入的 x,y 数据点进行一元线性拟合,输出回归方程 y=ax+b、决定系数 R²、相关系数 r 与均方根误差,适用于数据趋势分析与统计学习。