---
title: Understanding How Categorical Variables and Interaction Terms Affect a Regression Model
description: Let's explore how the slope and intercept are impacted when adding categorical variables and interaction terms to a regression model.
image: https://blog.minitab.com/hubfs/B2BML%20-%20NEW%20FILE%20MANAGER%20STRUCTURE/Blog%20Images/Imported_Blog_Media/regression-categorical-interaction-fitted-line-plot-1-Jul-05-2025-11-19-52-4004-PM.png
---

- [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)

# Understanding How Categorical Variables and Interaction Terms Affect a Regression Model

![Understanding How Categorical Variables and Interaction Terms Affect a Regression Model](https://blog.minitab.com/hubfs/B2BML%20-%20NEW%20FILE%20MANAGER%20STRUCTURE/Blog%20Images/Imported_Blog_Media/regression-categorical-interaction-fitted-line-plot-1-Jul-05-2025-11-19-52-4004-PM.png)

---

Written by **Dennis Corbin**

Published **November 15 2019**

[Medical Devices](https://blog.minitab.com/en/blog/tag/medical-devices) [Minitab Statistical Software](https://blog.minitab.com/en/blog/tag/minitab-statistical-software) [Articles](https://blog.minitab.com/en/blog/tag/articles) [Regression Analysis](https://blog.minitab.com/en/blog/tag/regression-analysis)

**Regression** can pretty much do it all! But, most of the time, we like to think of a Regression problem as a **best fitted line**:

*Predicted y = mx + b*

The **slope** is denoted by *m*, which denotes the average change in y for every 1-unit increase in x. The **y-intercept** is denoted by *b*, the average outcome of y when x equals zero. In practical uses, we care more about the impact of x and focus on the slope.

In regression, the null hypothesis assumes the slope of the line equals zero. If the p-value is less than 0.05 then there is a significant main effect present and a relationship can be established. In this post, we will explore how the slope and intercept are impacted when adding categorical variables and interaction terms to a regression model.

## Regression: Best Fitted Line

Here is an example where radiation is used to sterilize products for medical device companies. The company is testing two methods of dosing with radiation, method 1 versus method 2. The dosage amount was also recorded. The goal is to find which method will keep the contaminants below 70 PPM without having to maximize dosage.

![](https://blog.minitab.com/hs-fs/hubfs/B2BML%20-%20NEW%20FILE%20MANAGER%20STRUCTURE/Blog%20Images/Imported_Blog_Media/regression-categorical-interaction-fitted-line-plot-1-Jul-05-2025-11-19-52-4004-PM.png?width=512&name=regression-categorical-interaction-fitted-line-plot-1-Jul-05-2025-11-19-52-4004-PM.png)

With the model only including the continuous input of radiation dosage, there is an evident negative relationship and the maximum dosage is going to do the best job overall. The model is

 Average PPM = 218.6 – 117.0\*Dose

For every 1 full unit in radiation dosage the average number of contaminates decreases by 117 units. Since, our inferential space is between 1.1 and 1.4, it makes more sense to talk about 0.1-unit increase, which decreases contaminants by 11.7 PPM.

But the company wants to see if one of the methods works better to minimize the dosage amount and keep contaminants less than 70 PPM. First, let us explore the additive model, where we only account for the two main effects and no interaction.

#### See how your company can learn to effectively utilize data to make smarter decisions. [Learn more about our Training Services today!](https://www.minitab.com/en-us/resources-services/services/training/)

## Regression Modeling with a Categorical Variable

A main effect is the pure impact the input has on the output, while keeping all other variables held constant. For example, in the section above, the main effect of radiation dose was a decrease of 117 PPM for every one unit increase in dose.

The null hypothesis for a categorical variable in Regression is treated as an ANOVA test of averages:

*H0: μMethod1 = μMethod2*

If the averages between the methods are different, then separate regression equations are created. Here the main effect of the categorical variable is comparable to the difference in the y-intercepts.

![](https://blog.minitab.com/hs-fs/hubfs/B2BML%20-%20NEW%20FILE%20MANAGER%20STRUCTURE/Blog%20Images/Imported_Blog_Media/regression-categorical-interaction-scatterplot-contaminants-Jul-05-2025-11-19-54-4708-PM.png?width=574&name=regression-categorical-interaction-scatterplot-contaminants-Jul-05-2025-11-19-54-4708-PM.png)

There is a slight, if negligible, difference between the two methods.

*Method 1 (PPM) = 216.4 – 116.4\*Dose*

*Method 2 (PPM) = 219.0 – 116.5\*Dose*

Method 1 does slightly better than Method 2 because the y-intercept is less.

Because the interaction term was left out, Minitab assumes that the impact of dose is constant for both methods; therefore, the slopes of the lines are equal. There was a slight change in the slope from the Radiation Dose only model this difference is due to including the different methods on the impact of contaminants.

Main effects alone can be misleading, and it is always best practice to look at the interaction between the variables to test for differences in the slopes.

## Interaction Regression Model

With interactions we give the analysis more flexibility to identify more nuanced patterns, especially with different levels of a categorical variable. Instead of holding the slope of the radiation dose amount constant, the impact of radiation dose will be calculated for each method. The null assumes the slopes will be the same (β is often used to reference coefficients in the population):

*H0: βMethod1 = βMethod2*

*![](https://blog.minitab.com/hs-fs/hubfs/B2BML%20-%20NEW%20FILE%20MANAGER%20STRUCTURE/Blog%20Images/Imported_Blog_Media/regression-categorical-interaction-scatterplot-contaminants-2-Jul-05-2025-11-19-53-3329-PM.png?width=519&name=regression-categorical-interaction-scatterplot-contaminants-2-Jul-05-2025-11-19-53-3329-PM.png)*

If Method 1 is used, there is no impact on contaminants by dosage amount and contaminants stay around 74 PPM on average, the slope is close to zero. But, if Method 2 is used we can increase dosage to 1.3 and get about 60 PPM on average, which is below the limit of 70 PPM.

If the company wants consistency, Method 1 is best and keep the dosage low. If the company wants to reduce contaminants below 70 PPM, then Method 2 at about 1.3 Radiation Dose is best. With the interaction, there are multiple optimal solutions that analysts should explore. Interactions give analysts the ability to make informed dynamic decisions.

## How Categorical Variables and Interaction Terms Impact a Regression Model

Minitab’s [Regression menu](https://blog.minitab.com/blog/statistics-and-quality-data-analysis/giving-thanks-for-the-regression-menu-v2?utm_campaign=DigitalStrategy_wwwPublishedArticlesMigration_2020&utm_source=blog&utm_content=regression-categorical-interaction&hsLang=en) allows for easy to interpret regression output and features but understanding the core concepts behind regression analysis can empower analysts to make correct decisions. Categorical terms and interaction terms have many implications in our analyses and they should always be fully vetted and understood.

### Want to Try Analysis Like This Yourself?[![Talk to Minitab](https://no-cache.hubspot.com/cta/default/3447555/7cbe034d-4365-43fd-8a1a-c289cd64a5e3.png)](https://cta-redirect.hubspot.com/cta/redirect/3447555/7cbe034d-4365-43fd-8a1a-c289cd64a5e3)

[Back to Top of Page](https://blog.minitab.com/en/blog/understanding-how-categorical-variables-and-interaction-terms-affect-a-regression-model#main-content)

Keep up with us

On this page

Published

 November 15 2019

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-profit-and-losses?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.