LyX is giving a lot of error messages for my Latex code which runs in other places.
\[
\begin{array}{rl}
p_{Y \mid H_1}(y \mid H_1) & = f_X(g^{-1}(y))\left| \dfrac{dg^{-1}(y)}{dy} \right| \\ \\
& = \begin{cases} y>0 & : & f_X(\ln(y))\left| \dfrac{d \ln(y)}{dy} \right| = \dfrac{f_X(\ln(y))}{y} \\
\text{otherwise} & : & 0
\end{cases}
\end{array}
\]
LyX says:
Extra alignment tabs changed to \cr.
& = \begin{cases} y>0 & : &
f_X(\ln(y))\left| \dfrac{d \ln(y)}{dy} \ri...
You have given more \span or & marks than there were
in the preamble to the \halign or \valign now in progress.
So I'll assume that you meant to type \cr instead.
However the exact code works perfectly in the SE Mathematics domain to give this output:
What does LyX not like in my code?