3
$\begingroup$

According to Wikipedia (https://en.wikipedia.org/wiki/Binomial_distribution), the variance of a binomial distribution of $n$ independent trials, where each trial has an outcome probability of $p$, is given by $np(1-p)$.

But what is the overall variance of the distribution if the number of trials $n$ is itself a binomial distribution having a mean value of $m$ and a variance of $v$?

For background information, I'm trying to build an Excel model of projects flowing through successive phases of drug development, where a binomial distribution of projects starts one phase, and the probability that each project passes into the next phase is given by $p$, so I want to forecast the distribution (mean and variance) of projects passing from one phase to the next.

$\endgroup$
6
  • 1
    $\begingroup$ Do you know the law of total variance? $\endgroup$ Apr 19 '17 at 22:28
  • $\begingroup$ Nope, but now that you mention, I'm going to look it up. Thanks for the pointer. $\endgroup$
    – Kelvin
    Apr 19 '17 at 22:29
  • $\begingroup$ OK, just looked it up, but looks incomprehensible to me. Struggling to understand it, let alone how to apply it. :-( $\endgroup$
    – Kelvin
    Apr 19 '17 at 22:33
  • 2
    $\begingroup$ I'm trying to build an Excel model of projects flowing through successive phases of drug development, where a binomial distribution of projects starts one phase, and the probability that each project passes into the next phase is given by $p$, so I want to forecast the distribution (mean and variance) of projects passing into the next phase. $\endgroup$
    – Kelvin
    Apr 19 '17 at 23:06
  • 1
    $\begingroup$ Excellent information, thanks -- that should be in your question, since it clarifies something about what you're asking. Please edit your question (you could just paste that right at the end and it would do nicely I think). While you're editing, "with sample number variance" in the title is a little ambiguous; perhaps "with random number of trials" or "random n" might work better. $\endgroup$
    – Glen_b
    Apr 19 '17 at 23:09
5
$\begingroup$

Your hierarchical model is underspecified. If $N$ is binomial with variance $v$, this does not uniquely specify $N$.

Instead, suppose we have $X \mid N \sim \operatorname{Binomial}(N,p)$ and $N \sim \operatorname{Binomial}(n,\theta)$. We find by the law of total variance $$\begin{align*} \operatorname{Var}[X] &= \operatorname{Var}[\operatorname{E}[X \mid N]] + \operatorname{E}[\operatorname{Var}[X \mid N]] \\ &= \operatorname{Var}[Np] + \operatorname{E}[Np(1-p)] \\ &= p^2 \operatorname{Var}[N] + p(1-p)\operatorname{E}[N] \\ &= p^2 n\theta(1-\theta) + p(1-p) n\theta \\ &= np\theta (p(1-\theta) + (1-p)) \\ &= np\theta (1-p\theta). \end{align*}$$ This of course, is the variance of a binomial distribution with parameters $n$ and $p\theta$. Since by the law of total expectation we also have $$\operatorname{E}[X] = \operatorname{E}[\operatorname{E}[X \mid N]] = \operatorname{E}[Np] = np\theta,$$ this suggests (but does not prove) that the marginal distribution of $X$ could be binomial. Can you prove or disprove the claim $$X \overset{?}{\sim} \operatorname{Binomial}(n,p\theta)?$$

$\endgroup$
2
  • $\begingroup$ Many thanks for this. I have just been asked to edit and clarify my question, which I have now done, so how can I apply your answer, if it is still relevant? $\endgroup$
    – Kelvin
    Apr 19 '17 at 23:17
  • $\begingroup$ So based on your answer and my edited question (using the variables as I have labeled and defined them), am I correct that the overall variance would be $mp(1-p)+vp^2$? $\endgroup$
    – Kelvin
    Apr 20 '17 at 0:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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