Clear explanation of dummy variable trap I have a confusion in multiple regression about dummy variable trap, so far I had seen tutorials explaining about dummy variable trap and multicollinearity but I'm unable to understand it fully.
 A: Let's say you have a binary variable, like sex. You create two dummy variables to reflect that in your model. Let's say you have six individuals $(M,F,F,M,M,F)$. Your dummy variables look like:


*

*$X_1=(0,1,1,0,0,1)$

*$X_2=(1,0,0,1,1,0)$
But now $X_{i1}+X_{i2} = 1$ for every possible $i$ so you have a case of perfect multicolinearity. The model will not distinguish between an effect caused by a high $X_1$ or a low $X_2$ and vice-versa.
The way to avoid this trap is to get rid of one of those variables. but this implies taking one of the groups as a "reference" which is kind of an arbitraty choice.
More importantly, when considering multiple factors simultaneously, it may be the case that some of the dummy variables reach perfect multicolinearity due to the way your individuals are distributed among the groups.
Imagine, for example, you also have data like "taller than 170 cm/shorter than 170 cm" and you get $(T,S,S,T,T,S)$ (which is not rare to expect) You will be facing a similar problem to that we had when considering $X_1$ and $X_2$
