Binomial Distribution

Modeling the number of successes in a sequence of independent trials.

The "Series of Coin Flips" Distribution

The Binomial Distribution is a discrete probability distribution that models the number of successes in a fixed number of independent 'Bernoulli' trials, where each trial has only two possible outcomes: success or failure.

Think of flipping a coin 10 times and counting the number of heads. In finance, this could model the number of winning trades in a month (where each trade is a trial), or the number of portfolio companies that meet their earnings target in a quarter.

Interactive Binomial Distribution
Adjust the number of trials (n) and the probability of success (p) to see how the shape of the distribution changes.
Mean (μ\mu): 10.00
Variance (σ2\sigma^2): 5.00

Core Concepts

Probability Mass Function (PMF)
The PMF answers: 'What is the probability of getting exactly k successes in n trials?'
P(X=k)=(nk)pk(1p)nkP(X=k) = \binom{n}{k} p^k (1-p)^{n-k}

To find the probability of exactly kk successes, we consider three pieces:

  • pkp^k: This is the probability of achieving kk successes. If you want 3 wins and the probability of a win is pp, the combined probability is p×p×p=p3p \times p \times p = p^3.
  • (1p)nk(1-p)^{n-k}: This is the probability of getting the remaining nkn-k outcomes as failures. The probability of one failure is 1p1-p.
  • (nk)\binom{n}{k}: This is the binomial coefficient, read as "n choose k". It counts the number of different ways to arrange kk successes among nn trials. For example, in 4 trials, getting 2 successes (SSFF) could happen as SSFF, SFSF, SFFS, FSSF, FSFS, or FFSS. There are (42)=6\binom{4}{2}=6 ways.

Hover over the formula components to see how they relate to the chart above.

Mean (μ\mu): 10.00
Variance (σ2\sigma^2): 5.00
Cumulative Distribution Function (CDF)
The CDF answers: 'What is the probability of getting k successes or fewer?'
F(k)=P(Xk)=i=0k(ni)pi(1p)niF(k) = P(X \le k) = \sum_{i=0}^{k} \binom{n}{i} p^i (1-p)^{n-i}

The CDF is simply the sum of all the probabilities from the PMF for all outcomes up to and including `k`. For example, the probability of getting 2 or fewer successes, P(X2)P(X \le 2), is calculated as P(X=0)+P(X=1)+P(X=2)P(X=0) + P(X=1) + P(X=2).

Mean (μ\mu): 10.00
Variance (σ2\sigma^2): 5.00
Expected Value & Variance

Expected Value (Mean)

E[X]=npE[X] = np

This is intuitive: if you flip a fair coin (p=0.5) 20 times (n=20), you would expect to get 20 * 0.5 = 10 heads on average.

Variance

Var(X)=np(1p)Var(X) = np(1-p)

The variance measures the spread of the outcomes. Notice it's maximized when p=0.5 (a 50/50 coin flip has the highest uncertainty) and is 0 when the outcome is certain (p=0 or p=1).

Key Derivations

Deriving the Mean and Variance
The easiest way to derive the moments of a Binomial distribution is to recognize it as a sum of `n` independent Bernoulli trials.

Deriving the Expected Value (Mean)

Step 1: Decompose into Bernoulli Variables

A Binomial random variable XX with parameters nn and pp is the sum of nn independent Bernoulli random variables YiY_i, each with probability pp.

X=Y1+Y2++YnX = Y_1 + Y_2 + \dots + Y_n

We know from the Bernoulli distribution page that the mean of a single trial is E[Yi]=pE[Y_i] = p.

Step 2: Use Linearity of Expectation

The expectation of a sum is the sum of the expectations. This property holds even if the variables are not independent.

E[X]=E[Y1+Y2++Yn]=E[Y1]+E[Y2]++E[Yn]E[X] = E[Y_1 + Y_2 + \dots + Y_n] = E[Y_1] + E[Y_2] + \dots + E[Y_n]

Step 3: Sum the Bernoulli Means

We are adding the same mean, pp, to itself nn times.

E[X]=i=1np=npE[X] = \sum_{i=1}^{n} p = np
Final Mean Formula
E[X]=npE[X] = np

Deriving the Variance

We use the same decomposition. Since the Bernoulli trials are **independent**, the variance of their sum is the sum of their variances.

Step 1: Sum the Variances of Bernoulli Variables

The variance of a single Bernoulli trial is Var(Yi)=p(1p)Var(Y_i) = p(1-p).

Var(X)=Var(Y1++Yn)=Var(Y1)++Var(Yn)Var(X) = Var(Y_1 + \dots + Y_n) = Var(Y_1) + \dots + Var(Y_n)

Step 2: Final Result

We are adding the same variance to itself nn times.

Var(X)=i=1np(1p)=np(1p)Var(X) = \sum_{i=1}^{n} p(1-p) = np(1-p)
Final Variance Formula
Var(X)=np(1p)Var(X) = np(1-p)

Applications