Suppose I have a biased coin (heads with probability p), and I keep flipping it until I get t tails. So I had to flip n times in total to get t tails. How do I find a (frequentist) confidence interval for the probability of heads p?
-
3$\begingroup$ First hit when Googling "negative binomial confidence interval": bepress.com/ucbbiostat/paper242 (abstract only). The seventh hit gets you a full paper along with its references to the literature: plosone.org/article/info%3Adoi%2F10.1371%2Fjournal.pone.0000180 . $\endgroup$– whuber ♦Jan 10, 2011 at 2:51
-
$\begingroup$ I downvoted the question because it's eminently google-able. $\endgroup$– fabiansJan 10, 2011 at 13:20
1 Answer
If you are looking for ML estimation (which may or may not be what you want) please check the fitdistr
function in the MASS
library in R
. This function can estimate the unknown parameters using ML estimation. But please be careful about the parametrization of the negative binomial distribution of MASS
. Apart from estimating the unknown parameters, it gives the confidence intervals for the estimates.
HTH S.