I'm triying to write an equation on Latex with overleaf with the following code :
\begin{equation}
\dfrac{1}{n}\sum_{i = 1}^ {n}x_{i} ^{2} + \widehat{x}_{i} ^{2} + y_{i} ^{2} + \widehat{y}_{i} ^{2} = \: <|E_{x}| ^{2}> + <|E_{y}| ^{2}>
\end{equation}
However when I do, I got 9 warnings mostly about missing $ and the numbering is behind my equation instead of being next to it.
I don't understand the source of the warnings does anyone know ?

\sumsymbol be enclosed in a pair of parentheses? – Mico Apr 03 '20 at 19:33