Suppose I know that widget machines in general have success rates given by a random variable p (or failure rates given by 1-p) where p is Beta(alpha,beta) distributed between 0 and 1. I want to test how effective my widget machine is so I sample n widgets and find that k are good and n-k are defective. What is my 95% confidence interval for p', the success rate of my widget machine? In particular I am interested in p values fairly close to 1 so avoid central limit theorem or normal distribution assumptions please.
The pdf of the Beta Distribution is given by; \[Pr(p=x)=\frac{1}{B(\alpha,\beta)}x^{\alpha-1}(1-x)^{\beta-1}\] Similarly, the pdf of the binomial trial is given by: \[Pr(k|p) = \left(\begin{matrix}n \\ k\end{matrix}\right)p^{k}(1-p)^{n-k}\] So I am thinking the 2.5th percentile of the distribution is where: \[0.025 = \int_{0}^{c_2.5}\frac{1}{B(\alpha,\beta)}x^{\alpha-1}(1-x)^{\beta-1}*\left(\begin{matrix}n \\ k\end{matrix}\right)x^{k}(1-x)^{n-k}dx\]
Join our real-time social learning platform and learn together with your friends!