Binomial probability (source code)

= Binomial probability
{title2=$\mathbb P(X=k)=\binom nkp^k(1-p)^{n-k}$}

The <binomial distribution> with parameters $n$ and $p$ assigns the displayed <probability> to $k$ successes, for integers $0\le k\le n$. Each specified sequence of independent trials has probability $p^k(1-p)^{n-k}$, and the <binomial coefficient> counts the sequences with exactly $k$ successes. Outside this range the probability is zero.