I have a relation called Likelihood Ratio Test which has a special format. As you see in the picture, there are two non-equality signs and also somethings above and below them. How can I write these symbols? 
Asked
Active
Viewed 3,521 times
29
MEDVIS
- 501
3 Answers
24
I propose using \gtrless of amssymb, to begin with.
The “official” way would be
\underset{H_0}{\overset{H_1}{\gtrless}}
but the effect is the same with more efficient code:
\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\newcommand{\LRT}[2]{%
\mathrel{\mathop\gtrless\limits^{#1}_{#2}}%
}
\begin{document}
\begin{equation*}
\Lambda(y)=\frac{p(y\mid H_1)}{p(y\mid H_0)} \LRT{H_1}{H_0} \lambda
\end{equation*}
\end{document}
egreg
- 1,121,712
17
You can use a \Vectorstack, where the baselineskip of the stack may be set to the desired value. As Bernard points out, a \Vectorstack is actually a \Centerstack that is automatically processed in math mode.
\documentclass{article}
\usepackage{stackengine}
\begin{document}
\[
\setstackgap{L}{.7\baselineskip}
\Lambda(y) = \frac{p(y{\mid}H_1)}{p(y{\mid}H_0)}
\Vectorstack{H_1 > < H_0}
\lambda.
\]
\end{document}
Steven B. Segletes
- 237,551
10
You can stack these using a regular array:
\documentclass{article}
\begin{document}
\[
\Lambda(y) = \frac{p(y \mid H_1)}{p(y \mid H_0)}
\begin{array}{c}
H_1 \\ > \\ < \\ H_0
\end{array}
\lambda.
\]
\end{document}
Werner
- 603,163



\Vectorstack? I thought\Centerstackwas rather for text. – Bernard Oct 14 '15 at 17:52\Vectorstackin lieu of the\Centerstackindeed allows one to eliminate the\stackMathdirective. – Steven B. Segletes Oct 14 '15 at 17:59{}around\mid, I'll put that in my list of tricks. – Rmano Oct 15 '15 at 10:42{}\mid{}. Compare, for example, x\mbox{$\mid$}xtox\mbox{${}\mid{}$}x`. – Steven B. Segletes Oct 15 '15 at 10:49