I am modelling a process where I repeatedly draw $n$ i.i.d. binary variables $x_i$. The probability of drawing a positive $x_i$ is $P(x_i = 1) = \rho$. Therefore, the probability of drawing $k$ positive $x_i$ out of $n$ trials follows a Binomial distribution, $P(k) = B(k|\rho,n)$. To add complexity, $n$ is also a random variable that follows a Poisson distribution $P(n) = \frac{1}{n!}\lambda^n \text{e}^{-\lambda}$.

Overall, the probability of drawing $k$ positive samples computes as: $$P(k) = \frac{1}{n!}\lambda^n \text{e}^{-\lambda} \begin{pmatrix}n\\k\end{pmatrix} (1-\rho)^{n-k} \rho^k$$.

However, I am interested in the fraction of positive samples, i.e., in $m = \frac{k}{n}$. By simulation the expectation comes out as $\text{E}\{m\} = \rho = \frac{\rho\lambda}{\lambda}$ and that variance is $\text{Var}\{m\} = \frac{\rho(1-\rho)}{\lambda} = \frac{\rho(1-\rho)\lambda}{\lambda^2}$.

The nominator of both $\text{E}\{m\}$ and $\text{Var}\{m\}$ is the same as one would expect from the Binomial distribution, where $n$ is swapped with $\text{E}\{n\} = \lambda$. But why? And why is the denominator $\lambda$ or $\lambda^2$?


1 Answer 1


First you need to condition on $N > 0$ for this process to be well-defined.

For the variance the formula you have is not correct. If you condition on $N$ and apply the law of total variance then you should get

\begin{align} \text{Var} \left ( \frac{K}{N} \right ) &= \text{E} \left ( \frac{p (1 - p)}{N} \right ) \\ &\neq \frac{p (1 - p)}{\lambda} . \end{align}

Regarding your observation about the mean (whose formula is correct), if you're only interested in intuition then consider for a moment the case of $K / n$ where $n$ is fixed and $K \sim$ binomial$(n, p)$. We already know that $\text{E}(K / n) = p$ and this is true independent of the value of n, so the distribution of $n$ should be irrelevant (aside from being positive and integer-valued) if $n$ happens to be random.

  • $\begingroup$ Thanks for your input! Just to make sure I understand correctly: Var(K/N) = E(Var(K/N | N)) + Var(E(K/N | N)) = E(Var(K/N | N)) + Var(p) = E(p(1-p)/N) + 0, right? Further, Jensens inequality gives Var(K/N) >= p(1-p)/E(N), so we have a lower (but no upper) bound. $\endgroup$
    – Matthias
    Nov 9, 2016 at 15:00
  • $\begingroup$ Yes, that's correct and you're welcome. $\endgroup$
    – dsaxton
    Nov 9, 2016 at 15:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.