# Idea
![[s20230107_151040.png|500]]
Expressed as a for loop:
```
sum_x = 0
for i in 1:n
sum_x += x[i]
```
Summation operator sigma $\Sigma$
$
\sum_{i=1}^{n} x_{i} \equiv x_{1}+x_{2}+\ldots+x_{n}
$
$
\sum_{i=6}^{9} x_{i}=x_{6}+x_{7}+x_{8}+x_{9}
$
## Property 1: constant rule
$
\text { For any constant } c: \quad \sum_{i=1}^{n} c=n c
$
$
\sum_{i=1}^{3} 5=(5+5+5)=3 \cdot 5=15
$
## Property 2
$
\sum_{i=1}^{n} c x_{i}=c \sum_{i=1}^{n} x_{i}
$
$
\begin{aligned}
\sum_{i=1}^{3} 5 x_{i} &=5 x_{1}+5 x_{2}+5 x_{3} \\
&=5\left(x_{1}+x_{2}+x_{3}\right) \\
&=5 \sum_{i=1}^{3} x_{i}
\end{aligned}
$
## Property 3
$
\text { For any constant } a \text { and } b: \quad \sum_{i=1}^{n}\left(a x_{i}+b y_{i}\right)=a \sum_{i=1}^{n} x_{i}+b \sum_{j=1}^{n} y_{i}
$
[Epsilons, no. 6: What is that Σ? - by Tivadar Danka](https://thepalindrome.org/p/what-is-the-sum)
![[f46f83ea-690b-43e4-842d-293dc564ff1c_1920x3189.png]]
# References
- [Causal Inference The Mixtape - 2 Probability and Regression Review](https://mixtape.scunning.com/02-probability_and_regression#summation-operator)
- [Epsilons, no. 6: What is that Σ? - by Tivadar Danka](https://thepalindrome.org/p/what-is-the-sum)