Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Binomial Distribution






Binomial Distribution: Repeated Trials with Fixed Count


The binomial distribution arises from repeating the same Bernoulli experiment a fixed number of times under identical conditions. Each trial is independent, each has exactly two outcomes (success or failure), and the probability of success remains constant across trials. The experiment does not ask when success happens, but rather how many successes occur in the predetermined number of trials.



The Probabilistic Experiment Behind binomial distribution


The binomial distribution models the number of successes obtained when the same experiment is repeated a fixed number of times under identical conditions. Each repetition — called a Bernoulli trial — has only two outcomes (success or failure), and the probability of success remains constant across trials. Crucially, the trials are independent.

What distinguishes the binomial distribution is that the number of trials is fixed in advance, and the random variable counts how many successes occur, not when they occur. The order of outcomes does not matter, only the total count does. This makes the binomial distribution a natural model for controlled, repeatable processes.

The binomial distribution captures variability caused by chance alone when conditions are stable. It breaks down if probabilities change from trial to trial, if trials influence each other, or if the number of trials is not predetermined.


Example:

Flipping a coin 1010 times and counting how many times it lands heads. Each flip is independent, the probability of heads stays the same, and the total number of flips is fixed before starting.

Notation Used


XBin(n,p)X \sim \text{Bin}(n, p) or XB(n,p)X \sim \text{B}(n, p)distribution of the random variable.

Binomial(n,p)\text{Binomial}(n, p)used to denote the distribution itself (not the random variable).

B(n,p)B(n,p)occasionally used in theoretical or formal contexts (less common).

P(X=k)=(nk)pk(1p)nkP(X = k) = \binom{n}{k} p^k (1 - p)^{n - k}probability mass function (PMF), where:

nn — number of trials

pp — probability of success on each trial

kk — number of successes (k=0,1,2,,nk = 0, 1, 2, \ldots, n)

(nk)=n!k!(nk)!\binom{n}{k} = \frac{n!}{k!(n-k)!} — binomial coefficient

Alternative notations:

q=1pq = 1 - p — probability of failure, so PMF can be written as P(X=k)=(nk)pkqnkP(X = k) = \binom{n}{k} p^k q^{n-k}

XBinomial(n,p)X \sim \text{Binomial}(n, p) — more verbose but explicit

Key properties:

E[X]=npE[X] = np — expected value (mean)

Var(X)=np(1p)\text{Var}(X) = np(1-p) — variance

See All Probability Symbols and Notations


Parameters


𝑛𝑛 : fixed number of independent trials;

𝑝𝑝 : probability of success in each trial;

This distribution models the number of successes when repeating the same binary experiment 𝑛𝑛 times under identical conditions. The two parameters fully describe the setup:

𝑛𝑛 gives the structure — how many attempts, and 𝑝𝑝 defines the behavior of each — what chance success has.

It’s useful to compare with the negative binomial, where instead of fixing how many trials you run, you fix how many successes you want and ask: how many trials will it take? Both deal with repeated binary outcomes, but what’s held constant — trials vs. successes — flips.

Probability Mass Function (PMF) and Support (Range)


The probability mass function (PMF) of a binomial distribution is given by:

P(X=k)=(nk)pk(1p)nk,k=0,1,2,,nP(X = k) = \binom{n}{k} p^k (1-p)^{n-k}, \quad k = 0, 1, 2, \ldots, n


where (nk)=n!k!(nk)!\binom{n}{k} = \frac{n!}{k!(n-k)!} is the binomial coefficient.

Fixed Number of Trials: The binomial distribution models the number of successes in nn independent trials, where each trial has only two possible outcomes: success or failure.

Support (Range of the Random Variable):
* The random variable XX can take on values from 00 to nn (inclusive).
* These represent the possible number of successes: 0,1,2,,n0, 1, 2, \ldots, n.
* The support is thus a finite set of n+1n+1 non-negative integers.

