Live OLS · 2,200 customers

Feature Selection & Multicollinearity

Week 8 · OLS on Summit Gear customers · target: days_to_pay
Built-in AI tutor. Stuck on why a coefficient blew up or why adjusted R-squared dropped? Ask the helper on this page. It coaches toward the diagnosis, it does not just hand you the answer.

More predictors is not a better model. Below is a live OLS regression predicting how many days a Summit Gear customer takes to pay an invoice. Toggle predictors in and out and watch three things move at once: the fitted coefficients (with confidence bands), R-squared and adjusted R-squared, and a correlation matrix that lights up whenever two predictors move together. The goal is to feel — not just be told — what multicollinearity does to a model you would otherwise trust.

New to reading how two columns move together? Warm up in the Correlation trainer first, then come back here to see what happens when you put predictors that move together into the same model.

Start here

Which predictors move together?

Before you build anything, here is the pairwise correlation among every predictor on the table — computed once, always on. Read it like a heat map: a dark-red cell off the diagonal means those two columns move together, and two predictors that move together cannot be told apart by a regression. The size cluster — credit_limit, avg_balance, annual_spend — is the solid red block (pairwise r about 0.96 to 0.99). Keep that block in mind when you start toggling predictors below; putting two of its members into the same model is what destabilizes their coefficients.

Loading…
-1+1blue = move opposite · red = move together · |r| at or above 0.9 is a hot, collinear pair
The model

Build the regression: pick predictors for days_to_pay

Predictors

Tags: clean predictors carry independent signal, collinear ones move together (the size cluster), noise columns carry no real signal — random draws or decoys that do not move days-to-pay.

0
Predictors
Adjusted R²
 
Max pairwise |r|
Multicollinearity.
Noise added.
Tight model.

Fitted coefficients (estimate ± confidence band)

predictorcoefstd err95% confidence
Select at least one predictor.

Read a coefficient as: holding the others fixed, a one-unit rise in this predictor changes predicted days-to-pay by this many days.

Diagnostic

Correlation heatmap (predictors in the model)

This is the multicollinearity check. It is the same correlation matrix as the one up top, but restricted to the predictors you currently have in the model, so it updates every time you toggle one. A dark-red block off the diagonal is the warning sign: two predictors moving together is exactly what destabilizes their coefficients. Pull in two size-cluster members and their cell turns solid red — that hot cell is your cue to keep one and drop the rest.

Select at least two predictors.
-1+1blue = move opposite · red = move together
Auto-mode

Forward selection by adjusted R-squared

Forward selection starts empty and repeatedly adds the single predictor that raises adjusted R-squared the most. Run it and watch where it plateaus: the clean predictors lift the model, then the collinear leftovers and the noise columns stop helping — adjusted R-squared flattens and even ticks down. That flattening is the signal to stop adding.

Read this as a visualization, not a method. Forward (and stepwise) selection is shown here so you can watch how adjusted R-squared responds as predictors go in. It is not a recommended way to choose a model: repeatedly keeping whichever predictor looks best on the same data biases the fit and invalidates the usual standard errors and p-values. For principled, automatic selection the standard tools are regularization — Lasso, which can shrink weak coefficients to exactly zero and so drop them, and Ridge, which shrinks collinear coefficients toward each other to tame their instability. Both are covered as the real selection methods; treat the plateau below as intuition, not a recipe.
Not run yet.