Regression & Predictive Modeling

Dummy Variable

A dummy variable is a 0/1 column that lets a regression use a yes-or-no or category feature. For example, you encode is_member as 1 for members and 0 for non-members; its coefficient then reads as the predicted difference in the outcome between members and non-members.

For a category with several levels (say city = Taipei, Tainan, Hualien) you create one dummy per level but deliberately leave one out as the baseline, comparing every other level against it — including all of them would make the math break (the dummy variable trap, a form of perfect multicollinearity). So coefficients on dummies are always differences relative to whichever group you dropped.

Also called
indicator variableone-hot encoding (per level)