# The independence symbol in LaTeX

If two random variables $X$ and $Y$ are independent of each other, it is common to write it as

\begin{aligned} X \perp \!\!\! \perp Y. \end{aligned}

It appears that there isn’t a built-in LaTeX command for $\perp \!\!\! \perp$. The reference below presents several possible ways to reproduce this symbol. My personal favorite is the following:

\newcommand{\indep}{\perp \!\!\! \perp}

You can then use the new command wherever you want the independence symbol, e.g. X \indep Y.

References:

1. StackExchange. double perpendicular symbol (for independence).