STA 235 · Week 4 · categorical variables

A category and a number in one model

Use both training type and number of client meetings to predict monthly sales.

Core idea: A multiple regression can include a quantitative predictor and a categorical predictor together. The quantitative coefficient describes a change per unit; the category coefficient compares groups while holding the number variable fixed.

The additive model

Let Meetings be client meetings per month and let Coaching equal 1 for salespeople with coaching and 0 otherwise.

Sales = 35 + 2.5(Meetings) + 8(Coaching)

Meetings coefficient: 2.5

If we have two sales people with the same level of coaching but one has one more meeting, that one is predicted to make $2.5k more in sales.

Coaching coefficient: 8

At the same number of meetings, coaching predicts $8k more sales.

Model lab

Move the sliders and compare the two groups at the same number of meetings. Switch the reference category to see coefficients re-expressed.

Reference category
Prediction for
35
2.5
+8
6
Predicted sales by meetings and training groupA line chart shows predicted sales from zero to fifteen meetings for coaching and no-coaching groups.
No coachingCoaching
TermInterpretationCoefficient ($k)

Why the lines stay parallel

In this additive model, the effect of each additional meeting is the same in both groups. Coaching shifts the prediction by a constant amount, so the vertical distance between the two lines stays the same at every number of meetings.

Quick check

In Sales = 35 + 2.5(Meetings) + 8(Coaching), what does the 8 mean?