I am trying to write this:



$$p_{\Theta | X} = \frac{p_{\Theta}(\theta) p_{X|\Theta}(x\,|\,\theta)}{\sum_{\theta ‘} p_{\Theta}(\theta ‘) p_{X|\Theta}(x\,|\,\theta ‘)}$$

However, what I get is this instead:


The theta prime of the summation does not come out right. Please help.

  • 2
    note you should not use $$ in latex, and it is not a case of wrong or right, the subscript position is quote standard layout in compressed contexts like inline math or fractions. – David Carlisle Jan 14 at 7:54

Must use \limits after \sum

$$p_{\Theta | X} = \frac{p_{\Theta}(\theta) p_{X|\Theta}(x\,|\,\theta)}{\sum\limits_{\theta '} p_{\Theta}(\theta ') p_{X|\Theta}(x\,|\,\theta ')}$$

enter image description here

  • Thank you! How come it still came out right with out limit when it is not inside a fraction? – J. Doe Jan 14 at 3:50
  • 2
    $$p_{\Theta | X} = \frac{p_{\Theta}(\theta) p_{X|\Theta}(x\,|\,\theta)}{\displaystyle\sum_{\theta '} p_{\Theta}(\theta ') p_{X|\Theta}(x\,|\,\theta ')}$$ Use \displaystyle inside the \frac – Saravanan Jan 14 at 3:53
  • 1
    The \frac command, which is in the basic command set of LATEX, takes two arguments—numerator and denominator—and typesets them in normal fraction form. The amsmath package provides also \dfrac and \tfrac as convenient abbreviations for {\displaystyle\frac ... } and {\textstyle\frac ... }. – Saravanan Jan 14 at 4:20
  • 2
    That's "\limits", not "\limit". – barbara beeton Jan 14 at 19:37
  • 1
    Peraphs, for my humble opinion, it is better \mid instead of |. – Sebastiano Jan 14 at 22:18

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.