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

$$Support(X )= \frac{No,of\; transactions\; that \; contain\; X}{No,of \;transactions\; in\; the \;database}$$

%\noindent
$$confidence(X \longrightarrow Y)= \frac {Support (X \cup Y) }{ support(X)}$$


The error messages are:

Missing $inserted. Display math should end with$$. Bad math environment delimiter. Missing$ inserted.
You can't use \eqno' in vertical mode.

• (1) welcome, (2) $$...$$ is already math mode, so no $...$ in there, (3) blank lines are not allowed inside math envs Commented Jun 30, 2017 at 9:56
• (1)thank you for answering(2) i deleted the blank lines but i still have the same errors messages
–  DrCh
Commented Jun 30, 2017 at 10:02

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 term X in the first numerator in \$ symbols to inform LaTeX that it (the X) should be processed in math mode.

Observe also that there must be no blank lines in a display-math environment (such as equation).

\documentclass{article}

\usepackage{amsmath} % for "\text" and "\DeclareMathOperator" macros
\DeclareMathOperator{\Support}{Support}
\DeclareMathOperator{\Confidence}{Confidence}

\begin{document}

$$\Support(X) = \frac{\text{No of transactions that contain X}}% {\text{No of transactions in the database}}$$

$$\Confidence(X \longrightarrow Y) = \frac{\Support(X\cup Y)}{\Support(X)}$$

\end{document}
`
• thank you it works i will make sure to use \text in the next times
–  DrCh
Commented Jun 30, 2017 at 10:19