ArticleslgStudy

mathematics

Dummy variable (statistics)

Dummy variable (statistics) is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Dummy variable (statistics) rather than just read about it. In short: In regression analysis, a dummy variable (also known as indicator variable or just dummy) is one that takes a binary value (0 or 1) to indicate the absence or presence of some categorical effect that may be expected to shift the outcome. In machine learning this is known as one-hot encoding.

Dummy variable (statistics) — main illustration
Dummy variable (statistics) — illustration

Key takeaways

  • Dummy variable (statistics) belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Dummy variable (statistics) to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Dummy variable (statistics) from memory before moving on to harder problems.

Reference excerpt

In regression analysis, a dummy variable (also known as indicator variable or just dummy) is one that takes a binary value (0 or 1) to indicate the absence or presence of some categorical effect that may be expected to shift the outcome. In machine learning this is known as one-hot encoding. Dummy variables are commonly used in regression analysis to represent categorical variables that have more than two levels, such as education level or occupation. In this case, multiple dummy variables would be created to represent each level of the variable, and only one dummy variable would take on a value of 1 for each observation. Dummy variables are useful because they allow the use of categorical variables in our analysis, which would otherwise be difficult to include due to their non-numeric nature.

Function and use A dummy variable is applied to a binary variable--for example, sex may be encoded as a dummy variable by listing females as 0 and males as 1. As with any addition of variables to a model, the addition of dummy variables will increase the within-sample model fit (coefficient of determination), but at a cost of fewer degrees of freedom and loss of generality of the model (out of sample model fit). Too many dummy variables result in a model that does not provide any general conclusions. Dummy variables are useful in various cases. For example, in econometric time series analysis, dummy variables may be used to indicate the occurrence of wars, or major strikes. It could thus be thought of as a Boolean, i.e., a truth value represented as the numerical value 0 or 1 (as is sometimes done in computer programming). Dummy variables may be extended to more complex cases. For example, seasonal effects may be captured by creating dummy variables for each of the seasons: D1=1 if the observation is for summer, and equals zero otherwise; D2=1 if and only if autumn, otherwise equals zero; D3=1 if and only if winter, otherwise equals zero; and D4=1 if and only if spring, otherwise equals zero. In the panel data fixed effects estimator dummies are created for each of the units in cross-sectional data (e.g. firms or countries) or periods in a pooled time-series. In such regressions, either the constant term or one of the dummies has to be removed making this the base category against which the others are assessed. This is because if dummy variables for all categories were included, their sum would equal 1 for all observations, which is identical to and hence perfectly correlated with the vector-of-ones variable whose coefficient is the constant term; if the vector-of-ones variable were also present, this would result in perfect multicollinearity, so that the matrix inversion in the estimation algorithm would be impossible. This is referred to as the dummy variable trap.

See also Binary regression – Statistical estimation method Chow test – Mathematical test proposed by Gregory Chow Hypothesis testing – Method of statistical inferencePages displaying short descriptions of redirect targets Indicator function – Mathematical function characterizing set membership Linear discriminant function – Method used in statistics, pattern recognition, and other fields Multicollinearity – Linear dependency situation in a regression model One-hot – Bit-vector representation where only one bit can be set at a time

References

Further reading Asteriou, Dimitrios; Hall, S. G. (2015). "Dummy Variables". Applied Econometrics (3rd ed.). London: Palgrave Macmillan. pp. 209–230. ISBN 978-1-137-41546-2. Kooyman, Marius A. (1976). Dummy Variables in Econometrics. Tilburg: Tilburg University Press. ISBN 90-237-2919-6.

External links

Maathuis, Marloes (2007). "Chapter 7: Dummy variable regression" (PDF). Stat 423: Applied Regression and Analysis of Variance. Archived from the original (PDF) on December 16, 2011. Fox, John (2010). "Dummy-Variable Regression" (PDF). Baker, Samuel L. (2006). "Dummy Variables" (PDF). Archived from the original (PDF) on March 1, 2006.

Illustrations

Dummy variable (statistics): A graph showing the gender wage gap
A graph showing the gender wage gap

Worked examples

Example 1 — a first encounter with Dummy variable (statistics)

Start with the simplest possible case. Write down what Dummy variable (statistics) claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Dummy variable (statistics) before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Dummy variable (statistics) ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Dummy variable (statistics)

In research
Dummy variable (statistics) appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Dummy variable (statistics) in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Dummy variable (statistics) is common in secondary-school and first-year university syllabi. It links to neighbouring topics Regression variable selection, so understanding it makes those chapters shorter.
In everyday life
Look for Dummy variable (statistics) outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Dummy variable (statistics)” →

How to study Dummy variable (statistics) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Dummy variable (statistics) means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Dummy variable (statistics) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Dummy variable (statistics) in simple terms?

In regression analysis, a dummy variable (also known as indicator variable or just dummy) is one that takes a binary value (0 or 1) to indicate the absence or presence of some categorical effect that may be expected to shift the outcome. In machine learning this is known as one-hot encoding.

Why does Dummy variable (statistics) matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Dummy variable (statistics)?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Dummy variable (statistics).

Tags

  • Regression variable selection

Keep exploring