Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Tirthankar Chakravarty <tirthankar.chakravarty@gmail.com> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: st: unexpected -rbinomial- behaviour |
Date | Tue, 14 Sep 2010 13:34:15 -0700 |
Jeph, The Stata function -rbinomial- is not defined for p=0. From h rbinomial rbinomial(n, p) Domain n: 1 to 1e+11 Domain p: 1e-8 to 1-1e-8 Range: 0 to n Your probabilistic statement about the degenerate Binomial distribution is correct - the domain of the Binomial distribution is p \in [0,1]. My guess would be that the p=/=0 condition is a limitation of the simulation algorithm. T On Tue, Sep 14, 2010 at 12:54 PM, Jeph Herrin <stata@spandrel.net> wrote: > > Am I wrong to expect rbinomial(n,0) = 0? > > . di rbinomial(10,0) > . > > I would think that if P(success)= 0, then E(successes)=0. > > > Jeph > > > * > * For searches and help try: > * http://www.stata.com/help.cgi?search > * http://www.stata.com/support/statalist/faq > * http://www.ats.ucla.edu/stat/stata/ > -- To every ω-consistent recursive class κ of formulae there correspond recursive class signs r, such that neither v Gen r nor Neg(v Gen r) belongs to Flg(κ) (where v is the free variable of r). * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/