# Conditional expectaction with probabilities for a sum of independent random variable

I have a r.v $$S_N$$ built as a sum of Bernoulli with parameter $$p$$. So $$S_N = X_1 + X_2 + \ldots + X_N$$. There is a second variable N, such that $$N \sim Poisson(\lambda)$$.

I have to compute:

1. $$P(S_N=0)$$
2. $$\mathop{\mathbb{E}}(S_N \ | \ N = 4 )$$
3. $$\mathop{\mathbb{E}}(S_N \ | \ N )$$

Now, for the first point, I need to think my sum of Bernoulli as a Binomial. Thus:

$$P(S_N = 0) = \binom{n}{0} p^k (1-p)^{n-k} = (1-p)^n$$

However, i'm stuck with the two expectations. But i remember that for the conditional expectaction for two discrete random variables it holds:

$$\mathop{\mathbb{E}}(X \ | \ Y = k ) = \sum_x x \ f_{X|Y}(x|y)$$

• I am confused. Are $Y$ and $N$ the same? Commented Nov 12, 2020 at 17:15
• What is the role of the second variable $Y$ should it be $N$? Commented Nov 12, 2020 at 17:17
• Since $N$ is random, $S_N$ cannot be a Binomial $\mathcal B(N,p)$. Commented Nov 12, 2020 at 17:27
• – whuber
Commented Nov 12, 2020 at 17:47
• $S_N$ will be Poisson with rate $\lambda p$. With this you can answer question 1 (but probably you are supposed to compute it manually). Commented Nov 12, 2020 at 19:18

In Problem 2, $$N=4$$ is a constant. Thus, $$S_N$$ is a binomial variable with the mean equals $$4p$$ (assuming the Bernoulli takes value either 1 or 0).
For Problem 3: In general for the binomial distribution with $$N=n$$, the mean is $$np$$. Now for $$N$$ is a random variable, the mean then is $$E[np]=\bar{n}p$$. In particular when $$N$$ is of Poisson distribution, $$\bar{n}=\lambda$$, thus the mean is $$\lambda p$$.