Confidence Interval of number of red marbles among 100 marbles where proportion of red marbles is uniformly distributed

67 Views Asked by At

A bag contains 100 marbles of colors red and black. The proportion of red color marbles is uniformly distributed between 0 and 1. How do I compute the confidence interval of the number of red marbles?

The expected number of red marbles will be $E(100p) = 100*0.5 = 50$.

To compute the variance, I thought of using the variance of p. $Var(p) = \frac{1}{12}$

Hence, $Var(100p) = \frac{100^2}{12}$ and $SD = 28.867$

Using this value the confidence interval can be computed as $50 \pm 1.96*28.867 = 50 \pm 56.58$.

I doubt if this is correct solution; it gives a negative value for the lower interval.

1

There are 1 best solutions below

0
On

You cannot compute a confidence interval until a sample is drawn, and the method by which you sample the marbles will affect the resulting calculation.

All that we have so far is that there is some finite population $N = 100$ of marbles, of which the proportion of red marbles is some random variable $p \in \operatorname{Uniform}[0,1]$. More precisely, the number of such marbles is a discrete uniform random variable between $0$ and $100$ inclusive, but for our purposes, we can let $p$ be continuous uniform on $[0,1]$. Then the expected number of red marbles is $$\operatorname{E}[Np] = N \operatorname{E}[p] = 100(0.5) = 50,$$ as you previously calculated. The variance of the number of red marbles is $$\operatorname{Var}[Np] = N^2 \operatorname{Var}[p] = 100^2 \cdot \frac{1}{12} = \frac{2500}{3}.$$

But as I stated at the very beginning, these do not comprise a confidence interval, because no sampling scheme has been specified. To illustrate, suppose we sample $n$ marbles from the bag with replacement--so that after one marble is pulled out, its color is observed, and then it is put back in the bag. The number of red marbles observed this way is some random variable $X$ that follows a binomial distribution where $p$ is some fixed but unknown number in $[0,1]$. A point estimate of $p$ can be obtained by computing the sample mean, e.g., $$\hat p = \frac{X}{n}.$$ A $100(1-\alpha)\%$ Wald-type confidence interval can be constructed using a normal approximation, and would have the form $$\hat p \pm z^*_{\alpha/2} \sqrt{\frac{\hat p(1-\hat p)}{n}},$$ where $z^*_{\alpha/2}$ is the upper $\alpha/2$ quantile of the standard normal (so $z^*_{.025} \approx 1.96$ for a $95\%$ confidence interval). This is not the only interval estimate possible; e.g., a Wilson score interval or Clopper-Pearson (exact binomial) interval can also be constructed.

However, if your sampling scheme is different--e.g., you sample without replacement--then although your point estimate may still be the same, your interval estimate should be different because the act of sampling without replacement means you effectively have more information about the true value of $p$ for the same number of draws. One way to understand this is by noting that if $n = 100$ samples are drawn without replacement, then you know exactly how many marbles are red, because you have drawn them all; whereas if you sample marbles with replacement, you can draw as many times as you please and still not be absolutely certain of the true number of red marbles. A discussion of how such a confidence interval is constructed is beyond the present scope of this answer, but it involves something called "finite sample correction."

Finally, if the prior distribution of $p$ were not uniform, the methods applied here would not suffice. A Bayesian approach would be more appropriate to establish an interval estimate.