This is documentation for an old release of SciPy (version 0.17.0). Search for this page in the documentation of the latest stable release (version 1.15.0).
Binomial Distribution¶
A binomial random variable with parameters (n,p) can be described as the sum of n independent Bernoulli random variables of parameter p;
Y=n∑i=1Xi.
Therefore, this random variable counts the number of successes in n independent trials of a random experiment where the probability of success is p.
p(k;n,p)=(nk)pk(1−p)n−kk∈{0,1,…n},F(x;n,p)=∑k≤x(nk)pk(1−p)n−k=I1−p(n−⌊x⌋,⌊x⌋+1)x≥0
where the incomplete beta integral is
Ix(a,b)=Γ(a+b)Γ(a)Γ(b)∫x0ta−1(1−t)b−1dt.
Now
μ=npμ2=np(1−p)γ1=1−2p√np(1−p)γ2=1−6p(1−p)np(1−p).
M(t)=[1−p(1−et)]n
Implementation: scipy.stats.binom