Skip to main content
added 447 characters in body
Source Link
user2974951
  • 8k
  • 2
  • 20
  • 32

From your first sample you can estimate $\hat{p}=194/197=0.9847716$$\hat{p}=3/197$ for the whitered balls. From this you can estimate a one sided CI for the second sample (using R code)

qbinom(0.99,432,1943/197)

which gets you $431$$13$.

If you were to useEdit: the above formula is not correct, since it estimates a CI when we are really interested in a Prediction Interval. Obtaining the exact prediction interval for a binomial distribution is not trivial, however there is a nice approximation using the normal distribution

$$m\hat{p}\pm Z_{\alpha/2}\cdot\sqrt{\cfrac{m\hat{p}(1-\hat{p})(m+n)}{n}}$$

where $\hat{p}$ obtained from$m$ is the red balls you wouldsample size of the prediction sample, $n$ is the original sample size. Transforming this into a one-sided formula we get

qbinom432*3/197+qnorm(0.99,432,)*sqrt((432*3/197*(1-3/197)*(432+197))/197)

which is $13$$17$ rounded down.

For some exact methods see Prediction interval for binomial random variable.

From your first sample you estimate $\hat{p}=194/197=0.9847716$ for the white balls. From this you can estimate a one sided CI for the second sample (using R code)

qbinom(0.99,432,194/197)

which gets you $431$.

If you were to use the $\hat{p}$ obtained from the red balls you would get

qbinom(0.99,432,3/197)

which is $13$.

From your first sample you can estimate $\hat{p}=3/197$ for the red balls. From this you can estimate a one sided CI for the second sample

qbinom(0.99,432,3/197)

which gets you $13$.

Edit: the above formula is not correct, since it estimates a CI when we are really interested in a Prediction Interval. Obtaining the exact prediction interval for a binomial distribution is not trivial, however there is a nice approximation using the normal distribution

$$m\hat{p}\pm Z_{\alpha/2}\cdot\sqrt{\cfrac{m\hat{p}(1-\hat{p})(m+n)}{n}}$$

where $m$ is the sample size of the prediction sample, $n$ is the original sample size. Transforming this into a one-sided formula we get

432*3/197+qnorm(0.99)*sqrt((432*3/197*(1-3/197)*(432+197))/197)

which is $17$ rounded down.

For some exact methods see Prediction interval for binomial random variable.

Source Link
user2974951
  • 8k
  • 2
  • 20
  • 32

From your first sample you estimate $\hat{p}=194/197=0.9847716$ for the white balls. From this you can estimate a one sided CI for the second sample (using R code)

qbinom(0.99,432,194/197)

which gets you $431$.

If you were to use the $\hat{p}$ obtained from the red balls you would get

qbinom(0.99,432,3/197)

which is $13$.