Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: unexpected -rbinomial- behaviour


From   Jeph Herrin <[email protected]>
To   [email protected]
Subject   Re: st: unexpected -rbinomial- behaviour
Date   Tue, 14 Sep 2010 17:26:56 -0400

But it would have been easy enough to trap the endpoints and
return a meaningful (rather than missing) value.


On 9/14/2010 4:34 PM, Tirthankar Chakravarty wrote:
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<[email protected]>  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/




*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index