Learning Outcome Statement
Formulate and interpret a multiple regression model that includes qualitative independent variables.
On the exam: You get a regression vignette with coefficient estimates, dummy coding, and a specified independent-variable value, then choose the correctly formulated model, predicted value, slope, or category difference in an item set or MCQ.
Suppose a hiring analyst wants salary to reflect both experience and an MBA. The outcome, $Y$, is annual salary measured in USD per year. Experience, $X$, is measured in years, and the qualitative category indicator, $D$, is $1$ for an employee with an MBA and $0$ for the non-MBA base category. The sample is cross-sectional, and the interaction lets the MBA change both starting salary and the experience slope.
| Term | Meaning and unit |
|---|---|
| $b_0$ | Base-category intercept, USD per year |
| $b_1$ | Base-category slope, USD per year per year of experience |
| $b_2$ | Category intercept shift, USD per year |
| $b_3$ | Category slope shift, USD per year per year of experience |
| $e$ | Unexplained component, USD per year |
The product $XD$ is the interaction, measured in years because $D$ is dimensionless. For a fitted value, $\hat Y$ is predicted annual salary, so $e$ is omitted.
$$ Y=b_0+b_1X+b_2D+b_3XD+e $$
Read the equation as a base line plus category shifts. The term $b_0$ starts the base-category prediction at $X=0$, and $b_1X$ moves it with experience. The term $b_2D$ shifts the intercept for the category of interest, while $b_3XD$ changes its slope. When $X$ equals $0$, $b_2$ is the category difference. When $D=0$, the intercept is $b_0$ and the slope is $b_1$. When $D=1$, the intercept is $b_0+b_2$ and the slope is $b_1+b_3$. A positive active term raises predicted salary, and a negative active term lowers it. If $b_3$ is nonzero, the category effect depends on $X$, so calculate the category-of-interest minus base-category difference as $b_2+b_3X$ at the specified $X$.
To test coefficient significance, use $H_0$: coefficient equals $0$ versus $H_A$: coefficient does not equal $0$, using the stated tail convention. Statistical significance concerns evidence against the zero coefficient. Economic significance comes from the size of the predicted salary difference.
Use this sequence when the question asks you to formulate or interpret the model.
Loading diagram…
The flow separates model setup from interpretation, which helps prevent a common substitution error. Choose the non-MBA group as the reference, then activate the MBA terms only when $D=1$. At the specified experience, calculate the fitted value and compare the two groups using both the intercept shift and the slope shift. The lines therefore share the same coding but can have different starting points and slopes.
Worked example
You are handed a sample, cross-sectional regression of annual salary measured in USD per year on experience measured in years and MBA status. The base category is non-MBA. The employee has an MBA and $5$ years of experience. The exam asks for predicted salary, the MBA experience slope, and the MBA category difference at $5$ years.
| Given | Value |
|---|---|
| $b_0$ | USD 50,000 per year |
| $b_1$ | USD 3,000 per year per year of experience |
| $b_2$ | USD 12,000 per year |
| $b_3$ | USD 1,000 per year per year of experience |
| $X$ | 5 years |
| $D$ | 1 for MBA |
| Base category | Non-MBA |
The first line is the non-MBA base category, and the second line is the MBA category. Compare the values at each experience level to see both effects of the interaction: the MBA line starts USD 12,000 higher at zero experience, then rises USD 1,000 more for each additional year. At five years, that accumulated slope shift makes the category difference USD 17,000, while the fitted MBA salary is USD 82,000 per year. The chart gives the pattern; the values below make the comparisons precise.
Loading diagram…
| Experience (years) | Non-MBA salary | MBA salary |
|---|---|---|
| 0 | USD 50,000 | USD 62,000 |
| 5 | USD 65,000 | USD 82,000 |
| 10 | USD 80,000 | USD 102,000 |
- Create the interaction. Multiply experience by the dummy because the MBA-specific slope shift is active only for the MBA employee. The product is $XD=5\times1=5.00$ years.
- Build the base prediction first. This isolates the non-MBA line. The result is $b_0+b_1X=50{,}000+3{,}000\times5=65{,}000$ USD per year.
- Calculate the category adjustment. The dummy activates both shifts. The result is $b_2D+b_3XD=12{,}000\times1+1{,}000\times5.00=17{,}000$ USD per year.
- Add the base prediction and category adjustment. The fitted salary is $65{,}000+17{,}000=82{,}000$ USD per year.
- Read the MBA slope. Because $D=1$, the slope is $b_1+b_3=3{,}000+1{,}000=4{,}000$ USD per year per year of experience.
The model predicts USD 82,000 per year for the MBA employee, an estimated USD 17,000 per year difference versus the non-MBA employee with the same experience.
Changed condition
You keep every coefficient and coding rule unchanged but change only experience. The employee now has $8$ years, and you need to predict how the fitted MBA salary and category difference move.
| Quantity | Original | Changed |
|---|---|---|
| Experience, $X$ | 5 years | 8 years |
| Predicted MBA salary | USD 82,000 per year | USD 94,000 per year |
| MBA category difference | USD 17,000 per year | USD 20,000 per year |
The prediction before calculating is straightforward. Moving $X$ from $5$ to $8$ years raises MBA salary because its slope is USD 4,000 per year of experience. The category difference widens from USD 17,000 to USD 20,000 because $b_3$ adds USD 1,000 per experience year. Before reading on, compute the base-category salary at $8$ years.
Common error
A candidate reads $b_2$ beside $D$ and calls it the unconditional category premium. That feels right because $b_2D$ is the visible category term. A nonzero $b_3$, or a request for the category effect at a specified experience level, gives it away, so calculate $b_2+b_3X$ instead.
Calculator
Enter the base prediction and the category adjustment separately, then add them.
| Keys | Display |
|---|---|
| 50000 + (3000 x 5) = | 65,000 |
| STO 1 | 65,000 |
| 12000 + (1000 x 5) = | 17,000 |
| RCL 1 + 17000 = | 82,000 |
Check yourself
Practice
A sample cross-sectional regression predicts annual salary in USD per year from experience in years and MBA status. The non-MBA employee is the base category. The model uses D=1 for MBA and D=0 for non-MBA. Estimated coefficients are b_0 of USD 50,000 per year, b_1 of USD 3,000 per year per year of experience, b_2 of USD 12,000 per year, and b_3 of USD 1,000 per year per year of experience. The employee has X=5 years and D=1.
Question 1
Which model correctly represents the salary relationship?
Question 2
What annual salary does the model predict for the employee?
Question 3
What experience slope does the model predict for the MBA employee?
Question 4
What is the MBA minus non-MBA category difference at 5 years of experience?
Which coding matches the stated base category and category of interest?
A coefficient is tested under the stated two-tailed convention. Which hypotheses are correct?
Revision snapshot
Code $D=1$ for the category of interest and $D=0$ for the base category. Use $Y=b_0+b_1X+b_2D+b_3XD+e$. $b_2$ is the category difference when $X$ equals $0$. When $D=0$, the intercept is $b_0$ and the slope is $b_1$. When $D=1$, the intercept is $b_0+b_2$ and the slope is $b_1+b_3$. If $b_3$ is nonzero, the qualitative-variable effect depends on $X$, so interpret $b_2+b_3X$ at the specified $X$. Test coefficient significance with $H_0$: coefficient equals $0$ versus $H_A$: coefficient does not equal $0$, using the stated tail convention. On exam, formulate the model, then calculate the requested value, slope, or category difference.
Unlock the full lesson and continue reading
Signup to continue reading this lesson and unlimited access questions, flashcards, AI notes, and more