--- title: "Binomial distribution" firstLetter: "B" publishDate: 2021-02-26 categories: - Statistics - Mathematics date: 2021-02-25T21:08:52+01:00 draft: false markup: pandoc --- # Binomial distribution The **binomial distribution** is a discrete probability distribution describing a **Bernoulli process**: a set of independent $N$ trials where each has only two possible outcomes, "success" and "failure", the former with probability $p$ and the latter with $q = 1 - p$. The binomial distribution then gives the probability that $n$ out of the $N$ trials succeed: $$\begin{aligned} \boxed{ P_N(n) = \binom{N}{n} \: p^n q^{N - n} } \end{aligned}$$ The first factor is known as the **binomial coefficient**, which describes the number of microstates (i.e. permutations) that have $n$ successes out of $N$ trials. These happen to be the coefficients in the polynomial $(a + b)^N$, and can be read off of Pascal's triangle. It is defined as follows: $$\begin{aligned} \boxed{ \binom{N}{n} = \frac{N!}{n! (N - n)!} } \end{aligned}$$ The remaining factor $p^n (1 - p)^{N - n}$ is then just the probability of attaining each microstate. The expected or mean number of successes $\mu$ after $N$ trials is as follows: $$\begin{aligned} \boxed{ \mu = N p } \end{aligned}$$