hi i am beginner in latex and i am trying to write these 2 equations however i got different errors what is wrong with this code ? please,can anyone help ? thanks in advance
\begin{equation}
$Support(X )= \frac{No,of\; transactions\; that \; contain\; X}{No,of \;transactions\; in\; the \;database}$
\end{equation}
%\noindent
\begin{equation}
$confidence(X \longrightarrow Y)$=$ \frac {Support (X \cup Y) }{ support(X)}$
\end{equation}
The error messages are:
Missing $ inserted.
Display math should end with $$.
Bad math environment delimiter. \end{equation}
Missing $ inserted. \end{equation}
You can't use `\eqno' in vertical mode.
Best Answer
I think the following may be what you're looking to write. Observe the use of
\text
in the numerator and denominator of the first equation. I encased the termX
in the first numerator in$
symbols to inform LaTeX that it (theX
) should be processed in math mode.Observe also that there must be no blank lines in a display-math environment (such as
equation
).