1
$\begingroup$

Possible Duplicate:
FAQ for math.stackexchange

Suppose that I want to sum p(xi)*log(p(xi)) from one to n. How can I type it using LaTeX? Please help me guys. I want to type it on math.stackexchange.com.

$\endgroup$

marked as duplicate by Jeff Atwood Jan 22 '12 at 1:36

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    $\begingroup$ \sum_{i=1}^n p(x_i)\log p(x_i) $\to \sum_{i=1}^n p(x_i)\log p(x_i)$. $\endgroup$ – Rahul Dec 30 '11 at 10:24
  • $\begingroup$ if we want to use - sign?(minus)or for example -1/2*log1/2-1/3*log/1/3? $\endgroup$ – dato datuashvili Dec 30 '11 at 10:27
  • $\begingroup$ it does not work $\endgroup$ – dato datuashvili Dec 30 '11 at 10:39
  • 6
    $\begingroup$ You have to surround math with dollar signs to have it render: $\sum_{i=1}^n p(x_i)\log p(x_i)$. Also, take a look at How do I type math in my question/answer/comment? And it would help if you gave a little more information than just "it does not work". $\endgroup$ – Rahul Dec 30 '11 at 10:40
  • 4
    $\begingroup$ If this question is due to this post here's why you had trouble: you shouldn't put blanks in front of the dollars (a line starting with four blanks gives a code block). The line containing the first formula was perfectly okay, up to those blanks. $\endgroup$ – t.b. Dec 31 '11 at 3:35

Browse other questions tagged .