Confidence Interval for the product of heads and tails in 100 coin flips

1.1k Views Asked by At

If I flip 100 fair coins and then multiply the number of heads by the number of tails. Can you give a double-sided 95% confidence interval on the product of the number of heads by the number of tails? Let $T$ denote the number of tails, and let $P$ denote the product. So $P = T(100-T)$. I am trying to apply the central limit theorem. I already calculated that $E[P] = E[100T] - E[T^2] = 5000 - 2525 = 2475$. Is there a faster way to calculate the variance of $P$ other than brute forcing the value of $E[T^3]$ and $E[T^4]$? I am on the wrong track?

2

There are 2 best solutions below

5
On BEST ANSWER

You can use the quantiles of the asymptotic distribution. In $n$ fair flips, we know by CLT that $$2\sqrt n \left(\frac{T}{n}-\frac{1}{2}\right)\underset{d}{\rightarrow}N(0,1),$$

so by the continuous mapping theorem,

$$\left[2\sqrt n \left(\frac{T}{n}-\frac{1}{2}\right)\right]^2=-\frac{4}{n}\left[T(n-T)-\frac{n^2}{4}\right]\underset{d}{\rightarrow}\chi^2_1\\ \implies T(n-T)\sim \frac{n}{4}\left(n-\chi^2_1\right). $$

Thus, one possible construction of a $95\%$ CI is

$$\left[\frac{n}{4}\left(n-q_{0.975}\right),\frac{n}{4}\left(n-q_{0.025}\right)\right],$$

where $q_p$ denotes the $p$ quantile of $\chi^2_1.$ In your case, this would work out to

$$\left[\frac{100}{4}\left(100-5.02\right),\frac{100}{4}\left(100-0.001\right)\right]=[2374.5,2499.975]. $$


Remarks:

  1. Note the mean is $\frac{n}{4}(n-1),$ which in your case is $\frac{100\times 99}{4}=2,475,$ as you obtained.

  2. I assume the above is what you mean by "95% confidence interval for $T(n-T),$" i.e. an interval spanning $95\%$ of its distribution. However, I think we typically construct a CI for an unknown parameter. Presumably, in this experiment, the number of tails $T$ is observable and and hence $T(n-T)$ is computable so it seems a bit strange to call this a CI. What would make more sense to me is computing a CI for the probability weight of the coin, but the coin is known to be fair here.

2
On

Since you're using a computer, you might as well use symbolic computing (Mathematica):

g = TransformedDistribution[u (100 - u), 
   u \[Distributed] BinomialDistribution[100, .5]];

Mean[g]

(* 2475 *)

Quantile[g, .975]

(* 2500 *)

Quantile[g, .025]

(* 2379 *)