I'm quite new to LaTeX and struggling with the alignment in math mode. Is there any way to nicely align the bar in my equation:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
We denote by
\begin{equation}
\text{OOB-MSE} = \frac{1}{n}\sum_{i=1}^{n}(y_i - \bar{\widehat{y}}_{i \: \text{OOB}})^2,
\end{equation}
the so-called out-of-bag mean square error, where $\overline{\widehat{y}}_{i \: \text{OOB}}$ is the averaged...
\end{document}
I also tried the command from another similar question (Aligning issue with overline) but it's much smaller than the overline bar and still not really aligned..
\newcommand{\myol}[2][3]{{}\mkern#1mu\overline{\mkern-#1mu#2}}
Thanks!
The first bar in the picture uses the \bar command and the second uses the \overline command. Both aren't nicely aligned.
\bar{\hat{y}}
mathabx
package defines\widebar
.