I found from http://jblevins.org/notes/latex that I could use the independence symbol:

\newcommand\independent{\protect\mathpalette{\protect\independenT}{\perp}} \def\independenT#1#2{\mathrel{\rlap{$#1#2$}\mkern2mu{#1#2}}}
\newcommand\independent{\protect\mathpalette{\protect\independenT}{\perp}}
\def\independenT#1#2{\mathrel{\rlap{$#1#2$}\mkern2mu{#1#2}}}
I was wondering how this works. Can anybody explain? I don't know the commands mathpalette, rlap, and mkern2mu.