1

I have come accross the following formula:

$ y = \sum\limits_{i=1}^{n} w_i \cdot x_i + b $

The idea that the author wanted to express was to add all products $w_1 \cdot x_1 + w_2 \cdot x_2 \ldots $ and then to add $ b $ once. However, without context, I would have understood the formula to add $ b $ $ n $ times.

Thus my question, is this formula ambiguous, or is it generally understood that $ b $ needs to be added once only, or is the formula written wrongly?

  • 1
    There's no objective answer here, but to me, a writer is at fault if they leave these kinds of ambiguities. – Lee Mosher Jan 23 '23 at 20:14
  • 1
    The more relevant question is *where did you encounter this question." Please provide the source; we cannot answer about "context", unless you provide more details. "I came across $abc$, is meaningless unless you provide information regarding where you came across it. Else, your guess is a good as ours. – amWhy Jan 23 '23 at 20:17
  • 1
    @Lee Mosher we can't know what writer, or where, or if the OP failed to be faithful to the question, perhaps by misunderstanding, unless the OP provides sufficient context. Please note, there is no objective question here. From what I see, there are not answers. – amWhy Jan 23 '23 at 20:19
  • 2
    @amWhy, this is in a non public document that I can't share. But I would have thought that the meaning of such a simple formula is not subject to context. – René Nyffenegger Jan 23 '23 at 20:21
  • 2
    All the more reason to why the question is off topic. Your refusal to add any context of any kind. – amWhy Jan 23 '23 at 20:24
  • 7
    This is a simple question about notational conventions and requires no context. Closing the question as off-topic because the OP cannot quote any more context is absurd. – Rob Arthan Jan 23 '23 at 23:22
  • 1
    Parantheses can avoid misunderstandings , but without them , I think , almost every mathematician would interprete "+b" to come after the sum. as a single summand. – Peter Jan 24 '23 at 09:23

1 Answers1

2
  • The scope of the sigma operator $\Sigma$ is defined exclusively by arithmetic precedence rules. The scope is given by the expression immediately following $\Sigma$ and is valid, subject to arithmetic precedence rules, up to an operator with precedence level '$+$' or to the end if no such operator follows.

    This implies that \begin{align*} y = \sum\limits_{i=1}^{n} w_i \cdot x_i + b&= \sum\limits_{i=1}^{n} \left(w_i x_i\right)+ b\\ &= \left(\sum\limits_{i=1}^{n} w_i x_i\right) + b=b+\sum\limits_{i=1}^{n} w_i x_i \end{align*}

  • The scope of the sigma operator is addressed in section 1.3 Scope of Notes on summations and related topics by J. Aspnes.

    Using this common convention we write for example \begin{align*} \sum_{i=1}^5i=1+2+3+4+5=1+\sum_{i=2}^5i=\sum_{i=1}^4i+5 \end{align*}

Hint: You might also find chapter 2: Sums in Concrete Mathematics by R.L. Graham, D.E. Knuth and O. Patashnik helpful. It provides a thorough introduction in the usage of sums.

Markus Scheuer
  • 108,315