[Tex/LaTex] Splitting conditions in equations

equations

I'm trying to split the condition in a set of equations; see figure.

enter image description here

This is my code:

\begin{align*}
\rho(X,Y)&=1&
\begin{split}
\text{if and only if }\mathbb P(Y=\alpha X+\beta)=1\\
\text{for some real $\alpha$ and $\beta$ with }\alpha>0,
\end{split}\\
\rho(X,Y)&=-1&
\begin{split}
\text{if and only if }\mathbb P(Y=\alpha X+\beta)=1\\
\text{for some real $\alpha$ and $\beta$ with }\alpha<0.
\end{split}
\end{align*}

However, the first line of the condition isn't at the same level as the equation. I don't like it how the conditions are aligned.

Does anyone know how to fix this, or what other environment to use?

Best Answer

Please post full documents not fragments, I'd use parbox or aligned

enter image description here

\documentclass{article}

\usepackage{amsmath,amsfonts}

\begin{document}

a
\begin{align*}
\rho(X,Y)&=1&&
\parbox[t]{5cm}{
if and only if $\mathbb P(Y=\alpha X+\beta)=1$\\
for some real $\alpha$ and $\beta$ with $\alpha>0$,}
\\[\jot]
\rho(X,Y)&=-1&&
\parbox[t]{5cm}{if and only if $\mathbb P(Y=\alpha X+\beta)=1$\\
for some real $\alpha$ and $\beta$ with $\alpha<0$.}
\end{align*}

or
\begin{align*}
\rho(X,Y)&=1&&
\begin{aligned}[t]\text{if and only if }\mathbb P(Y=\alpha X+\beta)=1\\
\text{for some real $\alpha$ and $\beta$ with }\alpha>0,
\end{aligned}\\[\jot]
\rho(X,Y)&=-1&&
\begin{aligned}[t]\text{if and only if }\mathbb P(Y=\alpha X+\beta)=1\\
\text{for some real $\alpha$ and $\beta$ with }\alpha<0.
\end{aligned}
\end{align*}
\end{document}