# Sum of Product of Bernoulli and Normal Random Variables

Given $X_i \sim \mathcal{N}(\mu, \sigma^2)$ and $Y_i \sim Bernoulli(p)$, let $Z_i = X_iY_i$. I know that if $F(t)$ is the CDF of $X_i$, then $Pr[Z_i \le t] = pF(t) + (1-p)$ if $t \ge 0$ and $Pr[Z_i \le t] = pF(t)$ if $t < 0$.

Let $Z = \sum_{i = 1}^{n}Z_i$, where the $Z_i$ are independent. Is there an expression for $Pr[Z \le t]$?

$Z_i$ can also be expressed as a mixture with distribution function

$$(1-p)F + p \delta$$

where $\delta(x)=0$ for $x\lt 0$ and $\delta(x)=1$ for $x\ge 1$. Consequently the distribution function of the sum of $n$ iid variates with this distribution is the convolution of those distributions. Because convolution is linear, the Binomial Theorem gives an answer in the form

$$F_n = \sum_{k=0}^n \binom{n}{k}(1-p)^{n-k}p^k\,\delta^{*n-k}*F^{*k}.$$

The stars remind us these are repeated convolutions rather than products.

Note that the convolution of $\delta$ merely adds a constant zero and that the convolution $F^{*k}$ is the distribution of a sum of $k$ iid Normal$(\mu,\sigma)$ variables. It therefore is a Normal distribution with mean $k\mu$ and variance $k\sigma^2$. This yields $F_n$ as a mixture of $(1-p)^n$ times a jump at zero (from the $k=0$ term) along with $n$ Normal components.

To illustrate, the figure shows the case $n=5$ where $\mu=2$, $\sigma=1$, and $p=1/3$. On the left is the empirical cumulative distribution function of $2000$ independent draws of $Z$, in black. (These draws were made by multiplying Normal and Bernoulli variates and then adding them, according to the original description of $Z$.) A plot of $F_n$ is superimposed in red. That they are nearly the same provides support for the formula.

On the right is the continuous part of the $F_n$ (in gray) along with graphs of its five Normal components, each appropriately scaled. The (discrete) contribution from $(1-p)^n$ is depicted merely as a vertical line at zero of height $(1-p)^n$.

• Thanks for your helpful answer! One simple question I had is: isn't the distribution function of the mixture pF + (1-p)(delta), rather than (1-p)F + (p)(delta), as you have it? – user19346 Nov 27 '16 at 20:48
• You're right--I switched $p$ and $1-p$. – whuber Nov 28 '16 at 16:11