This is documentation for an old release of SciPy (version 0.17.1). Search for this page in the documentation of the latest stable release (version 1.15.1).
Bernoulli Distribution¶
A Bernoulli random variable of parameter p takes one of only two values X=0 or X=1 . The probability of success ( X=1 ) is p , and the probability of failure ( X=0 ) is 1−p. It can be thought of as a binomial random variable with n=1 . The PMF is p(k)=0 for k≠0,1 and
p(k;p)={1−pk=0pk=1F(x;p)={0x<01−p0≤x<111≤xG(q;p)={00≤q<1−p11−p≤q≤1μ=pμ2=p(1−p)γ3=1−2p√p(1−p)γ4=1−6p(1−p)p(1−p)
M(t)=1−p(1−et)
μ′m=p
h[X]=plogp+(1−p)log(1−p)
Implementation: scipy.stats.bernoulli