Binomial Distribution |
---|
Repeated trials play a very important role in probability and statistics, especially when the number of trials is fixed and the probabilty of succes is fixed.
A random variable X has a binomial distribution and it is referred to as a binomial random variable if and only if its probability distribution is given by
R has four dedicated commands for density, distribution function, quantile
function, and random generation for the binomial distribution with parameters
\[
b(x; n, \theta ) = \binom{n}{x} \theta^x \left( 1 - \theta \right)^{n-x} \qquad
\mbox{ for } \ x=0,1,2,\ldots , n .
\]
size
and prob
:
- dbinom(x, size, prob, log = FALSE)
- pbinom(q, size, prob, lower.tail = TRUE, log.p = FALSE)
- qbinom(p, size, prob, lower.tail = TRUE, log.p = FALSE)
- rbinom(n, size, prob)
Theorem:
\[
b\left( x; n, \theta \right) = b\left( n-x; n, 1-\theta \right) .
\]
Theorem: The mean and the variance of the binomial distribution are
\[
\mu = n\theta , \qquad \sigma^2 = n\theta \left( 1 - \theta \right) .
\]
Theorem: If X has a binomial distribution with the parameters n and θ and Y = X/n, then its expected value and variance are
\[
E[Y] = \theta , \qquad \sigma_Y^2 = \frac{\theta \left( 1 - \theta \right)}{n} .
\]
Theorem: The moment-generating function of the binomial distribution is given by
\[
M_X (t) = \left[ 1 + \theta \left( 1 - \theta \right) \right]^n .
\]
According to definition, we have
\begin{align*}
M_X (t) &= \sum_{x=0}^n e^{xt} \binom{n}{x} \theta^x \left( 1 - \theta \right)^{n-x} \\
&= \sum_{x=0}^n \binom{n}{x} \left( \theta \,e^t \right)^x \left( 1 - \theta \right)^{n-x} ,
\end{align*}
which is easily recognized as the binomial expansion of
\[
\theta\,e^t + \left[ \left( 1 - \theta \right) \right]^n =
\left[ 1 + \theta \left( e^t -1 \right) \right]^n .
\]