statable Statistics for study and research

Dummy variable (0/1 variable)

How do you put a group into a regression? As a dummy variable: 0 for the reference group, 1 for the other. Then the constant is the reference mean, B the difference of means. With q groups you need q - 1 dummies.

Example: Fertilizer A (0), B (1): constant 5.0, B = 1.2. Mean of B: 6.2.

Caution: The sign of B depends on the reference. The test of B matches the independent-samples t test with equal spreads.

Open in Statable