Three test scores: 3, 5, and 10 out of 10. How did the week go? One number, not three, is the honest answer: add them up and share the total out equally. That is the average, and it takes two steps that every chapter of this course repeats: add up a list, then divide by how many. Why do we care? Because "how wrong is the network?" is always answered by adding up many small errors and averaging them. Math has a special sign for "add these up," and this section teaches you to read it.
Three friends bring 3, 5, and 10 cookies to share. Pool them: 18 cookies. Share them out fairly: 18 split three ways is 6 each. That fair share is the average, which math also calls the mean. Nobody actually brought 6 cookies, and that is fine. The average is what each person would have if the pile were evened out.
Math has a shorthand for "pool them," a big letter that looks like a pointy E: \Sigma. It is the Greek capital S, for Sum, and it just means "add these up." The little writing around it says which things to add. Underneath, "i = 1" means "start with cookie-bringer number 1." On top, a 3 means "stop after number 3." Next to it, x_i means "however many that person brought." So \sum_{i=1}^{3} x_i says: add up what person 1, person 2, and person 3 brought. That is 18.
Putting a \frac{1}{3} in front means "then split it three ways," and the answer, 6, is written \bar{x}, said "x bar." The bar over the top is the sign for "average of."
One more move you will see a lot: square each number first, then add. Three squared is 9, five squared is 25, ten squared is 100, total 134. That is not the same as adding first and squaring after, which gives 18 squared, or 324. The order of the two steps changes the answer. Last, a picture worth keeping: the average is the balance point. The 3 is 3 below it, the 5 is 1 below, the 10 is 4 above, and 3 plus 1 equals 4. The two sides balance.
The list is 3, 5, 10. The sum: 3 + 5 + 10 = 18. There are 3 items, so divide: 18 / 3 = 6. Now square each item first, then add: 9 + 25 + 100 = 134.
A sum is the result of adding a list of numbers. An average, also called the mean, is the sum divided by how many numbers were added. The sigma sign \Sigma is a capital Greek letter S, and it means "add these up."
Give the list a name: x_1 = 3, x_2 = 5, x_3 = 10. The small number is the position in the list. Then \sum_{i=1}^{3} x_i = x_1 + x_2 + x_3 = 18. Read it symbol by symbol. \Sigma says "add up." The letter i under it is a counter. "i = 1" says the counter starts at 1; the 3 on top says it stops at 3. x_i is "the i-th item." So the whole thing means: add up item 1, item 2, item 3. With n items, the stopping number is n and the sum is \sum_{i=1}^{n} x_i.
The mean gets its own symbol, \bar{x}, read "x bar": \bar{x} = \frac{1}{n}\sum_{i=1}^{n} x_i = \frac{1}{3}(3 + 5 + 10) = \frac{18}{3} = 6. The \frac{1}{n} in front is the "share it out equally" step. The sum of squares squares each item before adding: \sum_{i=1}^{3} x_i^2 = 3^2 + 5^2 + 10^2 = 9 + 25 + 100 = 134.
Two things people get wrong. Squaring after adding is a different number: (3 + 5 + 10)^2 = 18^2 = 324, not 134. And the mean need not be one of the items. Here the items are 3, 5, 10 and the mean is 6, which is not in the list. The mean is the balance point: the items below it are 3 and 1 short, the item above it is 4 over, and 3 + 1 = 4.
The average is the balance point
Three equal weights sit at 3, 5, and 10. Before you read the readout, guess where the beam balances. Then drag one weight's slider to 0 to remove that item and watch the balance point move to the average of the two that remain.
Loading interactive…
Six ways to write three numbers
The list is x₁ = 3, x₂ = 5, x₃ = 10. Work out the value of each card, then sort it into the bin with that value.
Loading interactive…
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
What this task checks
Structure checked automatically. Whether your ideas are convincing isn't graded, so reread with the checklist.
The compiler says
A model answer
Correct answer
Also accepted:
Why
Why
Below the average and above it
The three items and their average are marked. Add up the two gaps on the left of the 6, then compare with the single gap on its right.
Loading interactive…
Worked example
Basic: the mean of 3, 5, 10
-
1
Find the sum and the mean of the list 3, 5, 10.
-
2
Add the items: \sum_{i=1}^{3} x_i = 3 + 5 + 10 = 18.
-
3the 1/n step: share out equally
Count the items: n = 3. Divide the sum by the count: \bar{x} = \frac{18}{3}.
the 1/n step: share out equally
-
4\boxed{\bar{x} = 6}
Check the balance: 3 and 5 sit 3 + 1 = 4 below 6; 10 sits 4 above. Balanced, so 6 is right.
Worked example
Typical: four scores, the mean, and the sum of squares
-
1
Four quiz scores are 7, 9, 4, 8. Find the mean and the sum of squares \sum_{i=1}^{4} x_i^2.
-
2
Sum: 7 + 9 + 4 + 8 = 28. Count: n = 4. Mean: \bar{x} = \frac{28}{4} = 7.
-
3
Sum of squares means square each score first, then add: 7^2 + 9^2 + 4^2 + 8^2 = 49 + 81 + 16 + 64.
-
4\boxed{\bar{x} = 7, \qquad \sum_{i=1}^{4} x_i^2 = 210}
This time the mean, 7, happens to be in the list. It does not have to be, but nothing stops it.
Worked example
Common trap: squaring the sum instead of summing the squares
-
1
For the list 3, 5, 10, a student reads \sum x_i^2 as "add them up, then square." What do they get, and what is the right value?
-
2the wrong belief: "the square applies to the whole sum"
Adding first and squaring after: (3 + 5 + 10)^2 = 18^2 = 324.
the wrong belief: "the square applies to the whole sum"
-
3
But the little 2 sits on x_i, on each item, not on the \Sigma. So the square happens to each item before the adding: \sum_{i=1}^{3} x_i^2 = 3^2 + 5^2 + 10^2 = 9 + 25 + 100.
-
4\boxed{134,\ \text{not } 324}
Where a power sits tells you when to apply it. \left(\sum x_i\right)^2, with the parentheses, is the 324; \sum x_i^2 is the 134. The two are rarely close.
Where this goes next
This course, Chapter 1 and Chapter 7
Chapter 1, in "How wrong was the guess: error and squared error," lines up the five used cars against a line and gets five errors: 2, 3, 3, 4, 3. It squares each one and adds: 4 + 9 + 9 + 16 + 9 = 47. That is a sum of squares, this section's \sum x_i^2 move exactly. Then it divides by 5 to get 9.4, which is a mean. Chapter 7 gives that number its full name, "mean squared error," and its formula, \frac{1}{n}\sum_{i=1}^{n}(\hat{y}_i - y_i)^2. Every symbol in it was decoded here: the sigma sign, the counter i, the \frac{1}{n}, and a square that belongs to each item before the adding. Later chapters average over whole batches of examples the same way, and the reason Chapter 9 divides its gradient by 5 is this section's \frac{1}{n}.
🧪 Computational Laboratory Run it
Add up the list and take its average
The notebook sums 3, 5, 10 to 18, averages them to 6, then tries a longer list, an outlier, and the sum of squares. Same numbers as the lesson.
Runs in your browser through Google Colab, nothing to install. Or download it and open it in Jupyter.
Check your understanding (counts toward your progress)
For the list 4, 7, 9, a student computes \sum x_i^2 as 20^2 = 400. What did they do?
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
All three items are inside the 20. The problem is where the square was applied.
The 20 is exactly 4 + 7 + 9, so the list is right.
Squaring each item then adding gives 16 + 49 + 81 = 146, not 400.
Why
The small 2 sits on x_i, so each item is squared before the adding: 146. Squaring after adding, (\sum x_i)^2 = 400, is a different quantity.
With x_1 = 4, x_2 = 7, x_3 = 9, compute the plain sum \sum_{i=1}^{3} x_i.
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
Why
The sigma sign says add items 1 through 3: 4 + 7 + 9 = 20.
Correct answer
Also accepted:
Why
A list of 6 items has \sum_{i=1}^{6} x_i = 42. A seventh item, x_7 = 14, is added. What is \sum_{i=1}^{7} x_i?
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
Why
Adding one more item adds it to the running total: 42 + 14 = 56.
Correct answer
Also accepted:
Why
Check your understanding (counts toward your progress)
A list is 5, 5, 5, 5, 25. Where does the mean land?
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
That is the most common item, a different summary. Add them up: 45, shared 5 ways.
Halfway between the smallest and largest ignores how many items sit at each end.
One large item raises the mean but cannot make the mean equal itself.
Why
5 + 5 + 5 + 5 + 25 = 45 and 45/5 = 9. One outlier drags the mean above almost every item: four are 4 below the mean, one is 16 above, and 4 \times 4 = 16 balances.
For the list 2, 3, 13, a student says the mean is 3 "because it is the middle number." What is the mean?
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
The middle item is a different summary called the median. The mean is the sum shared out equally.
The largest item is never the mean unless all items are equal.
18 is the total before it is shared out among the 3 items.
Why
Mean means sum divided by count: 18/3 = 6. The big 13 pulls the mean well above the middle item.
Practice: The sigma sign, the mean, and the sum of squares (5 problems · doesn’t affect your progress)
What does \sum_{i=1}^{4} x_i tell you to do?
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
Why
Sigma means "add these up"; the counter i runs from 1 to 4.
Add up items 1, 2, 3, and 4 of the list.
Compute the mean of 6, 8, 13.
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
Why
Sum 27, count 3, mean 27/3 = 9.
Correct answer
Also accepted:
Why
For the list 6, 8, 13, compute \sum_{i=1}^{3} x_i^2.
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
Why
Square first, then add: 36 + 64 + 169 = 269.
Correct answer
Also accepted:
Why
For the list 6, 8, 13, compute \left(\sum_{i=1}^{3} x_i\right)^2, and notice it is not 269.
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
Why
Add first: 27. Then square: 729. The parentheses put the square on the whole sum.
Correct answer
Also accepted:
Why
Five errors are 2, 3, 3, 4, 3. Compute the mean of their squares, \frac{1}{5}\sum_{i=1}^{5} e_i^2.
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
Why
Squares: 4, 9, 9, 16, 9. Their sum is 47. Divide by 5: 9.4. Chapter 1 computes exactly this number for the five used cars.
Correct answer
Also accepted:
Why