0
$\begingroup$

A number p is drawn from the interval [0,1] according to the uniform distribution, and then a sequence of independent Bernoulli trials is performed, each with success probability p. What is the variance of the number of successes in k trials? Note k is a deterministic number.

In this question, I tried solving by calculating the expected value of p which is $\frac{1}{2}$ as p ~ U[0,1]. Then took a random variable M = No. of successes in k trials Since M ~ Binomial(k,p). Therefore, calculated the variance to be V(M) = $k\times{p}\times{(1-p)} = \frac{k}{4}$. The Answer is $ \frac{k\times{(k+2)}}{12}$. Not sure where I am going wrong.

$\endgroup$
1

2 Answers 2

3
$\begingroup$

This is an application of the Law of total variance: https://en.wikipedia.org/wiki/Law_of_total_variance

Let $P = Unif(0,1)$ and $Y = Binom(k,p)$

First let's note that:

  • $E[P] = \frac{1}{2}$
  • $Var[P] = \frac{1}{12}$
  • $E[P^2] = Var[P] + E[P]^2 = \frac{1}{3}$

Then the law states that $Var(Y) = E[Var(Y|P)] + Var[E(Y|P)]$

  • $Var(Y|X=p) = kp(1-p)$ Because Y is Binomial

    $E[Var(Y|X)] = k*E[p(1-p)]= k*(E[p]-E[p^2]) = k(\frac{1}{2}-\frac{1}{3}) = k\frac{1}{6}$

  • $E(Y|X) = kp$ Because Y is Binomial

    $Var[E(Y|X)] = k^2*Var(p) = k^2\frac{1}{12}$

Finally:

$Var(Y) = k\frac{1}{6} + k^2\frac{1}{12}$

$Var(Y) = k(\frac{2}{12} + k\frac{1}{12})$

$Var(Y) = k(\frac{k+2}{12})$

$\endgroup$
0
$\begingroup$

This is a special case of the beta-binomial distribution, with $k$ trials and $\alpha=\beta=1$.

$\endgroup$

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.