The binomial distribution gives the discrete probability distribution of obtaining exactly
successes out of
independent Bernoulli
trials, where
and
are nonnegative integers,
, and each Bernoulli
trial has success probability
and failure probability
. The binomial distribution is therefore given by
|
(1)
| |||
|
(2)
|
where
is a binomial coefficient and endpoint values
at
and 1 are interpreted by continuity. The above plot
shows the distribution of
successes out of
trials with
.
The same formula gives the likelihood as a function of
when the count
is fixed. With a uniform prior distribution
on
, Bayes' theorem
gives the posterior distribution with density
proportional to
. Dividing by its
integral
, where
is the beta function, gives
a beta distribution with shape parameters
and
. 3Blue1Brown (2020) illustrates the binomial model
as a setup for inference about
.
The binomial distribution is implemented in the Wolfram Language as BinomialDistribution[n, p].
The probability of obtaining more successes than the
observed in a binomial distribution is
|
(3)
|
for , where
|
(4)
|
is the beta function, and
is the incomplete
beta function.
The characteristic function for the binomial distribution is
|
(5)
|
(Papoulis 1984, p. 154). The moment-generating function
for the distribution is
|
(6)
| |||
|
(7)
| |||
|
(8)
| |||
|
(9)
| |||
|
(10)
| |||
|
(11)
|
The mean is
|
(12)
| |||
|
(13)
| |||
|
(14)
|
The moments about 0 are
|
(15)
| |||
|
(16)
| |||
|
(17)
| |||
|
(18)
|
so the moments about the mean are
|
(19)
| |||
|
(20)
| |||
|
(21)
|
For
and
, the skewness
and kurtosis excess are
|
(22)
| |||
|
(23)
| |||
|
(24)
| |||
|
(25)
|
The first cumulant is
|
(26)
|
and subsequent cumulants are given by the recurrence relation
|
(27)
|
The mean deviation is given by
|
(28)
|
For the special case and
, this is equal to
|
(29)
| |||
|
(30)
|
where
is a double factorial. For
, 2, ..., the first few values are therefore 1/2,
1/2, 3/4, 3/4, 15/16, 15/16, ... (OEIS A086116
and A086117). The general case is given by
|
(31)
|
Steinhaus (1999, pp. 25-28) considers the expected number of squares
containing a given number of grains
on a board of size
after random distribution of
of grains,
|
(32)
|
Taking
gives the results summarized in the following table.
| 0 | 23.3591 |
| 1 | 23.7299 |
| 2 | 11.8650 |
| 3 | 3.89221 |
| 4 | 0.942162 |
| 5 | 0.179459 |
| 6 | 0.0280109 |
| 7 | 0.0036840 |
| 8 | |
| 9 | |
| 10 | |
For
and
, the ratio of adjacent
values of the probability mass function
is
for
. The ratio exceeds
1 for
, equals 1 for
, and is less than 1 for
. Thus the unique mode
is
unless
is an integer, in which case
and
are both modes. For example, five
trials with
have modes at two and three successes. When
or
,
the only mode is 0. When
, it is
.
An approximation to the binomial distribution for large and fixed
can be obtained by extending the factorials
using the gamma function and expanding about the
value
where the resulting smooth function
is a maximum, i.e., where
. Since the logarithm
function is monotonic, we can instead choose
to expand the logarithm. Let
, then
|
(33)
|
where
|
(34)
|
But we are expanding about the maximum, so, by definition,
|
(35)
|
This also means that is negative, so we can write
. Now, taking the logarithm
of (2) gives
|
(36)
|
For large
and
we can use Stirling's approximation
|
(37)
|
so
|
(38)
| |||
|
(39)
| |||
|
(40)
| |||
|
(41)
| |||
|
(42)
|
and
|
(43)
|
To estimate , set this approximate derivative to 0 and solve for
,
|
(44)
|
|
(45)
|
|
(46)
|
|
(47)
|
since . Using the same Stirling's
approximation and this leading estimate gives the coefficients
|
(48)
| |||
|
(49)
| |||
|
(50)
| |||
|
(51)
| |||
|
(52)
| |||
|
(53)
| |||
|
(54)
| |||
|
(55)
| |||
|
(56)
| |||
|
(57)
| |||
|
(58)
| |||
|
(59)
|
The discrete probabilities satisfy
|
(60)
|
For deviations
of order
, the terms beyond the quadratic term tend to
zero as
. Retaining the quadratic term gives
|
(61)
|
Approximating the discrete sum by the Gaussian integral gives
|
(62)
|
and
|
(63)
| |||
|
(64)
|
Defining ,
|
(65)
|
whose right side is the probability density function of a normal distribution. This
gives the normal distribution approximation
to the binomial probability mass function
as .
If
and
in such a way that
,
then the binomial distribution converges to the Poisson
distribution with mean
.
Let
and
be independent binomial random
variables characterized by parameters
and
.
The conditional probability of
given that
,
provided
, is
|
(66)
|
Note that this is a hypergeometric distribution.