Go to calculators
calcmintly

Fit Straight-Line Regression

Fit y=intercept+slope×x and predict y for x wey you fit change.

Add to workspace

Your numbers

Calculations dey happen locally. Results na estimates, no be professional advice.

Slope of the line

—

Ordinary least squares with intercept. Extrapolation beyond the observed x range fit no reliable.

Formula

Use b = Σ(xᵢ−x̄)(yᵢ−ȳ)/Σ(xᵢ−x̄)² and a = ȳ−bx̄. xᵢ and yᵢ na paired observations, bars mean averages, b na slope, and a na intercept. Prediction for di target wey you enter na a+bx.

Fit y=intercept+slope×x and predict y for x wey you fit change.

Example wey show the calculation

Observed x values
1, 2, 3, 4
Observed y values
2, 4, 5, 4
x value for prediction
5
Slope of the line
0.7
Point wey line cross y axis
2
y value wey line predict
5.5

Where e fit work and limits

Ordinary least squares with intercept. Extrapolation beyond the observed x range fit no reliable.

We check inputs for missing values and allowed ranges. Result wey pass the finite numeric range no go show. Rounding affect wetin display, while calculation use the model numeric precision.

Check your units and assumptions before you rely on result. Changing label no convert currency or physical unit.

Version of di formula: 04164298c724 · Example don get check:

Method

Other tools wey relate to dis