Sandhya Indurkar

Math foundations

Linear Models: y = a + bx in Plain Math

Line through points with slope and intercept

The idea

A linear model is a straight-line relationship between x and y. Intercept a is where the line crosses the y-axis when x = 0. Slope b is the change in y when x increases by 1. Residuals show how far each actual point sits from the line.

Linear models are simple on purpose. They trade flexibility for clarity: one number for baseline level, one number for rate of change. Many forecasting and benchmarking workflows start here before adding seasonality or nonlinear curves.

One extra unit of x moves y by b, not by the full line height.

Example: intercept, slope, and residuals on a line

A linear model is y = a + bx. Intercept a sets where the line starts on the y-axis. Slope b is the change in y when x increases by 1. Residuals show how far each point sits from the line.

Formula

y = 2.29 + 0.90x

Average |residual|

0.08

At x = 0

Intercept 2.29 is the predicted y when x = 0. It anchors the line vertically.

Point-by-point: actual vs predicted
PointxActual yPredicted yResidual
Week 113.203.190.01
Week 224.104.090.01
Week 335.004.990.01
Week 445.805.89-0.09
Week 556.906.790.11
Week 667.607.69-0.09
Week 778.808.590.21
Week 889.409.49-0.09

Line: y = 2.29 + 0.90x. When x goes from 1 to 2, y moves by about 0.90. That step size is the slope. Red dashed segments are residuals. Green brackets show slope as rise over a +1 step on x.

Reading the line

Intercept (a). Predicted y when x is zero. In weekly growth data, it is the starting level before x weeks of change accumulate.

Slope (b). Rise over run. If b = 0.85, each +1 on x adds 0.85 to y on average. The green brackets in the explorer show that step visually.

Residual. Actual minus predicted. Points above the line have positive residuals; below is negative. Smaller residuals on average mean the line fits better.

The math

Linear model

y = a + bx

a is intercept, b is slope. x is the input; y is the output you predict.

Prediction

ŷ = a + bx

ŷ (y-hat) is the value on the line. For x = 4, plug into the formula to get the predicted y.

Residual

residual = y − ŷ

Good fit means smaller residuals on average, not zero residual on every point.

Slope as rate

b = Δy / Δx for a straight line

Slope is constant on a line. That is why one number summarizes the x-to-y rate of change.

Best fit in one sentence

Given several points, the best-fit line minimizes squared residuals overall. The explorer reset button snaps back to that line. Moving intercept or slope by hand shows how misfit grows when the line no longer tracks the cloud of points.

A simple application

This is the core behind regression forecasts, benchmark trends, and driver-based planning before you add business context. The applied regression post adds holdouts, uncertainty, and decision rules on top of this plain line.