[Tex/LaTex] Split an equation into two lines

alignequationssplit

I have four consecutive equations. The third equation needs to be split into two. I need all the equations aligned. Also, instead of having each equation numbered separately, I want only one number indexing all the equations. I have written the following codes to implement it. However, the third equation's split does not look too nice. In addition, the right-hand side of each equation is very close to the "=" sign. Here is my output:

\begin{equation}
\begin{aligned}
SRI = & P\hat{P_x}+(1-P)(1-\hat{P_x}) \\
Var(SR)= & m^{-1}SRI(1-SRI) \\
Var(SRI) = & m^{-1}(2P-1)^2\hat{P_x}(1-\hat{P_x})+ m^{-1}(2\hat{P_x}-1)^2P_y(1-P_y)+ \\ 
& 4m^{-2}\hat{P_y}\hat{P_x}(1-P_y(1-\hat{P_x}) \\
P= & m^{-1}\sum_{j=1}^mI(\bar{\sigma}_{t+j})
\end{aligned}
\end{equation}

Could you suggest some improvements, please?

Best Answer

I would do this with alignedat and \widehat. Also, maybe I'm wrong, but I doubt that SRI and the like denote the product of the three variables S, R, I or Var is the product of V, a, r.

\documentclass{article}
\usepackage{mathtools}
\DeclareMathOperator{\Var}{Var}
\newcommand{\SR}{\mathit{SR}}
\newcommand{\SRI}{\mathit{SRI}}

\begin{document}

\begin{equation}
  \begin{alignedat}{2}
    \SRI &= P\widehat{P}_x+(1-P)(1-\widehat{P}_x) \\
    \Var(\SR) &= m^{-1}\SRI(1-\SRI) \\
    \Var(\SRI) &=
    m^{-1}(2P-1)^2\widehat{P}_x(1-\widehat{P}_x) & &{}+ m^{-1}(2\widehat{P}_x-1)^2P_y(1-P_y) \\
    & & &{}+ 4m^{-2}\widehat{P}_y\widehat{P}_x(1-P_y(1-\widehat{P}_x) \\
    P &= m^{-1}\sum_{j=1}^mI(\bar{\sigma }_{t+j})
  \end{alignedat}
\end{equation}

\end{document} 

enter image description here