sum of bernoulli distributed random variables I have two random variables $X_1$ and $X_2$ with $P(X_1=x_1)=(1-p)^{1-x_1}p^{x_1}$ and for $X_2$ the same and $x_1 \in \{0,1\}$. I want to know how $Y=X_1+X_2$ is distributed. This is what i did:
$P(Y=y)=P(X_1+X_2=y)=\sum_{x=0}^1 P(X_1=x, X_2=y-x)=\sum_{x=0}^1 P(X_1=x)P( X_2=y-x)=$
$\sum_{x=0}^1 (1-p)^{1-x}p^x(1-p)^{1-(y-x)}p^{y-x}=\sum_{x=0}^1 (1-p)^{2-y}p^y=2p^y(1-p)^{2-y}$
I think this is wrong because I think the answer should be ${2\choose y} p^y(1-p)^{2-y}$
So what did I do wrong? $X_1$ and $X_2$ are independent.
 A: This looks far too complicated.  
You have two random variables, each of which takes 
  - the value $1$ with probability $p$ and 
  - the value $0$ with probability $1-p$.  
If they are independent then their sum takes 


*

*the value $2$ with probability $p^2$

*the value $1$ with probability $2p(1-p)$

*the value $0$ with probability $(1-p)^2$


The sum is a binomial random variable.
A particular problem with your expressions is that you have not restricted the values $X_2$ can take.  For example when $y=0$ the expression $\sum_{x=0}^1 P(X_1 =x)P(X_2 =y−x)$ means $P(X_1 =0)P(X_2 =0−0) + P(X_1 =1)P(X_2 =0-1)$  but you should not have the second term in that sum since $P(X_2 =-1) =0$ rather than the positive value you give it
A: What you wrote is not correct (first step) because according to that $P(Y=0) =  \sum_{x=0}^1 P(X_1=x,X_2=-x)$ and $X_2$ can't be negative. Moreover, if $X_1=x$ and $X_2=y-x$ they can't be independent.
Sorry guys but I don't see where I can put this as a comment :S :S
