The sum of squares means adding the squares of numbers.
Example, for numbers 1, 2, 3, the sum of squares would be 12 + 22 + 33 = 14
Sum of squares represents various things in various fields of mathematics.
| Category | Formula |
|---|---|
| Statistics (dispersion) | |
| Algebra (2 numbers) | a2 + b2 = (a + b)2 − 2ab |
| First n natural numbers | |
| First n even numbers | |
| First n odd numbers |
In Statistics (Dispersion)
Measures how much the data values deviate from the mean.
∑ni=0 (xi - x̄)2
- xi: each data value
\bar{x} : mean of the dataset- n: number of observations
In Algebra
Used to rewrite the sum of squares in terms of the square of a sum.
- For 2 Numbers: a2 + b2 = (a + b)2 - 2ab
- For 3 Numbers: a2 + b2 + c2 = (a + b + c)2 - 2ab - 2bc - 2ca
First n Natural Numbers
Gives the sum of squares of the first n counting numbers.
\sum_{i=1}^{n} i^2 = \frac{n(n+1)(2n+1)}{6}
First n Even Numbers
Used to find the sum of squares of even numbers like 2, 4, 6, ..., 2n.
\sum_{i=1}^{n} (2i)^2
First n Odd Numbers
Used to calculate the sum of squares of odd numbers like 1, 3, 5, ..., (2n − 1).
1^2 + 3^2 + 5^2 + \cdots + (2n - 1)^2 = \frac{n(2n+1)(2n-1)}{3}
Sum of Squares Error (SSE)
Sum of Square Error (SSE) is the difference between the observed value and the predicted value of the deviation of the data set. SSE is also called the SSR or sum of square residuals. The formula to calculate the sum of square error is,
SSE = ∑ni=0 (yi - f(xi))2
- yi is the ith value to be predicted
- f(xi) is the predicted value
- xi is the ith value of the explanatory variable
Sum of Square Error can also be calculated using the formula,
SSE = SST - SSR
- SST is Sum of Squares Total
- SSR is Sum of Squares Regression
Read in Detail
Solved Examples
Example 1: Find the sum of the given series: 1 + 22 + 32 +...+ 552.
Solution:
To find the value of 12 + 22 + 32 +...+ 552.
Sum of Squares Formula for n terms
∑n2 = 12 + 22 + 32 +...+ n2 = [n(n+1)(2n+1)] / 6
Given, n = 55
Sum of Squares = [55(55+1)(2×55+1)] / 6
⇒ Sum of Squares = (55 × 56 × 111) / 6
⇒ Sum of Squares = 56,980
Thus, the sum of the given series 12 + 22 + 32 +...+ 552 is 56,980.
Example 2: Find the value of (32 + 82), using the sum of squares formula.
Solution:
Find 32 + 82 using sum of square formula,
Given,
- a = 3
- b = 8
Using sum of square formula,
a2 + b2 = (a + b)2 − 2ab
⇒ 32 + 82 = (3 + 8)2 − 2(3)(8)
⇒ 32 + 82 = 121 - 2(24)
⇒ 32 + 82 = 121 − 48
⇒ 32 + 82 = 73.
Thus, the value of (32 + 82) is 73.
Example 3: Find the sum of squares of the first 25 even natural numbers.
Solution:
Sum of Squares of first 25 Even Natural Numbers(S) = 22 + 42 + 62 +... + 482+ 502......(1)
Now simplifying eq(1)
S = 22( 12 + 22 + 32 +...+252)
Using Sum Squares Formula for n terms, we have
∑n2 = [n(n+1)(2n+1)]/6
Here, n = 25
S= 22( 12 + 22 + 32 +...+252) = 4[25(25+1)(2(25)+1)/6]
⇒ S = (2/3) × (25) × (26) × (51)
⇒ S = 22100
Hence, the sum of squares of the first 25 even natural numbers is 22100.
Example 4: A dataset has points 2, 4, 13, 10, 12, and 7. Find the sum of squares for the given data.
Solution:
Given,
We have 6 data points 2, 4, 13, 10, 12, and 7.
Sum of given data points = 2 + 4 + 13 + 10 + 12 + 7 = 48.
Mean of the given data,
Mean, x̄ = (Sum of data value) / (Number of data value)
⇒ x̄ = 48 / 6
⇒ x̄ = 8
Now,
∑ni=0 (xi – x̄)2 = (2 – 8)2 + (4 – 8)2 + (13 – 8)2 + (10 – 8)2 + (12 – 8)2 + (7 – 8)2
⇒ ∑ni=0 (xi – x̄)2 = (–6)2 + (–4)2 + (5)2 + (2)2 + (4)2 + (–1)2
⇒ ∑ni=0 (xi – x̄)2 = 36 + 16 + 25 + 4 + 14 + 1
⇒ ∑ni=0 (xi – x̄)2 = 96
Hence, the sum of squares for the given data is 96.
Example 5: Find the sum of the squares of 4, 9, and 11 using the sum of squares formula for three numbers.
Solution:
Given,
- a = 4
- b = 9
- c = 11
Using Sum of Squares Formula,
a2 + b2 + c2 = (a + b +c)2 − 2ab − 2bc − 2ca
⇒ 42 + 92 + 112 = (4 + 9 + 11)2 −(2×4×9) − (2×9×11) − (2×11×4)
⇒ 42 + 92 + 112 = 576 − 72 − 198 − 88
⇒ 42 + 92 + 112 = 218
Hence, the value of (42 + 92 + 112) is 218.
Example 6: Find the sum of squares of the first 10 odd numbers.
Solution:
Sum of Squares of the first 10 odd numbers (S): 12 + 32 + 52 +... +172 + 192
Sum of squares of first "n" Odd Numbers ∑(2n–1)2 = [n(2n+1)(2n–1)]/3
Here, n is 10.
S = [10×(2×10 + 1)(2×10 - 1)]/3
⇒ S = [10 × 21 × 19]/3
⇒ S = 10 × 7 × 19 = 1330
Hence, the value of the sum of squares of the first 10 odd numbers is 1330.