# Mixing distributions of 2 RVs: Do we add densities or CDFs?

I've been solving this book "40 puzzles and problems in probability and mathematical statistics" and I came across this question of mixing RVs vs. mixing distributions.

Consider a RV, B, that comes, in each realization, with probability 1/2 from a normal distribution (namely, that of X) with mean μ = 50 and standard deviation 10 and with probability 1/2 from a normal distribution (namely,that of Y) with mean μ = 150 and standard deviation 10. Thus, its density is equal to

fB(b) = 1/2 (n (b | μ=50, σ = 10) + 1/2 (n (b | μ=150, σ = 10)

where n (x|μ,σ) = normal density with mean μ and sd σ ).

My confusion is this: I am not able to give an argument as to why we take the probability weighted average of the density functions, rather than calculating the CDF by taking the probability weighted average of CDFs, and then computing the PDF from that CDF.

• The answer should be the same. May 11 '18 at 5:14
• Oh right. You get the same thing when you differentiate the CDF. May 11 '18 at 8:13

## 1 Answer

Let $A$ be a $\mathsf{Ber}(1/2)$ random variable, independent of $B$, $X$, and $Y$. Then $$B = AX + (1-A)Y,$$ so for each $t\in\mathbb R$, \begin{align} \mathbb P(B\leqslant t) &= \mathbb P(B\leqslant t, A=1) + \mathbb P(B\leqslant t, A=0)\\ &= \mathbb P(B\leqslant t\mid A=1)\mathbb P(A=1) + \mathbb P(B\leqslant t\mid A=0)\mathbb P(A=0)\\ &= \frac12\left(\mathbb P(X\leqslant t) + \mathbb P(Y\leqslant t)\right)\\ &= \frac12\left(\Phi\left(\frac{t-50}{10}\right) + \Phi\left(\frac{t-150}{10}\right) \right). \end{align} However, there is no good way to write $\mathbb P(B\leqslant t)$ in the form $\mathbb P(g(X,Y)\leqslant t)$ for some "nice" function $g$.