Quant Memo
Foundational

Binomial Coefficients and Pascal's Triangle

The number of ways to choose a subset of a given size from a larger group, written $\binom{n}{k}$ — and Pascal's triangle, a simple visual pattern that generates every one of these counts just by adding two numbers above it.

Prerequisites: Permutations and Combinations

Counting "how many ways can I pick 3 stocks out of 20 for a basket" seems like it should require listing possibilities, but that becomes hopeless fast — even 20 choose 3 already has 1,140 combinations. Binomial coefficients give a closed formula for exactly this kind of count, and Pascal's triangle gives an almost magical way to build every one of these numbers just by repeated addition, without ever computing a single factorial.

An analogy: choosing a starting five, not a batting order

If you're choosing which 5 of 12 players will start a game — a plain selection where order doesn't matter, since "start" is start regardless of who's announced first — that's fundamentally a different, smaller count than choosing an ordered lineup of those 5 (where batting order matters). Binomial coefficients count the first kind: unordered selections. (nk)\binom{n}{k} ("n choose k") is the number of distinct subsets of size kk you can pick from nn items, with no regard to the order you picked them in.

The formula, one symbol at a time

(nk)=n!k!(nk)!,\binom{n}{k} = \frac{n!}{k!\,(n-k)!} ,

where n!n! ("n factorial") means n×(n1)××1n\times(n-1)\times\cdots\times1, and (nk)\binom{n}{k} reads "n choose k." In plain English: count all n!n! orderings of the full group, then divide by k!k! (to stop caring about the order within your chosen subset of size kk) and by (nk)!(n-k)! (to stop caring about the order of the leftover, unchosen items). Pascal's triangle arranges these numbers in rows, row nn holding (n0),(n1),,(nn)\binom{n}{0}, \binom{n}{1}, \dots, \binom{n}{n}, and each entry equals the sum of the two entries diagonally above it in the previous row:

(nk)=(n1k1)+(n1k).\binom{n}{k} = \binom{n-1}{k-1} + \binom{n-1}{k} .

In plain English: to select kk items from nn, either a specific item is in your selection (then you still need to pick the remaining k1k-1 from the other n1n-1) or it's not (then you need all kk from the other n1n-1) — these two cases are mutually exclusive and cover everything, so their counts simply add.

Worked example 1: choosing 3 stocks from 6 by hand

(63)=6!3!3!=7206×6=72036=20\binom{6}{3} = \frac{6!}{3!\,3!} = \frac{720}{6\times6} = \frac{720}{36} = 20. Cross-checking with the addition rule: (63)=(52)+(53)\binom{6}{3} = \binom{5}{2}+\binom{5}{3}. Computing each: (52)=1202×6=10\binom{5}{2}=\frac{120}{2\times6}=10, (53)=1206×2=10\binom{5}{3}=\frac{120}{6\times2}=10. Sum: 10+10=2010+10=20 — matching exactly, confirming the recursive addition rule gives the same answer as the direct factorial formula, just built up from smaller cases.

Worked example 2: building three rows of Pascal's triangle

Row 0: (00)=1\binom{0}{0}=1. Row 1: (10)=1,(11)=1\binom{1}{0}=1, \binom{1}{1}=1. Row 2: (20)=1\binom{2}{0}=1, (21)=(10)+(11)=1+1=2\binom{2}{1}=\binom{1}{0}+\binom{1}{1}=1+1=2, (22)=1\binom{2}{2}=1. Row 3: (30)=1\binom{3}{0}=1, (31)=(20)+(21)=1+2=3\binom{3}{1}=\binom{2}{0}+\binom{2}{1}=1+2=3, (32)=(21)+(22)=2+1=3\binom{3}{2}=\binom{2}{1}+\binom{2}{2}=2+1=3, (33)=1\binom{3}{3}=1. So row 3 reads 1, 3, 3, 1 — exactly the coefficients you'd get expanding (a+b)3=a3+3a2b+3ab2+b3(a+b)^3 = a^3+3a^2b+3ab^2+b^3, which is the "binomial" in binomial coefficient: (nk)\binom{n}{k} is literally the coefficient of ankbka^{n-k}b^k in the expansion of (a+b)n(a+b)^n.

Function explorer
-2222.0
x = 1.00f(x) = 2.000

Picture Pascal's triangle as a grid where each cell sums the two above it: the outer edges are always 1, and the interior numbers grow rapidly toward the middle of each row, mirroring the classic bell-curve shape that emerges from binomial probabilities as nn grows.

1 1 1 1 2 1 1 3 3 1 1 4 6 4 1
Every entry in Pascal's triangle is the sum of the two entries diagonally above it — row n, position k gives binom(n,k) directly.

What this means in practice

Binomial coefficients are the raw counting machinery behind the binomial probability distribution (probability of exactly kk successes in nn trials involves (nk)\binom{n}{k} directly), option-pricing binomial trees (the number of distinct up/down paths reaching a given node), portfolio construction from a universe ("how many distinct 30-stock portfolios from a 500-stock universe"), and virtually every probability brainteaser involving counting subsets. Fast, mental estimation of (nk)\binom{n}{k} for small kk (like (n2)=n(n1)/2\binom{n}{2}=n(n-1)/2) is a standard interview skill.

(nk)=n!k!(nk)!\binom{n}{k} = \frac{n!}{k!(n-k)!} counts the number of unordered subsets of size kk from nn items, and Pascal's triangle generates every one of these values by simple repeated addition — each entry equal to the sum of the two entries diagonally above it, without ever computing a factorial directly.

The classic mixup is applying (nk)\binom{n}{k} when order actually does matter (which needs the permutation count n!/(nk)!n!/(n-k)! instead) — "how many ways to choose 3 board members" is a combination ((n3)\binom{n}{3}), but "how many ways to choose a president, treasurer, and secretary from the same group" is a permutation, since swapping which of the three gets which role produces a genuinely different outcome. Mistaking one for the other is the single most common counting error in interview probability questions.

Related concepts

Practice in interviews

Further reading

  • Feller, An Introduction to Probability Theory and Its Applications, ch. 2
  • Graham, Knuth & Patashnik, Concrete Mathematics, ch. 5
ShareTwitterLinkedIn