Logic Behind the Formula:
* (nk)\binom{n}{k}: The number of ways to choose kk successes from nn trials
* pkp^k: The probability of getting exactly kk successes
* (1p)nk(1-p)^{n-k}: The probability of getting exactly nkn-k failures
* The total probability sums to 1:

k=0nP(X=k)=k=0n(nk)pk(1p)nk=1\sum_{k=0}^{n} P(X = k) = \sum_{k=0}^{n} \binom{n}{k} p^k (1-p)^{n-k} = 1

* This follows from the binomial theorem: (p+(1p))n=1n=1(p + (1-p))^n = 1^n = 1

Binomial Distribution

Successes in n independent trials with probability p each

Explanation

The binomial distribution models the number of successes in nn independent trials, each with probability pp of success. The probability mass function is P(X=k)=(nk)pk(1p)nkP(X = k) = \binom{n}{k} p^k (1-p)^{n-k}, where (nk)\binom{n}{k} is the binomial coefficient. The expected value is E[X]=npE[X] = np and the variance is Var(X)=np(1p)\text{Var}(X) = np(1-p). This distribution is commonly used for modeling coin flips (number of heads in nn tosses), quality control testing (defective items in a batch), and clinical trial success rates.


Cumulative Distribution Function (CDF)


The cumulative distribution function (CDF) of a binomial distribution is given by:

FX(k)=P(Xk)=i=0k(ni)pi(1p)niF_X(k) = P(X \leq k) = \sum_{i=0}^{k} \binom{n}{i} p^i (1-p)^{n-i}


Where:
nn = number of trials
pp = probability of success on each trial
kk = number of successes (where 0kn0 \leq k \leq n)
(ni)\binom{n}{i} = binomial coefficient "nn choose ii"

Intuition Behind the Formula


Definition: The CDF gives the probability of observing kk or fewer successes in nn trials.

Summation of Probabilities:
Since we want the probability of getting *at most* kk successes, we sum the individual probabilities from 0 successes up to kk successes:

P(Xk)=P(X=0)+P(X=1)+P(X=2)++P(X=k)P(X \leq k) = P(X=0) + P(X=1) + P(X=2) + \cdots + P(X=k)


Discrete Nature: Unlike continuous distributions, the binomial CDF is a step function that jumps at each integer value from 0 to nn. Between integers, the CDF remains constant.

Complementary Probabilities:
For calculations involving "more than kk successes," use:
P(X>k)=1P(Xk)=1FX(k)P(X > k) = 1 - P(X \leq k) = 1 - F_X(k)


For "at least kk successes":
P(Xk)=1P(Xk1)=1FX(k1)P(X \geq k) = 1 - P(X \leq k-1) = 1 - F_X(k-1)

Binomial Distribution CDF

CDF for successes in n independent trials

CDF Explanation

The binomial CDF is F(k)=P(Xk)=i=0k(ni)pi(1p)niF(k) = P(X \leq k) = \sum_{i=0}^{k} \binom{n}{i} p^i (1-p)^{n-i}. This represents the probability of getting kk or fewer successes in nn trials. The CDF starts at F(0)=(1p)nF(0) = (1-p)^n (the probability of zero successes) and increases with each additional possible outcome, reaching 1.0 at k=nk = n. The shape of the CDF reflects the underlying binomial distribution: symmetric when p=0.5p = 0.5, right-skewed when p<0.5p < 0.5, and left-skewed when p>0.5p > 0.5.

Expected Value (Mean)


As explained in the general case for calculating expected value, the expected value of a discrete random variable is computed as a weighted sum where each possible value is multiplied by its probability:

E[X]=xxP(X=x)E[X] = \sum_{x} x \cdot P(X = x)


For the binomial distribution, we apply this general formula to the specific probability mass function of this distribution.

Formula


E[X]=npE[X] = np


Where:
nn = number of independent trials
pp = probability of success on each trial

Derivation and Intuition


