Regression Model Builder

Build an equation. Move its coefficients. See price and location change predicted weekly gross profit.

YOUR REGRESSION EQUATION
Intercept
Least squares fit

Price and weekly gross profit

Swipe the chart sideways to see all labels.

Build one prediction

Fitted calculations use unrounded coefficients. Displayed dollar amounts round to cents.

Three locations, two indicators

Location coding, intercepts, and predictions at the selected price
LocationI(Urban)I(Rural)Intercept
at $6
Prediction

Click a row or a location in the chart legend to focus that store type.

TRY THIS

One line, three intercepts, then three curves

Start with Simple linear. Add Location and compare the three intercepts. Move Urban’s coefficient: which line moves? Add Price², then change its sign. Move the prediction price and watch the local slope change.

What the coefficients mean

Suburban is the reference group: both indicators equal zero. The Urban and Rural coefficients are differences from Suburban, holding price fixed. Without interactions, the location gaps stay constant across prices.

With x = Price − 6, the local price slope is b₁ + 2b₂x. A quadratic is curved in price and remains linear in its coefficients. Its turning point is Price = 6 − b₁/(2b₂), when b₂ is nonzero. A finite $1 price change need not equal the local slope.

Adding Price² also adds Price. Removing Price removes Price². The app does not include price-by-location interactions, so it always uses a common price slope and curvature.

Data source and modeling choices

720 stores: 226 Urban, 254 Suburban, and 240 Rural.

Changing the model terms runs ordinary least squares on these 720 fixed stores. Moving a slider sets a coefficient manually and need not minimize squared residuals. In-sample R² uses 1 − SSE/SST and can be negative for manually chosen coefficients. The vertical chart axis expands if a curve leaves the usual $0–$1,400 range.

The same equation using uncentered Price