# Independent sums of independent random variables

Suppose $X=X_1 + X_2$ and $Y=Y_1 + Y_2$ are independent random variables such that $X_1,X_2$ are independent and $Y_1,Y_2$ are independent. Does this imply that $X_i,Y_j$ (for $i,j\in \{1,2\}$) are independent?

I'm asking this question because I'm a little confused about the accepted answer for Sum of two independent binomial variables; in the last part of the proof, it's clear that the $B_i(i=1,\ldots,n+m)$ are binomially distributed, but it's not apparent to me why they are all independent (which somehow follows from the fact that $B_1,\ldots, B_n$ are independent, $B_{n+1}, \ldots, B_{n+m}$ are independent, and $X=B_1+\cdots+B_n,Y=B_{n+1}+\cdots+B_{n+m}$ are independent).

• What have you tried on the problem? If you think it's true, have you found a proof? If you think it's false, have you found a counterexample? Aug 19, 2018 at 17:14
• What they are implicitly assuming in the post is that all the $B_i$'s are iid. Aug 20, 2018 at 7:50

No. For example, take four independent identically distributed random variables $X_1,X_2,Y_1,Y_2$ and then swap $Y_1,Y_2$ if necessary so that they are in the same order as $X_1,X_2$.
• But does that preserve independence of $Y_1,Y_2$? I'm not sure what you're saying is done here. It seems as if maybe you're saying let $X_1,X_2,W_1,W_2$ be i.i.d. and then $Y_1 = \min\{W_1,W_2\}$ if $X_1<X_2$ and $Y_1=\max\{W_1,W_2\}$ if $X_1>X_2.$ Is that what you meant? $\qquad$ Aug 19, 2018 at 20:25
• Wait if $X_1,X_2,Y_1,Y_2$ are independent then they are pairwise independent and thus $X_i,Y_j$ (for $i,j\in{1,2}$) are independent?
• @BCLC the original values are independent, but after you transform them to make sure $X_1,X_2$ and $Y_1,Y_2$ are in the same order, they are no longer pairwise independent. For example, taking Bernoulli(0.5) variables, $\Pr(Y_1=0\wedge X_1=0)=5/16$, because $X_1=Y_1=0$ if the original variables were $(0,0,0,0)$, $(0,0,0,1)$, $(0,1,0,0)$, $(0,1,0,1)$ or $(0,1,1,0)$ (in the last case, the Ys get swapped). Aug 20, 2018 at 7:53
• @MichaelHardy Yes, that's what I meant and it preserves independence of $Y_1,Y_2$. This is because for any (different) values of the $Y_i$ you swap them with probability $\Pr(X_1\neq X_2)/2$, which does not depend on the values of $Y_i$. Aug 20, 2018 at 8:01