Suppose we have $N \sim$ Poiss$\left(\lambda\right)$ and a succession $\{X_n\}$ s.t. $\forall i, X_i \sim$ Bernoulli$\left(p\right), X_i \bot N$ and define $X = \sum_{i=0}^N X_i$, $Y = \frac{X}{N+1}$, what's the value of $\mathbb{E}\left(Y\right)$?
First we find that $X \sim$ Poiss$\left(p\lambda\right)$ and then we can see $Y$ as a function $g\left(N,X\right)$, so we apply the formula for the expected value of a function of two random variables: $$\mathbb{E}\left(g\left(N,X\right)\right) = \sum_{j = 1}^\infty\sum_{i=0}^j \frac{i}{j}\mathbb{P}\left(X = i \cap N + 1 = j\right)$$ We can easily see that $\mathbb{P}\left(X = i \cap N + 1 = j\right) = \mathbb{P}\left(X = i \cap N = j - 1\right) = \mathbb{P}\left(X^b_j = i, N = j - 1\right)$,with $$X^b_j \sim Bin\left(p, j\right) = p^i\left(1-p\right)^{j-i}\binom{j}{i}\frac{e^{-\lambda}\lambda^{j-1}}{\left(j-1\right)!}$$ Substituing this in our formula we get $$\mathbb{E}\left(Y\right) = \sum_{j=1}^\infty\sum_{i=0}^j\frac{i}{j}p^i\left(1-p\right)^{j-i}\binom{j}{i}\frac{e^{-\lambda}\lambda^{j-1}}{\left(j-1\right)!} =\sum_{j=1}^\infty\frac{e^{-\lambda}\lambda^{j-1}}{j!}\sum_{i=0}^jip^i\left(1-p\right)^{j-i}\binom{j}{i}$$ We can observe that the expression of the second sum is equal to $\mathbb{E}\left(X^b_j\right) = jp$ $$\mathbb{E}\left(Y\right) = \sum_{j=1}^\infty\frac{e^{-\lambda}\lambda^{j-1}}{j!}jp = p\sum_{j=1}^\infty\frac{e^{-\lambda}\lambda^{j-1}}{\left(j-1\right)!} = pe^{-\lambda}\sum_{h=0}^\infty\frac{\lambda^h}{h!} = pe^{-\lambda}e^{\lambda} = p$$
Said this, I have found another question posted on stack exchange where there was written that given $A \sim$Poiss$\left(\lambda_1\right), B \sim$Poiss$\left(\lambda_2\right)$, $\mathbb{E}\left(A/B+1\right) = \left(\lambda_1/\lambda_2\right)\left(1-e^{-\lambda_2}\right)$, which in my case would mean that $\mathbb{E}\left(Y\right) = p\left(1-e^{-\lambda}\right)$
Am I wrong to suppose that this is given by the fact that $X \not\bot N$? Or is there some other error in my calculations?
It's quite simpler:
We have $E[X \mid N ] = N p$. Hence
$$E\left[ \frac{X}{N+1} \mid N \right] = \frac{N}{N+1} p$$
and $$E\left[ \frac{X}{N+1} \right] = E\left[ E\left[ \frac{X}{N+1} \mid N \right]\right] = p \, E\left[\frac{N}{N+1}\right] $$
And, using this, we get $$E\left[\frac{N}{N+1}\right] = 1 - \frac{1-e^{-\lambda}}{\lambda}$$