1
$\begingroup$

My question is easy, but I really got stuck here ... Say I have 500 people, among them, 200 likes eating ice cream. Among these 200, 60 likes strawberry ice cream.

So the rate ratio of ice cream vs strawberry ice cream would be (200/500)/(60/500)=200/60=3.3 But how to calculate the confidence internal for this rate ratio? 200 and 60 are from the same population, and especially 60 is a subset of 200.

Any help would be greatly appreciated, as I need this for a project due in a couple of days.

$\endgroup$

1 Answer 1

0
$\begingroup$

The ice cream lovers is $X\sim \mathcal{Bin}(N=500,p)$ and among them the strawberry ice cream lovers is $Y\mid X=x \sim\mathcal{Bin}(x,q)$. With your numbers and using the frequency interpretation of probability, calculate $$ \frac{200/500}{60/500}=\frac{200}{60}=\frac{X/N}{Y/N}= \frac{X/N}{\frac{Y}{X}\cdot\frac{X}{N}}\approx \frac{p}{q\cdot p}=\frac1q $$ so what you want is a confidence interval for $1/q$, simply. Construct in the usual way (OK, there are multiple ways ...) a binomial confidence interval for $q$ from the conditional distribution of $Y\mid X=x$ above ($p$ is irrelevant for this), and transform that confidence interval into another for $1/q$.

If the interval for $q$ is $(L, U)$ then the interval for $1/q$ becomes $(1/U, 1/L)$.

For binomial intervals see Confidence interval for Bernoulli sampling

With your data, $X=200, Y=60$ we can calculate (R)

 PropCIs::scoreci(60, 200, 0.95)   

95 percent confidence interval:
 0.2407 0.3668
### Then inverting it:
 round( rev (1/PropCIs::scoreci(60, 200, 0.95)[[1]]) , 2)
[1] 2.73 4.15

Note that this only uses the conditional distribution of $Y$ given the observed value of $X=200$, the distribution of $X$ is irrelevant. This should not be a surprise, the distribution of $X$ do not depend on the interest parameter $q$. Technically, in mathematical statistics $X$ is called an ancillary statistic.

But the value of $X$ influences the precision with which we can estimate $q$.

$\endgroup$
2
  • $\begingroup$ Thanks so much for your answer, very helpful! So should I calculate the confidence interval like this: q=20/60=1/3, 1-q=2/3, so CI for q is (1/3-1.96*sqrt((1/3)*(2/3)/60)), 1/3+1.96*sqrt((1/3)*(2/3)/60))), and then do the reverse to get the CI for 1/q? But how to handle the conditional part where q is from conditional distribution of Y|X=x, where X is a random variable itself? $\endgroup$
    – Icegirl
    Commented Jun 10, 2022 at 1:47
  • $\begingroup$ I will augment my answer tomorrow (late night here now), but to me $X$ seems almost irrelevant , that is, for evaluating uncertainty. The confidence interval calculation only uses the conditional distribution ... $\endgroup$ Commented Jun 10, 2022 at 1:53

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.