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}$



$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. \end{equation} 
  Missing $ inserted. \end{equation}
  You can't use `\eqno' in vertical mode. 
  • 4
    (1) welcome, (2) \begin{equation}...\end{equation} is already math mode, so no $...$ in there, (3) blank lines are not allowed inside math envs – daleif Jun 30 '17 at 9:56
  • (1)thank you for answering(2) i deleted the blank lines but i still have the same errors messages –  DrCh Jun 30 '17 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).

enter image description here


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


\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)}

| improve this answer | |
  • thank you it works i will make sure to use \text in the next times –  DrCh Jun 30 '17 at 10:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.