Calcolatore di regressione lineare
Retta di miglior adattamento per un insieme di punti (x, y).
Piano di ammortamento
| # | Pagamento | Capitale | Interessi | Saldo |
|---|---|---|---|---|
Crescita nel tempo
| Anno | Investito | Valore |
|---|---|---|
Introduzione
Linear Regression Calculator - Best-fit line for a set of (x, y) points. Enter Points (x,y per line) to get an instant result.
Formula
Ordinary least squares: slope = (nΣxy − ΣxΣy) / (nΣx² − (Σx)²); intercept = (Σy − slope×Σx) / n.
Passo dopo passo
- Enter the Points (x,y per line).
- Click Calculate to see your result instantly.
Esempio pratico
Example: With the defaults shown above, the Linear Regression Calculator gives Slope: 1.8, Intercept: 0.2, Points: 5.
Domande Frequenti
What does the slope represent?
How many points do I need?
What inputs does the Linear Regression Calculator need?
How accurate is the Linear Regression Calculator?
Is the Linear Regression Calculator free to use?
Informazioni su Calcolatore di regressione lineare
Linear regression finds the best-fitting straight line through a set of data points, expressing the relationship between a dependent variable and an independent variable. It is one of the most widely used statistical techniques in science, engineering, business, and social research. The Linear Regression Calculator on CalculatorCast computes the regression equation, correlation coefficient, and coefficient of determination from your data.
The linear regression equation is y equals a plus bx, where b (the slope) equals [n times sum(xy) minus sum(x) times sum(y)] divided by [n times sum(x squared) minus sum(x) squared], and a (the intercept) equals [sum(y) minus b times sum(x)] divided by n. These formulas minimize the sum of squared differences between the actual y values and the predicted values on the line, a method called ordinary least squares (OLS).
The correlation coefficient r (Pearson's r) measures the strength and direction of the linear relationship, ranging from negative 1 (perfect negative linear relationship) through 0 (no linear relationship) to positive 1 (perfect positive linear relationship). R-squared (r squared) is the coefficient of determination, representing the proportion of variance in y explained by the linear relationship with x.
Linear regression is used to predict future values, understand relationships between variables, and control for confounding factors in experimental analysis. In business, it might be used to predict sales from advertising spend. In science, to relate drug dose to response. In engineering, to model the relationship between temperature and electrical resistance.
The calculator accepts data as comma-separated x and y values and outputs the regression equation, slope, intercept, r, r-squared, and the standard error of the regression. It also generates the predicted y value for any new x you enter.
The Linear Regression Calculator is free on CalculatorCast and works on all devices without registration.