Date: Thu, 16 May 1996 14:32:38 0600
ReplyTo: Andrew James Llwellyn Cary <ajlcary@IX.NETCOM.COM>
Sender: "SAS(r) Discussion" <SASL@UGA.CC.UGA.EDU>
From: Andrew James Llwellyn Cary <ajlcary@IX.NETCOM.COM>
Organization: Cary Consulting Services
Subject: Re: BINOMIAL
John Whittington wrote:
>
> On Thu, 16 May 1996, Mike Rayle <rayle@OPUS.OCA.UDAYTON.EDU> wrote:
>
> >Does anyone know how to construct a confidence interval using the
> >binomail distribution.
> >
> >I have 111 sucesses and 89 failures for sample size of 200.
> > I want to construct a 99 % confidence interval.
>
> Mike, with N=200, is not the normal approximation adequate for you?  i.e.
> (if I've got the arithmetic right!):
>
> 99% CI = 111 +/ (2.57*(sqrt(((111*89)/200)))) = 92.02 to 129.98
>
> John
>
> 
> Dr John Whittington, Voice: +44 1296 730225
> Mediscience Services Fax: +44 1296 738893
> Twyford Manor, Twyford, Email: johnw@magnet.co.uk
> Buckingham MK18 4EL, UK CompuServe: 100517,3677
> You can also use
the inverse of the incomplete Beta distribution to
compute "exact" bounds. (As exact as the BETAINV function anyway)
The incomplete Beta has the following relationship to the binomial
distribution... In SAS functions...
PROBBNML(p,n,m) = PROBBETA(p,m,nm+1)
hence:
......
56 data ;
57 upper=betainv(.995,111,90)*200;
58 lower=betainv(.005,111,90)*200;
59 put lower= upper=;
60 run;
LOWER=92.310545227 UPPER=128.19618595
.....
Yields the approximate (because the binomial is a discrete distribution)
of a 99% two tailed confidence bound on the number of successes is
(92,129). This is only marginally better then the normal approximation.
Another approach to this problem is to simply print out the probability
table for the problem:
DATA ;
DO SUCCESS=0 TO 200;
PROB= PROBBNML(111/200,200,SUCCESS);
PUT SUCCESS= PROB= ;
END;
RUN;
and use it as a lookup table.

Andrew J. L. Cary  I Reckon that the Opinions
Senior Curmudgeon  expressed here DO represent
Cary Consulting Services, Newark, CA  those of the management of
ajlcary@ix.netcom.com  Cary Consulting Services
