(Probability|Statistics) - Binomial Distribution

About

The binomial distribution is the discrete probability distribution of the number of successes in a sequence of n

yes/no experiments, each of which yields success with probability p.

The name of the distribution comes from the binomial coefficient.

Assumption

A binomial distribution assume the followings:

  • There is a fixed number of tests (n)
  • Each test are independent (No test has any impact on any other test)
  • There is only two results (Success or Failure)

The binomial distribution is frequently used to model the number of successes in a sample of size n drawn with replacement from a population of size N. If the sampling is carried out without replacement, the draws are not independent and so the resulting distribution is a hypergeometric distribution, not a binomial one.

However, for N much larger than n, the binomial distribution is a good approximation, and widely used.

Function

Mass

Each trial is assumed to have only two outcomes, either success or failure. The probability mass function of having:

  • k successful outcomes
  • in an experiment of n independent trials
  • where p is the probability of a successful trial

is as follows.

<MATH> \begin{array}{rrl} f(k,n,p) & = & \Pr(X = k) & = & {n\choose k}p^k(1-p)^{n-k} \\ \text{where } {n\choose k} & = & (n \text{ choose } k) & = & \frac{n!}{k!(n-k)!} \end{array} </MATH>

where:

  • k is the trial number, k = 0, 1, …, n
  • n is the number total of trial
  • p is the probability of a successful trial
  • n choose k is the binomial coefficient

See biased coin for an example.

Cumulative

To find the probability of having k or less correct answers, we can plot a cumulative distribution Function (CDF).

See R - Binomial Distribution in R.

Normal distribution

A Binomial distribution is a good approximation of the normal distribution.

The fact that a normal distribution may be used as an approximation to the binomial distribution, is now known as the de Moivre–Laplace theorem.

See below for n = 6

The galton board demonstrates this.

Example

Biased coin

Suppose a biased coin comes up heads with probability 0.3 when tossed. What is the probability of achieving 0, 1,…, 6 heads after six tosses?

According to the binomial probability mass function:

<MATH> \begin{array}{rrrrll} \Pr(0\text{ heads}) & = & f(0) & = & \Pr(X = 0) & = & {6\choose 0}0.3^0 (1-0.3)^{6-0} \approx 0.1176 \\ \Pr(1\text{ head }) & = & f(1) & = & \Pr(X = 1) & = & {6\choose 1}0.3^1 (1-0.3)^{6-1} \approx 0.3025 \\ \Pr(2\text{ heads}) & = & f(2) & = & \Pr(X = 2) & = & {6\choose 2}0.3^2 (1-0.3)^{6-2} \approx 0.3241 \\ \Pr(3\text{ heads}) & = & f(3) & = & \Pr(X = 3) & = & {6\choose 3}0.3^3 (1-0.3)^{6-3} \approx 0.1852 \\ \Pr(4\text{ heads}) & = & f(4) & = & \Pr(X = 4) & = & {6\choose 4}0.3^4 (1-0.3)^{6-4} \approx 0.0595 \\ \Pr(5\text{ heads}) & = & f(5) & = & \Pr(X = 5) & = & {6\choose 5}0.3^5 (1-0.3)^{6-5} \approx 0.0102 \\ \Pr(6\text{ heads}) & = & f(6) & = & \Pr(X = 6) & = & {6\choose 6}0.3^6 (1-0.3)^{6-6} \approx 0.0007 \\ \end{array} </MATH>

See biased coin calculation in R

Documentation / Reference


Powered by ComboStrap