-2

I am sincerely stuck on this problem. Please help

alpha is 0.05

enter image description here

Biu
  • 129
  • 6
  • You have a binomial : defective/non-defective, with p=.08 , and sample size =25. Do you know how to use Normal approx here for a Normal interval? – gary Jul 26 '17 at 23:50
  • @gary, Hi Gary, I understand this is a sample with a binomal RV, but I don't know how to derive a CI for it to be honest – Biu Jul 26 '17 at 23:54
  • https://en.wikipedia.org/wiki/Binomial_proportion_confidence_interval – heropup Jul 27 '17 at 00:00
  • @Biu, Hi, just by doing an interval as you would for a Normal, with mean =(25)(0.08) and s.d $p(1-p)$. – gary Jul 27 '17 at 00:01
  • @Gary, p=2/25=0.08, so the success proportion refers to the number of defective boards, but the question is asking to find the CI for the true proportion of circuit boards in the lot from which the sample was drawn, is it referring to the non-defective boards? – Biu Jul 27 '17 at 00:05
  • @Biu: Yes, the sample data is used to estimate the Population data for the same parameter. And then $s.d=(0.02)(0.98)$ – gary Jul 27 '17 at 00:10

1 Answers1

1

A - Confidence interval with a Normal approximation:

$$\hat p\pm z_{1-\frac{\alpha}{2}}\ \sqrt{\frac{\hat p (1-\hat p)}{n}},\ \ \hat p=\frac{s}{n}$$

in which $s$ is the number of successes (defects in this case) and $n$ the number of boards. $z_{1-\frac{\alpha}{2}}$ is the quantile $1-\frac{\alpha}{2}$ of a standard Normal (e.g. close to 1.96 for $\alpha=0.05$, a 95% confidence probability).

Making the substitutions $s=2$, $n=25$ $\alpha=0.05$ leads to

$$\hat p\pm z_{1-\frac{\alpha}{2}}\ \sqrt{\frac{\hat p (1-\hat p)}{n}}=[-0.026,0.186]$$

Problem: this is a crude approximation, as $n=25$, the lower limit for the "true" frequency of defects is negative (-0.026), a non-sense.

B - Confidence interval - Clopper Pearson (see for instance, Bilder & Loughin [2014] Categorical Data Analysis with R - CRC, page 15, for details)

This interval is exact and usually defined by quantiles of a Beta distribution by

$$[\text{QBeta}(\alpha/2, s,n-s+1), \text{QBeta}(1-\alpha/2, s+1,n-s)]$$

in the expression, QBeta is the quantile function of a beta, and the parameters in each function represents, respectively, the probability for the quantile, the first parameter of the Beta, and the second parameter of the beta.

Using $s=2$, $n=25$, $\alpha=0.05$ and the Beta quantile function from R, that is qbeta:

$$[\text{qbeta}(0.025,2,24), \text{qbeta}(0.975,3,23)]=[0.0098,0.2603].$$

In this case the limits for the confidence interval, 0.0098 and 0.2603, are not negative. It is a large interval due to a low $n$ (lots of uncertainty on the true frequency of defects).

bluemaster
  • 4,537
  • Thank you, this is really great, I was struggling with the Clopper Pearson, we had to study it on our own, and it is kicking my butt. Appreciate it. – Biu Jul 27 '17 at 02:01
  • Can you help me with this? https://math.stackexchange.com/questions/2373154/large-sample-confidence-interval – Biu Jul 27 '17 at 04:29