---
title: How to Avoid Overfitting Your Regression Model
description: How to Avoid Overfitting Your Regression Model
image: https://blog.minitab.com/hubfs/B2BML%20-%20NEW%20FILE%20MANAGER%20STRUCTURE/Blog%20Images/Imported_Blog_Media/overfitlineplotnoequ-1-Jul-05-2025-11-27-27-3447-PM.gif
---

- [Partners](https://www.minitab.com/en-us/company/partners/)
- [Contact](https://www.minitab.com/en-us/company/contact-us/)
- [Talk to Minitab](https://www.minitab.com/en-us/talk-to-minitab/)
- [My Account](https://licensing.minitab.com/account/manage)

<https://blog.minitab.com/?hsLang=en>

 Products

[Minitab Solution Center](https://www.minitab.com/en-us/products/minitab-solution-center/) [Minitab Statistical Software](https://www.minitab.com/en-us/products/minitab/) [Minitab Connect](https://www.minitab.com/en-us/products/connect/) [Minitab Model Ops](https://www.minitab.com/en-us/products/model-ops/) [Minitab Education Hub](https://www.minitab.com/en-us/products/education-hub/) [Minitab Engage](https://www.minitab.com/en-us/products/engage/) [Minitab Workspace](https://www.minitab.com/en-us/products/workspace/) [Real-Time SPC](https://www.minitab.com/en-us/products/real-time-spc/) [Prolink Data Collection & SPC](https://www.minitab.com/en-us/products/prolink) [Scytec Data Collection & OEE](https://www.minitab.com/en-us/products/scytec-data-collection-and-oee/) [Minitab Simul8](https://www.minitab.com/en-us/products/simul8/) [SPM](https://www.minitab.com/en-us/products/spm/)

 Solutions

[Analytics](https://www.minitab.com/en-us/solutions/analytics/) [Statistics & Predictive Analytics](https://www.minitab.com/en-us/solutions/analytics/statistical-analysis-predictive-analytics/) [Data Science & Machine Learning](https://www.minitab.com/en-us/solutions/analytics/data-science-machine-learning/) [Business Analytics & Intelligence](https://www.minitab.com/en-us/solutions/analytics/business-analytics-intelligence/) [Statistical Process Control](https://www.minitab.com/en-us/solutions/analytics/statistical-process-control/) [Quality Analytics](https://www.minitab.com/en-us/solutions/analytics/quality-analytics/) [Live Analytics](https://www.minitab.com/en-us/solutions/analytics/live-analytics/) [Reliability & Life Data Analysis](https://www.minitab.com/en-us/solutions/analytics/reliability/) [Discrete Event Simulation](https://www.minitab.com/en-us/products/simul8/)

[Key Capabilities](https://www.minitab.com/en-us/solutions/key-capabilities/) [Automated Data Collection](https://www.minitab.com/en-us/solutions/key-capabilities/automated-data-collection/) [Advanced Design of Experiments](https://www.minitab.com/en-us/solutions/key-capabilities/advanced-design-of-experiments-omars/) [Continuous Improvement](https://www.minitab.com/en-us/solutions/key-capabilities/continuous-improvement/) [Data Integration & Data Prep](https://www.minitab.com/en-us/solutions/key-capabilities/data-integration-data-prep/) [Diagramming & Mind Mapping](https://www.minitab.com/en-us/solutions/key-capabilities/diagramming-mind-mapping/) [Digital Twins](https://www.minitab.com/en-us/solutions/key-capabilities/digital-twins/) [Innovation & Project Management](https://www.minitab.com/en-us/solutions/key-capabilities/innovation-project-management/) [Model Deployment & ML Ops](https://www.minitab.com/en-us/solutions/key-capabilities/model-deployment-ml-ops/) [Process Excellence: Detect, Correct & Prevent](https://www.minitab.com/en-us/solutions/key-capabilities/process-excellence/)

[Featured Industries](https://www.minitab.com/en-us/solutions/industry/) [Academic](https://www.minitab.com/en-us/solutions/industry/academic/) [Construction](https://www.minitab.com/en-us/solutions/industry/construction/) [Energy & Natural Resources](https://www.minitab.com/en-us/solutions/industry/energy-resources/) [Government & Public Sector](https://www.minitab.com/en-us/solutions/industry/government/) [Healthcare](https://www.minitab.com/en-us/solutions/industry/healthcare/) [Insurance](https://www.minitab.com/en-us/solutions/industry/insurance/) [Manufacturing & Industrial](https://www.minitab.com/en-us/solutions/industry/manufacturing-industrial/) [Pharmaceuticals](https://www.minitab.com/en-us/solutions/industry/pharmaceuticals/) [Services](https://www.minitab.com/en-us/solutions/industry/service-industries/) [Software & Technology](https://www.minitab.com/en-us/solutions/industry/software-technology/)

[Featured Roles](https://www.minitab.com/en-us/solutions/role/) [Engineering](https://www.minitab.com/en-us/solutions/role/engineering/) [Business Analysts](https://www.minitab.com/en-us/solutions/role/business-analysts/) [Research & Development](https://www.minitab.com/en-us/solutions/role/research-and-development/) [Information Technology](https://www.minitab.com/en-us/solutions/role/information-technology/) [Supply Chain](https://www.minitab.com/en-us/solutions/role/supply-chain/) [Customer Service & Contact Center](https://www.minitab.com/en-us/solutions/role/customer-service-contact-center/) [Human Resources](https://www.minitab.com/en-us/solutions/role/human-resources/) [Marketing](https://www.minitab.com/en-us/solutions/role/marketing/)

 Resources & Services

[Resources](https://www.minitab.com/en-us/resources-services/resources/) [Case Studies](https://www.minitab.com/en-us/resources-services/resources/case-studies/) [eBooks & White Papers](https://www.minitab.com/en-us/resources-services/resources/ebooks-and-white-papers/) [Blog](https://blog.minitab.com/blog/?hsLang=en) [Data Sets](https://www.minitab.com/en-us/resources-services/resources/data-set/) [Webinars & Events](https://www.minitab.com/en-us/resources-services/resources/events/) [Education Hub](https://www.minitab.com/en-us/resources-services/resources/education-hub/)

[Services](https://www.minitab.com/en-us/resources-services/services/) [Training](https://www.minitab.com/en-us/resources-services/services/training/) [Deployment](https://www.minitab.com/en-us/resources-services/services/deployment/) [Consulting](https://www.minitab.com/en-us/resources-services/services/statistical-consulting/) [Self-Paced Learning](https://www.minitab.com/en-us/resources-services/services/self-paced-learning/) [Continuing Education](https://www.minitab.com/en-us/resources-services/services/continuing-education/)

 Support

[Subscriptions & Activation](https://www.minitab.com/en-us/support/subscriptions-and-activation/) [Minitab Quick Start](https://www.minitab.com/en-us/support/quick-start/) [Training](https://www.minitab.com/en-us/resources-services/services/training/) [Installation Support](https://www.minitab.com/en-us/support/installation/) [Support Videos](https://www.minitab.com/en-us/support/videos/) [Support Documentation](https://www.minitab.com/en-us/support/documents/) [Software Updates](https://www.minitab.com/en-us/support/software-updates/) [Product Downloads](https://www.minitab.com/en-us/support/downloads/) [Support Policy](https://www.minitab.com/en-us/support/policy/)

 Company

[About Us](https://www.minitab.com/en-us/company/our-company/) [Leadership Team](https://www.minitab.com/en-us/company/leadership-team/) [Partners](https://www.minitab.com/en-us/company/partners/) [Careers](https://www.minitab.com/en-us/company/careers/) [Contact](https://www.minitab.com/en-us/company/contact-us/) [News](https://www.minitab.com/en-us/company/press-releases/)

[Start a free trial](https://www.minitab.com/en-us/products/minitab/free-trial/)

[Start a free trial](https://www.minitab.com/en-us/products/minitab/free-trial/)

- [Partners](https://www.minitab.com/en-us/company/partners/)
- [Contact](https://www.minitab.com/en-us/company/contact-us/)
- [Talk to Minitab](https://www.minitab.com/en-us/talk-to-minitab/)
- [My Account](https://licensing.minitab.com/account/manage)

[← *Return to blog home*](https://blog.minitab.com/en/blog)

# How to Avoid Overfitting Your Regression Model

![How to Avoid Overfitting Your Regression Model](https://blog.minitab.com/hubfs/B2BML%20-%20NEW%20FILE%20MANAGER%20STRUCTURE/Blog%20Images/Imported_Blog_Media/overfitlineplotnoequ-1-Jul-05-2025-11-27-27-3447-PM.gif)

---

Written by **Minitab Blog Editor**

Published **August 31 2017**

[Statistics](https://blog.minitab.com/en/blog/tag/statistics) [Regression Analysis](https://blog.minitab.com/en/blog/tag/regression-analysis)

Overfitting a model is a real problem you need to beware of when performing regression analysis. An overfit model result in misleading [regression coefficients, p-values](https://blog.minitab.com/blog/adventures-in-statistics/how-to-interpret-regression-analysis-results-p-values-and-coefficients?hsLang=en), and [R-squared](https://blog.minitab.com/blog/adventures-in-statistics/regression-analysis-how-do-i-interpret-r-squared-and-assess-the-goodness-of-fit?hsLang=en) statistics. Nobody wants that, so let's examine what overfit models are, and how to avoid falling into the overfitting trap.

Put simply, an overfit model is too complex for the data you're analyzing. Rather than reflecting the entire population, an overfit regression model is perfectly suited to the noise, anomalies, and random features of the specific sample you've collected. When that happens, the overfit model is unlikely to fit another random sample drawn from the same population, which would have its own quirks.

A good model should fit not just the sample you have, but any new samples you collect from the same population. 

For an example of the dangers of overfitting regression models, take a look at this fitted line plot:

![Example of an overfit regression model](https://blog.minitab.com/hubfs/B2BML%20-%20NEW%20FILE%20MANAGER%20STRUCTURE/Blog%20Images/Imported_Blog_Media/overfitlineplotnoequ-1-Jul-05-2025-11-27-27-3447-PM.gif)

Even though this model looks like it explains a lot of variation in the response, it's too complicated for this sample data. In the population, there is no true relationship between the predictor and this response, as is explained in detail [here.](https://blog.minitab.com/blog/adventures-in-statistics/multiple-regession-analysis-use-adjusted-r-squared-and-predicted-r-squared-to-include-the-correct-number-of-variables?hsLang=en)

## Basics of Inferential Statistics

For more insight into the problems with overfitting, let's review a basic concept of inferential statistics, in which we try to draw conclusions about a population from a random sample. The sample data is used to provide unbiased estimates of population parameters and relationships, and also in testing hypotheses about the population.

In inferential statistics, the size of your sample affects the amount of information you can glean about the population. If you want to learn more, you need larger sample sizes. Trying to wrest too much information from a small sample isn't going to work very well.

For example, with a sample size of 20, you could probably get a good estimate of a single population mean. But estimating two population means with a total sample size of 20 is a riskier proposition. If you want to estimate three or more population means with that same sample, any conclusions you draw are going to be pretty sketchy. 

In other words, trying to learn too much from a sample leads to results that aren't as reliable as we'd like. In this example, as the observations per parameter decreases from 20 to 10 to 6.7 and beyond, the parameter estimates will become more unreliable. A new sample would likely yield different parameter estimates.

## How Sample Size Relates to an Overfit Model

Similarly, overfitting a regression model results from trying to estimate too many parameters from too small a sample. In regression, a single sample is used to estimate the coefficients for *all* of the terms in the model. That includes every predictor, interaction, and polynomial term. As a result, the number of terms your can safely accommodate depends on the size of your sample. 

Larger samples permit more complex models, so if the question or process you're investigating is very complicated, you'll need a sample size large enough to support that complexity. With an inadequate sample size, your model won't be trustworthy.

So your sample needs enough observations for each term. In multiple linear regression, 10-15 observations per term is a good rule of thumb. A model with two predictors and an interaction, therefore, would require 30 to 45 observations—perhaps more if you have high multicollinearity or a small effect size. 

## Avoiding Overfit Models

You can detect overfit through cross-validation—determining how well your model fits new observations. Partitioning your data is one way to assess how the model fits observations that weren't used to estimate the model.

For linear models, [Minitab](http://www.minitab.com/en-us/products/minitab/) calculates [predicted R-squared](https://blog.minitab.com/blog/adventures-in-statistics/multiple-regession-analysis-use-adjusted-r-squared-and-predicted-r-squared-to-include-the-correct-number-of-variables?hsLang=en), a cross-validation method that doesn't require a separate sample. To calculate predicted R-squared, Minitab systematically removes each observation from the data set, estimates the regression equation, and determines how well the model predicts the removed observation.

A model that performs poorly at predicting the removed observations probably conforms to the specific data points in the sample, and can't be generalized to the full population. 

The best solution to an overfitting problem is avoidance. Identify the important variables and think about the model that you are likely to specify, then plan ahead to collect a sample large enough handle all predictors, interactions, and polynomial terms your response variable might require. 

Jim Frost discusses offers some good advice about selecting a model in [How to Choose the Best Regression Model](https://blog.minitab.com/blog/adventures-in-statistics/how-to-choose-the-best-regression-model?hsLang=en). Also, check out his post about how [too many phantom degrees of freedom](https://blog.minitab.com/blog/adventures-in-statistics/beware-of-phantom-degrees-of-freedom-that-haunt-your-regression-models?hsLang=en) can lead to overfitting, too. 

[Back to Top of Page](https://blog.minitab.com/en/blog/understanding-statistics/how-to-avoid-overfitting-your-regression-model#main-content)

Keep up with us

On this page

Published

 August 31 2017

Share

- Copy Link
- [Facebook](https://www.facebook.com/sharer/sharer.php?u=)
- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=)
- [Twitter](https://twitter.com/intent/tweet?url=)

[Minitab for manufacturing →](https://www.minitab.com/en-us/solutions/industry/manufacturing-industrial/)

## Discover More

### [![How to Increase Manufacturing Capacity](https://blog.minitab.com/hubfs/manufacturingcapacity.jpg) How to Increase Manufacturing Capacity MANUFACTURING](https://blog.minitab.com/en/blog/how-to-increase-manufacturing-capacity?hsLang=en)

### [![“Soft” Type II Savings: How To Bring Them to the P&L](https://blog.minitab.com/hubfs/SoftSavings_CI-CSuite.png) “Soft” Type II Savings: How To Bring Them to the P&L BANKING AND FINANCE](https://blog.minitab.com/en/blog/soft-type-ii-savings-how-to-bring-them-to-the-pl?hsLang=en)

### [![What Causes Manufacturing Scrap? Common Causes and How to Diagnose Them](https://blog.minitab.com/hubfs/lilian-do-khac-EyqUxJuOb1Q-unsplash.jpg) What Causes Manufacturing Scrap? Common Causes and How to Diagnose Them MANUFACTURING](https://blog.minitab.com/en/blog/what-causes-manufacturing-scrap?hsLang=en)

1829 Pine Hall Rd, State College,  
PA 16801, United States  
+1 814-238-3280

Join our Newsletter

Stay in touch with the fast-paced analytics world. All insights, no fluff.

#### Industries

- [Academic](https://www.minitab.com/en-us/industries/academic/)
- [Energy & Natural Resources](https://www.minitab.com/en-us/industries/energy-natural-resources/)
- [Government & Public Sector](https://www.minitab.com/en-us/industries/government-public-sector/)
- [Healthcare](https://www.minitab.com/en-us/industries/healthcare/)
- [Insurance](https://www.minitab.com/en-us/industries/insurance/)
- [Manufacturing & Industrial](https://www.minitab.com/en-us/industries/manufacturing-industrial/)
- [Services](https://www.minitab.com/en-us/industries/services/)
- [Software & Technology](https://www.minitab.com/en-us/industries/software-technology/)
- [Construction](https://www.minitab.com/en-us/industries/construction/)

#### Solutions

- [Digital Transformation](https://www.minitab.com/en-us/solutions/digital-transformation/)
- [Quality Improvement](https://www.minitab.com/en-us/solutions/quality-improvement/)
- [AI-enabled Analytics](https://www.minitab.com/en-us/solutions/ai-enabled-analytics/)
- [Process Optimization](https://www.minitab.com/en-us/solutions/process-optimization/)
- [Risk Reduction](https://www.minitab.com/en-us/solutions/risk-reduction/)
- [Workforce Enablement](https://www.minitab.com/en-us/solutions/workforce-enablement/)
- [Research and Development](https://www.minitab.com/en-us/solutions/research-development/)

#### Company

- [Careers](https://www.minitab.com/en-us/company/careers/)
- [Legal](https://www.minitab.com/en-us/company/legal/)
- [Terms of Use](https://www.minitab.com/en-us/company/legal/terms-of-use/)
- Cookies Setting
- [Privacy Notice](https://www.minitab.com/en-us/company/legal/privacy-notice/)

 © 2026 Minitab. All rights reserved.