( $X \sim B(n_1, p) $, $Y \sim B(n_2,p)$, ($X$,$Y$) independent ) $\implies Z = X + Y\sim B(n_1 + n_2, p)$ Hello I have some exercise from probability and statistics, but I don't know what they are really asking about:
Random variable $X$ has Binomial distribution $B(n_1, p)$. Random variable $Y$ has also Binomial distribution  $B(n_2, p)$. Variables are independent. Show that random variable $ Z = X + Y $ has also Binomial distribution $B(n_1 + n_2, p )$.
What I know is that:
Independent variables ($X$,$Y$) $ \iff  f(x,y) = f_1(x) \cdot f_2(y) $
Binomial distribuntion $ X\sim B(n, p) $ then $P(X = k) = {n \choose k} p^k(1-p)^{n-k}$
I dont have enough intiuition what it means that something has binomial distribution, so I don't know how to prove. I mean I know what binomial distribution is about. It shows probability that in $n$ trials what chance is for $k$ successes with probablity $p$. But still I can't wrap my head around what I really have to prove.
So basically how do you prove that random variable has binomial distribution?
Do I understand correctly that like probability distribution is $f(k)$? So that in given point $f(k) = {n \choose k }p^k(1-p)^{n-k}$? And I have to prove that $$ f(x,y) = f_1(x) \cdot  f_2(y) = \left[ {n_1 \choose x} p^x(1-p)^{n_1-x} \right] \cdot \left[ {n_2 \choose y }p^y(1-p)^{n_2-y} \right]  = \cdots = {n_1 + n_2 \choose \text{?} } p^\text{?}(1-p)^{(n_1+n_2)-\text{?}}$$
... :(
 A: There is a nice way and there is an ugly way. Let's do ugly first.
An ugly way: We want to find an expression for the probability that $Z=k$.
The event $Z=k$ can in principle happen in various ways. We could have $X=0$ and $Y=k$. Or else we could have $X=1$ and $Y=k-1$. Or else we could have $X=2$ and $Y=k-2$, and so on up to $X=k$ and $Y=0$.
For any $i$, We have 
$$\Pr(X=i)=\binom{n_1}{i}p^i (1-p)^{n_1-i}.$$
Similarly,
$$\Pr(Y=k-i)=\binom{n_2}{k-i}p^{k-i} (1-p)^{n_2-(k-i)}.$$
The probability that both these events occur, is, after a little simplification, 
$$\binom{n_1}{i}\binom{n_2}{k-i}p^k(1-p)^{n_1+n_2-k}.$$
Add up, $i=0$ to $i=k$. 
Note that 
$$\sum_{i=1}^k \binom{n_1}{i}\binom{n_2}{k-i}=\binom{n_1+n_2}{k}=\binom{n}{k}.$$  This is because $\binom{n_1+n_2}{k}$ counts the number of ways to choose $k$ people from a group of $n_1$ boys and $n_2$ girls, and so does $\sum_{i=1}^k \binom{n_1}{i}\binom{n_2}{k-i}$. 
It follows that $\Pr(Z=k)=\binom{n}{k}p^k(1-p)^{n-k}$. This finishes the proof.
A nice way: For $i=1$ to $n_1$, let $X_i=1$ if we have a success on the $i$-th trial, and $0$ otherwise. Then $X=X_1+X_2+\cdots+X_{n_1}$.
Similarly, we have $Y=Y_1+Y_2+\cdots+Y_{n_2}$.
Then $Z$ is the sum of $n_1+n_2$, that is, $n$ independent Bernoulli random variables with probability of "success" equal to $p$. So $Z$ has binomial distrbution. 
