3
$\begingroup$

Imagine tossing a fair coin 1,000 times for 10 consecutive days, giving 10,000 trials in total.

I understand that using binomial statistics the standard deviation of the number of heads would be:

sqrt(npq) = 50 (with a mean of 0.5 x 10,000 = 5,000)

But now, instead of the coin being fair, the underlying likelihood for the coin to land heads is now not fixed at 0.5, but it has a mean of 0.5 and a standard deviation of 0.1 - and this underlying likelihood changes every day.

For example:

Day 1 the underlying likelihood of getting a head is 0.58
Day 2 the underlying likelihood of getting a head is 0.49
Day 3 the underlying likelihood of getting a head is 0.51

etc.

(Maybe you are picking a new coin each day and they are "bad" with a fairness standard deviation of 0.1)

So there are now 2 standard deviations involved. One is related to the fairness of the coin and how it changes daily (which is 0.1). Secondly, there is the standard deviation expected from binomial statistics, which is sqrt(npq)/n = 50/10,000 = 0.003.

My question, is how do I combine these two standard deviations. In other words, I guess the mean of my 10,000 trials should still be 5,000 heads. But what would the new standard deviation be?

Any help in how to think about this is much appreciated.

Thanks.

$\endgroup$
  • $\begingroup$ See mixture distributions; the article covers how to compute variance. They sometimes get called compound distributions (however, I object rather strenuously to that usage, as the term has another important meaning and the other meaning has no other common one-word term to put in its place; I wish people would just stick to mixture for this one) $\endgroup$ – Glen_b -Reinstate Monica May 16 '18 at 23:15
2
$\begingroup$

Essentially, you are dealing with a hierarchical model. Since you didn't specify a distribution for $P$, I'll (naively) assume a Normal distribution. It won't actually matter for us in the end.

$$X_i|P \sim \text{Binom}(1000, P)$$ $$P \sim N(0.5, 0.1^2)$$

Then the variable you are interested in is $$Y = \sum_{i=1}^{10}X_i$$ and it is reasonable to assume that the $X_i$ are independent. Now we find the marginal mean and variance of the $X_i$. $$E(X_i) = E\left(E\left(X_i|P\right)\right) = E(1000\cdot P) = 1000\cdot 0.5 = 500$$ \begin{align*} Var(X_i) &= E\left(Var\left(X_i|P\right)\right) + Var\left(E\left(X_i|P\right)\right) \\ &= E(1000 P (1-P)) + Var(1000 P) \\ &= 1000\left[E(P) - E(P^2)\right] + 1000^2\ Var(P) \\ &= 1000\left[0.5 - (0.1^2 + 0.5^2)\right] + 1000^2(0.1^2) \\ &= 10240 \end{align*}

Note that this is much larger than than the variance when $p$ is fixed at $0.5$. Question: What happens as the standard deviation of $P$ approaches $0$?

Finally, based on independence, you have that $$Var(Y) = \sum_{i=1}^{10}Var(X_i) = 102400$$

$\endgroup$

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.