The binomial random variable XX can be expressed as the sum of nn independent Bernoulli random variables: X=X1+X2++XnX = X_1 + X_2 + \cdots + X_n, where each XiX_i represents the outcome of trial ii (1 for success, 0 for failure).

Each Bernoulli variable has expected value E[Xi]=pE[X_i] = p.

By the linearity of expectation:

E[X]=E[X1+X2++Xn]=E[X1]+E[X2]++E[Xn]=p+p++p=npE[X] = E[X_1 + X_2 + \cdots + X_n] = E[X_1] + E[X_2] + \cdots + E[X_n] = p + p + \cdots + p = np


The result E[X]=npE[X] = np captures a simple and intuitive fact: if you perform nn trials, each with probability pp of success, you expect on average to get npnp successes. This is the most natural interpretation of "average number of successes."

Example


Consider flipping a fair coin 10 times, where n=10n = 10 and p=0.5p = 0.5:

E[X]=10×0.5=5E[X] = 10 \times 0.5 = 5


The expected number of heads in 10 flips is 5, which aligns perfectly with our intuition about a fair coin.

Variance and Standard Deviation


The variance of a discrete random variable measures how spread out the values are around the expected value. It is computed as:

Var(X)=E[(Xμ)2]=x(xμ)2P(X=x)\mathrm{Var}(X) = \mathbb{E}[(X - \mu)^2] = \sum_{x} (x - \mu)^2 P(X = x)


Or using the shortcut formula:

Var(X)=E[X2]μ2\mathrm{Var}(X) = \mathbb{E}[X^2] - \mu^2


For the binomial distribution, we apply this formula to derive the variance.

Formula


Var(X)=np(1p)\mathrm{Var}(X) = np(1-p)


Where:
nn = number of independent trials
pp = probability of success on each trial
(1p)=q(1-p) = q = probability of failure on each trial

Derivation and Intuition


Since the binomial random variable can be expressed as the sum of nn independent Bernoulli variables: X=X1+X2++XnX = X_1 + X_2 + \cdots + X_n, and for independent variables variances add:

Var(X)=Var(X1)+Var(X2)++Var(Xn)\mathrm{Var}(X) = \mathrm{Var}(X_1) + \mathrm{Var}(X_2) + \cdots + \mathrm{Var}(X_n)


Each Bernoulli variable has variance Var(Xi)=p(1p)\mathrm{Var}(X_i) = p(1-p).

Therefore:

Var(X)=np(1p)\mathrm{Var}(X) = np(1-p)


The result Var(X)=np(1p)\mathrm{Var}(X) = np(1-p) shows that variance depends on both the number of trials and the probability structure. The term p(1p)p(1-p) is maximized when p=0.5p = 0.5 (a fair coin), meaning maximum variability occurs when success and failure are equally likely. As pp approaches 0 or 1, variance decreases because outcomes become more predictable.

Standard Deviation


σ=np(1p)\sigma = \sqrt{np(1-p)}


Example


Consider flipping a fair coin 100 times, where n=100n = 100 and p=0.5p = 0.5:

Var(X)=100×0.5×0.5=25\mathrm{Var}(X) = 100 \times 0.5 \times 0.5 = 25


σ=25=5\sigma = \sqrt{25} = 5


The variance of 25 and standard deviation of 5 indicate that while we expect 50 heads on average, typical outcomes will deviate by about 5 heads in either direction.

Applications and Examples


Practical Example


Suppose you flip a fair coin n=5n = 5 times, where the probability of heads (success) is p=0.5p = 0.5. The probability of getting exactly k=3k = 3 heads is:

P(X=3)=(53)(0.5)3(0.5)53=100.1250.25=0.3125P(X = 3) = \binom{5}{3} (0.5)^3 (0.5)^{5-3} = 10 \cdot 0.125 \cdot 0.25 = 0.3125

This means there's a 31.25% chance of getting exactly 3 heads in 5 coin flips.

The possible outcomes range from k=0k = 0 (no heads) to k=5k = 5 (all heads), with probabilities determined by the formula above.