Course contentsShow
← Data Science
Lesson 626 of 2,14516. Multiple Linear RegressionFree lesson

Nested vs Non-Nested Models

Understand the difference between nested models (one is a special case of another) and non-nested models for comparison purposes.

Nested vs Non-Nested Models

You'll learn how to recognize whether two models are nested or non-nested — a key distinction when choosing the right comparison test.

What Are Nested Models?

Two models are nested when one model is a special case of the other. In other words, you can create the simpler model by removing (or setting to zero) one or more predictors from the more complex model.

Example:

  • Model A: price = β₀ + β₁·size + β₂·bedrooms + β₃·age
  • Model B: price = β₀ + β₁·size + β₂·bedrooms

Model B is nested within Model A because you get Model B by dropping the age predictor from Model A. Model A is the "full model" and Model B is the "reduced model."

What Are Non-Nested Models?

Two models are non-nested when neither is a special case of the other. They use different predictors that don't have a subset relationship.

Example:

  • Model X: price = β₀ + β₁·size + β₂·bedrooms
  • Model Y: price = β₀ + β₁·location + β₂·age

Neither model can be obtained by simply dropping variables from the other — they represent fundamentally different modeling approaches.

Why Does This Matter?

The distinction determines which comparison tools you can use:

  • For nested models: Use the Partial F-Test (which you learned in lesson 623) to formally test whether the extra predictors significantly improve the model
  • For non-nested models: Compare using Adjusted R-Squared, AIC, or BIC — but you cannot use the Partial F-Test

Think of it like this: nested models are like Russian dolls (one fits inside another), while non-nested models are like different puzzles that can't be compared piece-by-piece.

Key Takeaway: Nested models have a subset relationship where one is a simpler version of the other; non-nested models use different predictors and require different comparison methods.