Should parentheses be used in sums of the form $\sum_{i=1}^k A_i+B_i+C_i$? 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 )$

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