[Tex/LaTex] How to write this bar in LaTeX

barsymbols

I want to write this in LaTeX:

Ori

However, $$\overline{S_n}^2 = \frac{1}{n}\sum\limits_{i=1}^{n}(X_i - M_n)^2$$ gives me:

Ove

whereas $$\bar{S_n}^2 = \frac{1}{n}\sum\limits_{i=1}^{n}(X_i - M_n)^2$$ gives me:

Bar

How can I fix this?

Best Answer

Hope the below code may helps you...

\documentclass{book}

\begin{document}

\[
\overline{S}^{2}_{n}
\]

\[
\overline{S_{n}}^{2}
\]

\[
\bar{S_{n}}^{2}
\]
\end{document}

Output

enter image description here

Related Question