Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to write $\sum_{i=1}^k y_i\log p_i +(n_i-y_i)\log(1-p_i)+\log \binom{n_i}{y_i}$ as one mathematician said it is correct but another said that one should write $\sum_{i=1}^k\left ( y_i\log p_i +(n_i-y_i)\log(1-p_i)+\log \binom{n_i}{y_i} \right )$

share|cite|improve this question
To expand on @vonbrand’s answer, the fact that the index $i$ appears in all three terms almost guarantees that they all belong to the summation, but you shouldn’t make the reader work that hard: it’s much better to enclose the entire summand in parentheses, so that it’s immediately obvious what is being summed. – Brian M. Scott Apr 19 '13 at 9:46
up vote 5 down vote accepted

If in doubt, add parentesis. The expression under the sum is too large in this case, so I'd add them to make clear what is being summed.

share|cite|improve this answer

Expressions like $$\tag?\sum_{i=1}^n a_i + 1$$ have two possible interpretations: $$\tag1\sum_{i=1}^n (a_i + 1)$$ or $$\tag2\left(\sum_{i=1}^n a_i\right) + 1.$$ Among others because of the uglyness of $(2)$ it is customary to interprete $(?)$ as $(2)$ and use explicit parentheses if one wants to have $(1)$. Note however, that no parentheses are necessary/customary for $$\sum_{i=1}^n a_i\cdot 2=\sum_{i=1}^n (a_i\cdot 2)= \left(\sum_{i=1}^n a_i\right)\cdot 2=2\sum_{i=1}^n a_i$$

share|cite|improve this answer
$1+\sum\limits_{i=1}^n a_i$ is clearer than $\sum\limits_{i=1}^n a_i+1$ with the same number of parentheses. – Jonas Meyer Aug 8 '14 at 2:18
I wish more people did this. – N. McA. Jul 17 '15 at 10:35

The only thing in $$ \sum_{i=1}^k y_i\log p_i +(n_i-y_i)\log(1-p_i)+\log \binom{n_i}{y_i} $$ that tells us that the summation should involve all terms is that all terms have an index $_i$ on them. For example, the following example is much unclearer: $$ \sum_{i=1}^n a_i+b $$ which could either mean $$ \left(\sum_{i=1}^n a_i\right)+b\quad\text{or}\quad\sum_{i=1}^n \left(a_i+b\right)=\left(\sum_{i=1}^n a_i\right)+nb, $$ which is two completely different things. So, it's a good habit to include parentheses as @vonbrand also answers.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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