# Summation

$\sum$ means to sum the results of a formula for all values given

Basic example

$\sum_{i=1}^{4}i^2 = 1^2 + 2^2 + 3^2 + 4^2 \\= 30$

## Simplification

### Distributive property

$a(b + c) = ab + ac$

In other words, constants inside the summed expression can be pulled outside.

Example

\begin{alignedat}{1} &\sum_{i=1}^{4}i^2 = 30 \\ \\ &= \sum_{i=1}^{4}3i^2 = 3(1^2) + 3(2^2) + 3(3^2) + 3(4^2) \\ \\ &= 3[1^2 + 2^2 + 3^2 + 4^2 ] \\ \\ &= 3\bigg[ \sum_{i=1}^{4}i^2 \bigg] \end{alignedat}

### Distributive property

$a+b = b+a$

In other words we can add the terms in any order

Example

\begin{alignedat}{1} &\sum_{i=1}^{4}(i^2 + 2i) \\ \\ &= (1^2 + 2(1)) + (2^2 + 2(2)) + (3^2 + 2(3)) + (4^2 + 2(4)) \\ \\ &= (1^2 + 2^2 + 3^2 + 4^2) + (2(1)) + 2(2)) + 2(3)) + 2(4)) \\ \\\ &= \sum_{i=1}^{4}i^2 + \sum_{i=1}^{4}2i \end{alignedat}

### Summation of constants

When summing constants, you can multiply the constant by the number of indices you count.

Example

\begin{alignedat}{1} &\sum_{k=1}^{10}5 \\ \\ &= 5+5+5+5+5+5+5+5+5+5 \\ \\ &= 10 \centerdot 5 \\ \\ &= 50 \end{alignedat}

[[Mean and Variance]]

Based on course material by Paul Bendich and Daniel Egger from Data Science Maths Skills

[Mean and Variance]: Mean and Variance "Mean and Variance"