By Chapter 6, regression starts becoming realistic.
Until now, all our models quietly assumed: each variable has one fixed effect.
Example:
If deployment increases sales by 10%, then deployment increases sales by 10% for everyone.
But real life rarely behaves that way.
Maybe:
- deployment helps large customers more,
- discounts work only in December,
- some shapes respond differently to pricing.
This is where Chapter 6 begins.
This chapter introduces one of the most important ideas in statistics: Interaction Effects.
What Is an Interaction?
An interaction means: the effect of one variable depends on another variable.
Without interaction:
With interaction:
That sounds abstract.
So let’s make it practical.
Example — Deployment and Customer Type
Suppose:
You deploy more diamonds. Sales increase.
Great.
But maybe:
| Customer type | Extra Sales per $100k Deployment |
|---|---|
| Small | 2 |
| Large | 20 |
Now deployment effect changes. That is interaction.
The Basic Interaction Model
Ordinary regression:
Interaction model:
That last term is interaction.
Interpretation of Each Coefficient
Intercept:
Baseline.
Main effect:
Effect of when
Second main effect:
Effect of when .
Interaction:
How much one slope changes.
Numerical Example
Suppose:
Interpretation:
Base:
100
Without promotion:
Deployment adds: 20
With promotion:
Deployment adds:
20+30=50
Promotion amplifies deployment.
Why Interaction Exists in Real Life
Because systems are heterogeneous.
Examples:
Discount × Season
Discounts work differently in December.
Customer Count × Month
More customers matter differently by season.
Price × Shape
Price sensitivity differs by shape.
Aging × Inventory Type
Old inventory behaves differently.
Interaction vs Correlation
These are different.
Correlation:
Variables move together.
Interaction:
Variables change each other’s effects.
Example
Height and weight may correlate.
But: medicine effectiveness depending on age is interaction.
Interaction in GLMs
Interaction works exactly the same.
Example:
Poisson regression:
Interpretation changes:
Effects become multiplicative.
Example — Sales Counts
Suppose:
Monthly sales:
Exponentiate.
Discount effect outside December:
22% increase.
Discount effect inside December:
=2.01
Now discount doubles sales.
Huge difference.
Interaction in Logistic Regression
Model:
Interpretation:
Odds ratio changes.
Example:
Customer count changes purchase probability differently by month.
Continuous × Continuous Interaction
Example:
Price × Deployment.
Model:
Meaning:
Price sensitivity changes as deployment changes.
Continuous × Categorical
Example:
CustomerCount × Region.
Interpretation:
Customer growth behaves differently across regions.
Categorical × Categorical
Example:
Shape × Color.
Interpretation:
Preference combinations.
Why Interaction Terms Are Estimated
You asked this earlier:
Why do we add interaction terms?
Because:
we do not know interaction strength.
Model estimates:
from data.
If:
No interaction.
If: large: Strong interaction.
Hierarchical Principle
Very important.
If you include:
always include:
and:
Never include interaction alone.
Real Business Example
Suppose:
You want inventory forecasting.
Model:
Interpretation:
Customer growth behaves differently by season.
Exactly the type of problem you were discussing.
Splines and Interaction
Now suppose customer count effect is nonlinear.
Then:
instead of:
Now:
interaction becomes:
This enters: GAM territory.
Very powerful.
Visualization of Interaction
Without interaction:
Parallel lines.
With interaction:
Lines diverge.
That visual intuition is important.
Statistical Testing
How do we know interaction matters?
Compare:
Model 1:
No interaction
Model 2:
Interaction
Use:
- likelihood ratio test,
- deviance,
- AIC,
- BIC.
Inventory Example
Suppose:
December demand:
high.
Customer growth:
high.
Interaction captures:
December amplifies customer effect.
Without interaction:
inventory underestimated.
Chapter 6’s Big Lesson
Chapter 6 teaches:
variables do not act alone.
Effects depend on context.
And averages often hide reality.
Final Thought
Before Chapter 6:
you ask:
“What is the effect?”
After Chapter 6:
you ask:
“Does the effect change?”
That shift changes everything.
Interaction effects turn regression from:
simple prediction
into
understanding how systems actually behave.


Leave a comment