Regression Analysis Back EN | ZH
Data Analysis

Regression Analysis & Least Squares Calculator

Enter x,y data to instantly fit linear, polynomial, exponential, or power-law regression. Displays R², RMSE, regression equation, residuals, and predictions.

Data Input
Sample Data
x, y (one point per line, comma or tab separated, max 50 points)
Regression Type
Prediction
Predicted Y =
R² Coefficient
RMSE
Data Points
Predicted Y
Regression Equation
Scatter Plot + Regression Curve + Residuals

Theory

Linear regression $y = ax + b$:

$$a=\frac{n\sum x_i y_i-\sum x_i\sum y_i}{n\sum x_i^2-\left(\sum x_i\right)^2}$$

Coefficient of determination: $R^2 = 1 - \dfrac{SS_{res}}{SS_{tot}} = 1 - \dfrac{\sum(y_i-\hat{y}_i)^2}{\sum(y_i-\bar{y})^2}$

RMSE: $\sqrt{\dfrac{1}{n}\sum(y_i-\hat{y}_i)^2}$

Polynomial: solved via normal equations (Vandermonde matrix).

Exponential: linearize via $\ln y = \ln a + bx$, then apply linear regression.

Applications: S-N fatigue curve fitting (power law) / Stress-strain curve approximation / FEM response surface method / Nusselt-Reynolds correlation / Material constant identification from test data.