---
tag: 0VRWZDWW6B
kind: definition
name: Binomial distribution
msc: ["60E05"]
defines: 0WCWA1KT3M
uses: [0WF4EJP91W, 092GEF38YD, 0PHC9FE2V5]
sources:
  - url: https://en.wikipedia.org/wiki/Binomial_distribution
    locator: Probability mass function
---

## Definition

Let $n \ge 0$ be an integer and let $p \in [0, 1]$.
The binomial distribution with parameters $n$ and $p$ is the distribution on $\{0, 1, \dots, n\}$ with the [[probability mass function|0WF4EJP91W]]
$$p(k) = \binom{n}{k} p^k (1 - p)^{n-k} \quad \text{for } k = 0, 1, \dots, n.$$
Here $\binom{n}{k}$ is the [[binomial coefficient|092GEF38YD]]. One writes $X \sim \operatorname{B}(n, p)$ or $X \sim \operatorname{Bin}(n, p)$.

## Remarks

The values add up to $1$ by the [[binomial theorem|0EHWPWGHB2]]: $\sum_{k} \binom{n}{k} p^k (1 - p)^{n-k} = (p + 1 - p)^n = 1$.
The number of successes in $n$ independent [[Bernoulli trials|0PHC9FE2V5]] with success probability $p$ has this distribution. The factor $\binom{n}{k}$ counts the positions of the $k$ successes.
The mean is $np$ and the variance is $np(1 - p)$.
The probability of exactly $2$ heads in $4$ tosses of a fair coin is $\binom{4}{2} / 2^4 = 6/16$.

## Explanations

### L1 human

Repeat a yes-or-no experiment $n$ times, independently, and count the yes answers.
The count has the binomial distribution. Each sequence with $k$ yes answers has probability $p^k (1 - p)^{n-k}$, and there are $\binom{n}{k}$ such sequences.
