---
title: Problems Using Data Mining to Build Regression Models
description: Problems Using Data Mining to Build Regression Models
image: https://blog.minitab.com/hubfs/B2BML%20-%20NEW%20FILE%20MANAGER%20STRUCTURE/Blog%20Images/Imported_Blog_Media/data_mining_crop-3.jpg
---

English

- [English](https://blog.minitab.com/en/?hsLang=en)
- [Français](https://blog.minitab.com/fr/?hsLang=en)
- [Deutsch](https://blog.minitab.com/de/?hsLang=en)
- [Português](https://blog.minitab.com/pt/?hsLang=en)
- [Español](https://blog.minitab.com/es/?hsLang=en)
- [日本語](https://blog.minitab.com/ja/?hsLang=en)
- [한국어](https://blog.minitab.com/ko/?hsLang=en)
- [中文（简体）](https://blog.minitab.com/zh/?hsLang=en)

- [![Icon Partners](https://blog.minitab.com/hubfs/WCM/Partners.png) Partners](https://www.minitab.com/en-us/company/partners/)
- [![Icon Contact](https://blog.minitab.com/hubfs/WCM/Contact.png) Contact](https://www.minitab.com/en-us/company/contact-us/)
- [![Icon Talk to Minitab](https://blog.minitab.com/hubfs/WCM/Phone.png) Talk to Minitab](https://www.minitab.com/en-us/talk-to-minitab/)
- [![Icon My Account](https://blog.minitab.com/hubfs/WCM/MyAcct.png) My Account](https://licensing.minitab.com/account/manage)

[![Minitab](https://blog.minitab.com/hubfs/WCM/minitab-corp-logo.svg)](https://www.minitab.com/en-us/)

- Products
  
  Back
  
  [Products](https://www.minitab.com/en-us/products/)
  
  [All Products](https://www.minitab.com/en-us/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)
    - [Simul8 Discrete Event Simulation](https://info.minitab.com/en/new-to-simul8?hsLang=en)
    - [SPM](https://www.minitab.com/en-us/products/spm/)
- Solutions
  
  Back
  
  [Solutions](https://www.minitab.com/en-us/solutions/)
  
  [All Solutions](https://www.minitab.com/en-us/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://info.minitab.com/en/new-to-simul8?hsLang=en)
    - [Process Mining](https://info.minitab.com/en/new-to-simul8?hsLang=en)
    - [Key Capabilities](https://www.minitab.com/en-us/solutions/key-capabilities/)
    - [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://info.minitab.com/en/new-to-simul8?hsLang=en)
    - [Model Deployment & ML Ops](https://www.minitab.com/en-us/solutions/key-capabilities/model-deployment-ml-ops/)
    - [Innovation & Project Management](https://www.minitab.com/en-us/solutions/key-capabilities/innovation-project-management/)
    - [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/)
    - [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/)
    - [Services](https://www.minitab.com/en-us/solutions/industry/service-industries/)
    - [Software & Technology](https://www.minitab.com/en-us/solutions/industry/software-technology/)
    - [Construction](https://www.minitab.com/en-us/solutions/industry/construction/)
    - [Featured Roles](https://www.minitab.com/en-us/solutions/role/)
    - [Engineering](https://www.minitab.com/en-us/solutions/role/engineering/)
    - [Business Analysis](https://www.minitab.com/en-us/solutions/role/business-analysts/)
    - [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/)
    - [Research and Development](https://www.minitab.com/en-us/solutions/role/research-and-development/)
- Resources & Services
  
  Back
  
  [Resources & Services](https://www.minitab.com/en-us/resources-services/)
  
  [All Resources & Services](https://www.minitab.com/en-us/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
  
  Back
  
  [Support](https://www.minitab.com/en-us/support/)
  
  [Technical Support](https://www.minitab.com/en-us/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
  
  Back
  
  [Company](https://www.minitab.com/en-us/company/)
  
  [Company](https://www.minitab.com/en-us/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/)

[Try/Buy](https://www.minitab.com/en-us/try-buy/)

- [Statistics](https://blog.minitab.com/en/blog/tag/statistics)
- [Data Analysis](https://blog.minitab.com/en/blog/tag/data-analysis)
  
    - <https://www.minitab.com/en-us/>
- [Quality Improvement](https://blog.minitab.com/en/blog/tag/quality-improvement)

- [Subscribe](https://info.minitab.com/blog/subscribe?hsLang=en)

![Minitab](https://20853177.fs1.hubspotusercontent-na1.net/hubfs/20853177/minitab-corp-logo.svg?t=1755011311618)

## Notice

You are now leaving minitab.com.

 Click Continue to proceed to:

 Continue

 Go Back

# Problems Using Data Mining to Build Regression Models

 Minitab Blog Editor  |  9/21/2016

 Topics: [Data Analysis](https://blog.minitab.com/en/blog/tag/data-analysis), [Statistics](https://blog.minitab.com/en/blog/tag/statistics), [ANOVA](https://blog.minitab.com/en/blog/tag/anova), [Regression Analysis](https://blog.minitab.com/en/blog/tag/regression-analysis)

- [Share](https://www.linkedin.com/shareArticle?mini=true&url=https://blog.minitab.com/en/blog/adventures-in-statistics-2/problems-using-data-mining-to-build-regression-models)
- [Share](https://www.facebook.com/sharer.php?u=https://blog.minitab.com/en/blog/adventures-in-statistics-2/problems-using-data-mining-to-build-regression-models)

Data mining uses algorithms to explore correlations in data sets. An automated procedure sorts through large numbers of variables and includes them in the model based on statistical significance alone. No thought is given to whether the variables and the signs and magnitudes of their coefficients make theoretical sense.

We tend to think of data mining in the context of big data, with its huge databases and servers stuffed with information. However, it can also occur on the smaller scale of a research study.

The comment below is a real one that illustrates this point.

> “Then, I moved to the Regression menu and there I could add all the terms I wanted and more. Just for fun, I added many terms and performed backward elimination. Surprisingly, some terms appeared significant and my R-squared Predicted shot up. To me, your concerns are all taken care of with R-squared Predicted. If the model can still predict without the data point, then that's good.”

Comments like this are common and emphasize the temptation to select regression models by trying as many different combinations of variables as possible and seeing which model produces the best-looking statistics. The overall gist of this type of comment is, "What could possibly be wrong with using data mining to build a regression model if the end results are that all the p-values are significant and the various types of R-squared values are all high?"

In this blog post, I’ll illustrate the problems associated with using data mining to build a regression model in the context of a smaller-scale analysis.

## An Example of Using Data Mining to Build a Regression Model

My first order of business is to prove to you that data mining can have severe problems. I really want to bring the problems to life so you'll be leery of using this approach. Fortunately, this is simple to accomplish because I can use data mining to make it appear that a set of randomly generated [predictor variables](http://support.minitab.com/en-us/minitab/17/topic-library/modeling-statistics/regression-and-correlation/regression-models/what-are-response-and-predictor-variables/) explains most of the changes in a randomly generated [response variable](http://support.minitab.com/en-us/minitab/17/topic-library/modeling-statistics/regression-and-correlation/regression-models/what-are-response-and-predictor-variables/)!

To do this, I’ll create a worksheet in Minitab statistical software that has 100 columns, each of which contains 30 rows of entirely random data. In Minitab, you can use **Calc > Random Data > Normal** to create your own worksheet with random data, or you can use [this worksheet](https://cdn.app.compendium.com/uploads/user/458939f4-fe08-4dbc-b271-efca0f5a2682/742d7708-efd3-492c-abff-6044d78e3bbd/File/c740effad4cc27dc6580093ea6c070fd/randomdata.mtw) that I created for the data mining example below. (If you don’t have Minitab and want to try this out, [get the free 30 day trial!](http://www.minitab.com/en-us/products/minitab/))

Next, I’ll perform [stepwise regression](https://blog.minitab.com/blog/adventures-in-statistics/regression-smackdown-stepwise-versus-best-subsets?hsLang=en) using column 1 as the response variable and the other 99 columns as the potential predictor variables. This scenario produces a situation where stepwise regression is forced to dredge through 99 variables to see what sticks, which is a key characteristic of data mining.

When I perform stepwise regression, the procedure adds 28 variables that explain 100% of the variance! Because we only have 30 observations, we’re clearly overfitting the model. Overfitting the model is different problem that also inflates R-squared, which you can read about in my post about [the dangers of overfitting models](https://blog.minitab.com/blog/adventures-in-statistics/the-danger-of-overfitting-regression-models?hsLang=en).

I’m specifically addressing the problems of data mining in this post, so I don’t want a model that is also overfit. To avoid an overfit model, a good rule of thumb is to include no more than one term for each 10 observations. We have 30 observations, so I’ll include only the first three variables that the stepwise procedure adds to the model: C7, C77, and C95. The output for the first three steps is below.

![Stepwise regression output](https://blog.minitab.com/hubfs/B2BML%20-%20NEW%20FILE%20MANAGER%20STRUCTURE/Blog%20Images/Imported_Blog_Media/stepwise_swo-Jul-05-2025-10-58-51-6748-PM.png)

Under step 3, we can see that all of the [coefficient p-values](https://blog.minitab.com/blog/adventures-in-statistics/how-to-interpret-regression-analysis-results-p-values-and-coefficients?hsLang=en) are statistically significant. The [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) value of 67.54% can either be good or mediocre depending on your field of study. In a real study, there are likely to be some real effects mixed in that would boost the R-squared even higher. We can also look at [the adjusted and predicted R-squared values](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) and neither one suggests a problem.

If we look at the model building process of steps 1 - 3, we see that at each step all of the R-squared values increase. That’s what we like to see. For good measure, let’s graph the relationship between the predictor (C7) and the response (C1). After all, seeing is believing, right?

![Scatterplot of two variables in regression model](https://blog.minitab.com/hubfs/B2BML%20-%20NEW%20FILE%20MANAGER%20STRUCTURE/Blog%20Images/Imported_Blog_Media/scatterplot-3-Jul-05-2025-10-58-49-5845-PM.png)

This graph looks good too! It sure appears that as C7 increases, C1 tends to increase, which agrees with the positive [regression coefficient](https://blog.minitab.com/blog/adventures-in-statistics/how-to-interpret-regression-analysis-results-p-values-and-coefficients?hsLang=en) in the output. If we didn’t know better, we’d think that we have a good model!

This example answers the question posed at the beginning: what could possibly be wrong with this approach? Data mining can produce deceptive results. The statistics and graph all look good but these results are based on entirely random data with absolutely no real effects. Our regression model suggests that random data explain other random data even though that's impossible. Everything looks great but we have a lousy model.

The problems associated with using data mining are real, but how the heck do they happen? And, how do you avoid them? [Read my next post](https://blog.minitab.com/blog/adventures-in-statistics/problems-using-data-mining-to-build-regression-models-part-two?hsLang=en) to learn the answers to these questions!

## You Might Also Like

<https://blog.minitab.com/en/blog/which-world-cup-quarterfinal-teams-look-most-like-past-champions?hsLang=en>

[Which World Cup Quarterfinal Teams Look Most Like Past Champions?](https://blog.minitab.com/en/blog/which-world-cup-quarterfinal-teams-look-most-like-past-champions?hsLang=en)

[Minitab Solution Center](https://blog.minitab.com/en/blog/tag/minitab-solution-center)  | 6 Minute Read

<https://blog.minitab.com/en/blog/new-minitab-updates-unite-data-collection-preparation-and-predictive-analytics?hsLang=en>

[New Minitab Updates Unite Data Collection, Preparation, and Predictive Analytics](https://blog.minitab.com/en/blog/new-minitab-updates-unite-data-collection-preparation-and-predictive-analytics?hsLang=en)

[Data Preparation](https://blog.minitab.com/en/blog/tag/data-preparation)  | 5 Minute Read

<https://blog.minitab.com/en/blog/artemis-ii-heat-shield-how-do-you-decide-under-uncertainty?hsLang=en>

[Artemis II Heat Shield: How Do You Decide in Uncertain Conditions?](https://blog.minitab.com/en/blog/artemis-ii-heat-shield-how-do-you-decide-under-uncertainty?hsLang=en)

[Data Analysis](https://blog.minitab.com/en/blog/tag/data-analysis)  | 4 Minute Read

---

- [Careers](https://www.minitab.com/en-us/company/careers/)
- [Trust Center](https://www.minitab.com/en-us/trust-center/)
- [Suppliers](https://www.minitab.com/en-us/suppliers/)
- [Site Map](https://www.minitab.com/en-us/site-map/)

- [![linkedin](https://blog.minitab.com/hubfs/WCM/linkedin-1.png)](https://www.linkedin.com/company/minitab/)
- [![facebook](https://blog.minitab.com/hubfs/WCM/facebook.png)](https://www.facebook.com/Minitab/)
- [![youtube](https://blog.minitab.com/hubfs/WCM/youtube.png)](https://www.youtube.com/user/MinitabInc)
- [![instagram](https://blog.minitab.com/hubfs/WCM/instagram.png)](https://www.instagram.com/minitab/)

---

© 2025 Minitab, LLC. All Rights Reserved.

- [Terms of Use](https://www.minitab.com/en-us/legal/terms-of-use/)
- [Privacy Policy](https://www.minitab.com/en-us/legal/privacy-policy/)
- [Legal](https://www.minitab.com/en-us/legal/)

- Cookies Settings