[Tex/LaTex] Missing $ inserted Error

math-mode

I am trying to use the CRPS formula in Latex and I am very new to it. I am getting a Missing $ inserted error from the equation below. I know it's a common problem, but I haven't been able to solve it. Please help!

CRPS = \int_{-\infty }^{\infty }
       \left [ F_{y\right}\left (y \right )-1\left ( y \geq x\big\ \right ) \right]]^{2}dy

Hi, this is a part of the thesis template of my university. I am not supposed to edit the preamble.

Best Answer

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
  \textrm{CRPS} = \int_{-\infty}^{\infty}
       \left[F_{y}\left(y \right)-1\left(y \geq x\right) \right]^{2}\textrm{d}y
\end{equation}
\end{document}

enter image description here

Or

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
  \textrm{CRPS} = \int\limits_{-\infty}^{\infty}
       \left[F_{y}\left(y \right)-1\left(y \geq x\right) \right]^{2}\textrm{d}y
\end{equation}
\end{document}

enter image description here

Edit:

The bunch of \left and \rights are not needed as noted in the comments. Further, this will work without amsmath. (I add amsmath/mathtools instinctively :-)).

Adding to the above the equation:

\textrm{CRPS} = \int\limits_{-\infty}^{\infty}
       \left[F_{y}\left(y \right)-1\left(y \geq x\right) \right]^{2}\textrm{d}y

when copy pasted in to http://www.codecogs.com/latex/eqneditor.php works for me:

enter image description here

Hence, if it is not working for you, you may have to give some more details for trouble shooting.

Related Question