What is the meaning of $X = \sum_{i}^n X_i$ in the context of binomial random variable $X$? I have been reading some of the problems and solutions for my Statistiscs course. I saw the following in the solution of a problem.
If $ X\in Bi(n, p),$ than $X = \sum_{i}^n X_i$
I dint really understand what this means.
Can someone help me build some intuition?
 A: Bernoulli distribution
The simplest distribution possible. Let's call it $f_{BE}$. Informally, it is used to represent a coin (fair or unfair), i.e. it is used to represent a random phenomenon where only two events are allowed. If the coin/random variable is $X$, and the coin can assume values $0$ or $1$ (or $H$ and $T$, or whatever you like, but just two events only!), then:
$$f_{BE}(x) =\mathbb{P}(X = x) = \begin{cases}
a & \text{if}~ x = 0 \\
1-a & \text{if}~ x = 1 
\end{cases},$$
where $a \in (0, 1)$. If $X$ represents a fair coin, then $a = \frac{1}{2}$, otherwise not. Besides the trivial example of the coin, we can use the Bernoulli r.v. for representing for example the success of a candidate during an exam, or the victory of a football (or other sports!) team in match...
Binomial distribution
Suppose that you are concerned to find the probability that your favorite football team will win exactly $2$ matches in a streak of $3$. Each match is represented by $X_i$, with $i \in \{1, 2, 3\}$. Each $X_i$ has a Bernoulli distribution with parameter $a$ fixed. Moreover, each match is independent, does not matter what happened before, or what will happen later.
If there is a victory, $X_i = 1$, and $X_i= 0$ otherwise. The total number of victories in the streak is:
$$X = \sum_{i=1}^{3} X_i.$$
You want to find $\mathbb{P}(X = 2).$
It can be proven that $X$ has a binomial distribution with parameters $n=3$ and $p=a$. If the binomial distribution is denoted by $f_{BI}$, then:
$$\mathbb{P}(X = 2) = f_{BI}(2).$$
