cases environment inside an array

Here's a solution which (a) uses the align* environment instead of the array environment and (b) inverts the order of the arguments inside the cases environment (as I believe that this may be closer to general usage of this environment). It also defines a macro called \abs to simplify typesetting in the body of the example.

enter image description here

\documentclass{article}
\usepackage{amsmath}
\newcommand{\abs}[1]{\left|#1\right|}
\begin{document}
\begin{align*}
p_{Y \mid H_1}(y \mid H_1) 
&= f_X(g^{-1}(y)) \abs{ \dfrac{dg^{-1}(y)}{dy} } \\ 
&= \begin{cases}
      f_X(\ln(y)) \abs{ \dfrac{d \ln(y)}{dy} } = \dfrac{f_X(\ln(y))}{y} & \text{if $y>0$}\\
      0 & \text{otherwise}
   \end{cases}
\end{align*}
\end{document}

If you want to state the condition part before the result part in the cases environment, you could write it as:

   \begin{cases}
      \text{if $y>0$} &:\  
        f_X(\ln(y)) \abs{ \dfrac{d \ln(y)}{dy} } = \dfrac{f_X(\ln(y))}{y}\\
      \text{otherwise} &:\ 0  
   \end{cases}

leading to the following result:

enter image description here


cases only takes one alignment point (that is, it is a two column table) and you have used two on each row. Deleting the extra ones makes it work. Please in future always post complete documents showing all relevant packages (amsmath here).

\documentclass{article}
\usepackage{amsmath}
\begin{document}

\[
\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}
\]

\end{document}

While this works it is misusing array (which intended for matrices not as an aligned display) You would be better to use the ams alignments such as align.