Align lines in LaTeX

math-mode

I am using this site to write my latex equations and download them as images for my blogs. I want to write something that looks like the equation in the image on that site. How can I do that?

The Latex equation I want

This is what I have tried,

\\
MSE = \frac{\sum_{i = 1}^{n} (y_i - \hat{y_i})^2}{n}
\\
\\
(OR)$$
\\
\\
MSE = \frac{SSE}{n}

And it gives me this,

Output

Best Answer

Since the gather environment does not work on https://latex.codecogs.com/eqneditor/editor.php, try this:

\begin{array}{c}
\mathrm{MSE}=\frac{\sum_{i=1}^{n}(y_i-\hat{y}_{i})^{2}}{n}\\[2mm]
\text{(OR)}\\[2mm]
\mathrm{MSE}=\frac{\mathrm{SSE}}{n}
\end{array}

enter image description here

Related Question