I am trying to create to create a set of equations as follows
The fractions 1/2 and 40/89 should be dead centered above each other,
similarly for 1/2 and 49/89. And 0.040 and 0.036 should be right above each other.
Ideally the operators \cdot, 0 and = should also be right above each other.
Is this possible without some dirty hacks as depicted below?
\documentclass[10pt]{article}
\usepackage{amsmath}
\begin{document}
\def\spc{\hspace*{0.087cm}}
\def\spct{\hspace*{0.075cm}}
\begin{align*}
\widehat{p}_a
&= \spc \frac{1}{2} \spc \cdot \frac{X}{10} + \spc \frac{1}{2} \spc \cdot \frac{\,Y}{10}
= \spct \frac{1}{25} \spct
= 0.040 \\
\widehat{p}_g
&= \frac{40}{89} \cdot \frac{X}{10} + \frac{49}{89} \cdot \frac{\,Y}{10}
= \frac{16}{445}
\approx 0.036
\end{align*}
\end{document}



alignisn't set up to treat parallel equations this way; this question covers the same situation: Using arrays to align parallel equations: Why isn't $|z|$ centered? – barbara beeton Mar 25 '20 at 00:36