Regression · Shrinkage

Ridge Regression

Fit an L2-penalized (ridge) regression that shrinks coefficients toward zero for stable estimates under multicollinearity.

In the menus Regression › Shrinkage › Ridge Regression

Also searched as ridge l2 regularization tikhonov

When to use it

Predict a continuous outcome when predictors are correlated or you have many predictors: ridge stabilizes the coefficients by shrinking them, trading a little bias for much lower variance.

When not to: You want a sparse model that drops unhelpful predictors entirely (use lasso or elastic net instead), or you need valid p-values and confidence intervals on individual coefficients (refit ordinary least squares, with the post-selection-inference caveat if predictors were chosen based on this fit, or use linear regression from the start).

Step by step

  1. Open it from the menu

    Click Regression in the menu bar; under Shrinkage choose Ridge Regression.

  2. Fill in the form

    Choose the columns: What you want to predict or explain, Columns that may explain it. The form lists only columns whose type fits each field.

  3. Check the options

    The options start at their defaults: λ selection, Alpha (λ), CV folds, Standardize predictors. Change one only when your question needs it.

  4. Run the analysis

    Press Run analysis. The Result Card opens on its Results tab.

What to choose in the form

Fields of the Ridge Regression form
What you want to predict or explain Response requiredOne numeric column. Continuous outcome variable (Y / dependent).
Columns that may explain it Predictors requiredOne numeric column. One or more numeric predictor columns (X).
λ selectionHow to choose the penalty strength λ: 'cv' picks it by cross-validation (recommended; avoids the all-coefficients-zero trap of a fixed λ); 'manual' uses the Alpha you set below. Default: cv.
Alpha (λ)Regularization strength when λ selection = manual. Larger = stronger penalty / more shrinkage. Default: 1.
CV foldsNumber of cross-validation folds when λ selection = cv (lasso; ridge uses efficient leave-one-out). Default: 5.
Standardize predictorsZ-score predictors before fitting so the penalty is scale-fair (recommended). Default: on.

How to read the card

The Results tab starts with what to know first (rows left out, checks that did not pass), then the interpretation in words and the Key Results; charts and assumption checks follow further down. Learn More explains the method in plain words. Read a Result Card covers all four tabs.

What it assumes

Linearity

If it does not hold: Ridge regression models the outcome as a LINEAR function of the (possibly transformed) predictors; genuine curvature in the true relationship is not captured and biases predictions systematically in regions where the relationship bends.

How to check: Not checked by KernelStats: no residual or linearity diagnostic is run for this method, unlike Linear Regression's diagnostics; inspect residual plots manually or compare against a nonlinear alternative (e.g. Generalized Additive Model (GAM), Spline Regression).

Normality (of residuals, not of the raw data)

If it does not hold: Any informal reading of the coefficient magnitudes implicitly leans on the same normal-errors assumption as ordinary least squares; non-normal or heteroscedastic residuals are not flagged here the way they are for Linear Regression.

How to check: Not checked by KernelStats: no residual normality or homoscedasticity diagnostic is computed for this method.

No (severe) multicollinearity

If it does not hold: Ridge is specifically chosen to stabilize coefficients among correlated predictors by shrinking them together (rather than selecting among them as lasso does); with alpha set too low, severely collinear predictors can still produce unstable, poorly-determined individual coefficients even though the overall fit and predictions remain fine.

How to check: Not checked by KernelStats as a formal assumption row: no VIF or collinearity diagnostic is computed for this method; the chosen alpha and resulting coefficients are reported directly.

A worked example

Predicting penguin body mass from three correlated measurements (bill length, bill depth, flipper length), standardized, with alpha chosen by leave-one-out cross-validation over a grid from 0.001 to 1000.

Result: Cross-validation selects a small alpha = 0.81; all three standardized coefficients remain nonzero (flipper length +701 g per SD, bill depth +37 g, bill length +25 g) and R-squared = 0.76, essentially the OLS fit.

With only three predictors and 342 rows the collinearity is mild, so leave-one-out cross-validation picks almost no shrinkage and ridge lands on nearly the OLS answer. That is itself informative: ridge only earns its keep when predictors are strongly entangled or numerous relative to n. The small bill coefficients here are small because flipper length already carries the signal, not because the penalty absorbed them.

From the Statistics Library.

The code tabs

Code gives this analysis as Python, R and MATLAB code (and SAS where the tab offers it), reading the data the way KernelStats did. Export sends the card to a report or to slides. See The Code tab.

Understand the statistics

Ask Oobi

Type one of these into Ask Oobi beside your data:

  • How do bill and flipper measurements jointly predict penguin body mass?
  • Explain the ridge regression in plain words.
  • What does no (severe) multicollinearity mean?

Last reviewed November 16, 2026.

Report an unclear step