Quant interview prep guides

Quant Interview Cheat Sheet

Formulas, identities and fast methods — the reference sheet to keep open while you prepare.

By LeetQuidity · Published July 19, 2026 · Last updated July 19, 2026 · Free to use, print and link to

This is a reference sheet, not a course. It collects the standard results a quant interview actually draws on — counting, probability and Bayes, the distributions worth knowing cold, expectation and variance identities, waiting times and stopping rules, random walks, the dice, coin and card numbers interviewers build questions on top of, mental math, and market-making basics — plus a one-line note on when each one is the right tool.

Everything here has been checked by exact enumeration or simulation. Where a result depends on a convention or an assumption, the note says so, because getting that part right is usually what the interviewer is actually testing.

Contents

  1. 1. Counting and combinatorics
  2. 2. Probability rules, conditioning and Bayes
  3. 3. Discrete distributions
  4. 4. Continuous distributions
  5. 5. Expectation and variance identities
  6. 6. Waiting times, streaks and stopping rules
  7. 7. Random walks and gambler's ruin
  8. 8. Coins, dice and cards — standard results
  9. 9. Five-card poker hand counts
  10. 10. Geometric and continuous probability
  11. 11. Lattice paths, grids and parity
  12. 12. Statistics and regression essentials
  13. 13. Mental math and estimation
  14. 14. Market making and betting basics
  15. 15. Interview attack patterns

1. Counting and combinatorics

Decide two things before reaching for a formula: does order matter, and are repeats allowed. Almost every counting error is really a mis-answered version of one of those two questions.

Arrangements of nnn distinct items
n!n!n!
Ordered selection of kkk from nnn
P(n,k)=n!(n−k)!P(n,k) = \frac{n!}{(n-k)!}P(n,k)=(n−k)!n!​

Order matters, no repeats. Podium finishes, passwords, seat assignments.

Unordered selection of kkk from nnn
(nk)=n!k! (n−k)!\binom{n}{k} = \frac{n!}{k!\,(n-k)!}(kn​)=k!(n−k)!n!​

Order does not matter, no repeats. Committees, poker hands, subsets.

Ordered with repetition
nkn^{k}nk

Each of kkk slots independently picks one of nnn options.

Unordered with repetition (stars and bars)
(n+k−1k−1)\binom{n+k-1}{k-1}(k−1n+k−1​)

Non-negative integer solutions of x1+⋯+xk=nx_1+\cdots+x_k=nx1​+⋯+xk​=n — i.e. nnn identical items into kkk labelled boxes. Require every box non-empty and it becomes (n−1k−1)\binom{n-1}{k-1}(k−1n−1​).

Multinomial (arrangements with repeats)
n!n1! n2!⋯nr!\frac{n!}{n_1!\,n_2!\cdots n_r!}n1​!n2​!⋯nr​!n!​

Distinct arrangements of a word with repeated letters, or splitting nnn items into labelled groups of sizes nin_ini​.

Arrangements around a circle
(n−1)!(n-1)!(n−1)!

Fix one item to kill the rotational symmetry. This anchoring trick reappears constantly in circle problems.

Symmetry
(nk)=(nn−k)\binom{n}{k} = \binom{n}{n-k}(kn​)=(n−kn​)

Choosing who is in equals choosing who is out.

Pascal's rule
(nk)=(n−1k−1)+(n−1k)\binom{n}{k} = \binom{n-1}{k-1} + \binom{n-1}{k}(kn​)=(k−1n−1​)+(kn−1​)

Condition on whether a distinguished item is included. The template for most combinatorial recursions.

Row sum
∑k=0n(nk)=2n\sum_{k=0}^{n} \binom{n}{k} = 2^{n}∑k=0n​(kn​)=2n

The number of subsets of an nnn-set.

Binomial theorem
(x+y)n=∑k=0n(nk)xky n−k(x+y)^{n} = \sum_{k=0}^{n} \binom{n}{k} x^{k} y^{\,n-k}(x+y)n=∑k=0n​(kn​)xkyn−k
Vandermonde's identity
∑k(mk)(nr−k)=(m+nr)\sum_{k} \binom{m}{k}\binom{n}{r-k} = \binom{m+n}{r}∑k​(km​)(r−kn​)=(rm+n​)

Split a selection across two pools and sum over how many come from the first.

Hockey stick
∑i=kn(ik)=(n+1k+1)\sum_{i=k}^{n} \binom{i}{k} = \binom{n+1}{k+1}∑i=kn​(ki​)=(k+1n+1​)

Condition on the largest element chosen.

Inclusion–exclusion (two and three sets)
∣A∪B∣=∣A∣+∣B∣−∣A∩B∣|A \cup B| = |A| + |B| - |A \cap B|∣A∪B∣=∣A∣+∣B∣−∣A∩B∣

For three: ∣A∪B∪C∣=∣A∣+∣B∣+∣C∣−∣A∩B∣−∣A∩C∣−∣B∩C∣+∣A∩B∩C∣|A\cup B\cup C| = |A|+|B|+|C| - |A\cap B| - |A\cap C| - |B\cap C| + |A\cap B\cap C|∣A∪B∪C∣=∣A∣+∣B∣+∣C∣−∣A∩B∣−∣A∩C∣−∣B∩C∣+∣A∩B∩C∣.

Inclusion–exclusion (general)
P ⁣(⋃i=1nAi)=∑k=1n(−1)k+1 ⁣ ⁣∑∣S∣=kP ⁣(⋂i∈SAi)\Prob\!\left(\bigcup_{i=1}^{n} A_i\right) = \sum_{k=1}^{n} (-1)^{k+1} \!\!\sum_{|S|=k} \Prob\!\left(\bigcap_{i \in S} A_i\right)P(⋃i=1n​Ai​)=∑k=1n​(−1)k+1∑∣S∣=k​P(⋂i∈S​Ai​)

Use it when the complement is not simpler. Truncating after the first term gives the union bound.

Derangements (no item in its own place)
Dn=n!∑k=0n(−1)kk!=[n!e]D_n = n! \sum_{k=0}^{n} \frac{(-1)^{k}}{k!} = \left[\frac{n!}{e}\right]Dn​=n!∑k=0n​k!(−1)k​=[en!​]

[ ⋅ ][\,\cdot\,][⋅] is the nearest integer. D1..D6=0, 1, 2, 9, 44, 265D_1..D_6 = 0,\,1,\,2,\,9,\,44,\,265D1​..D6​=0,1,2,9,44,265, and Dn/n!→e−1≈0.368D_n/n! \to e^{-1} \approx 0.368Dn​/n!→e−1≈0.368 fast — the "nobody gets their own hat" probability is essentially 1/e1/e1/e from n=5n=5n=5 onwards.

Surjections from an nnn-set onto a kkk-set
∑j=0k(−1)j(kj)(k−j)n\sum_{j=0}^{k} (-1)^{j} \binom{k}{j} (k-j)^{n}∑j=0k​(−1)j(jk​)(k−j)n

Inclusion–exclusion over which targets are missed. This is the engine behind "every face appears" and occupancy questions.

Monotone lattice paths
(m+nn)\binom{m+n}{n}(nm+n​)

Right/up steps from (0,0)(0,0)(0,0) to (m,n)(m,n)(m,n): choose which of the m+nm+nm+n steps are up.

Catalan numbers
Cn=1n+1(2nn)C_n = \frac{1}{n+1}\binom{2n}{n}Cn​=n+11​(n2n​)

1, 1, 2, 5, 14, 42, 1321,\,1,\,2,\,5,\,14,\,42,\,1321,1,2,5,14,42,132. Counts paths that never cross the diagonal, balanced bracketings, and non-crossing pairings.

Stirling's approximation
n!≈2πn(ne)nn! \approx \sqrt{2\pi n}\left(\frac{n}{e}\right)^{n}n!≈2πn​(en​)n

Within 1% by n=10n=10n=10. Use it to compare factorial-scale quantities without computing them.

2. Probability rules, conditioning and Bayes

Conditioning changes the denominator. If you can say out loud exactly which outcomes remain in your universe, the arithmetic is usually trivial.

Complement
P(Ac)=1−P(A)\Prob(A^{c}) = 1 - \Prob(A)P(Ac)=1−P(A)
Union
P(A∪B)=P(A)+P(B)−P(A∩B)\Prob(A \cup B) = \Prob(A) + \Prob(B) - \Prob(A \cap B)P(A∪B)=P(A)+P(B)−P(A∩B)
Conditional probability
P(A∣B)=P(A∩B)P(B)\Prob(A \mid B) = \frac{\Prob(A \cap B)}{\Prob(B)}P(A∣B)=P(B)P(A∩B)​
Chain rule
P(A1∩⋯∩An)=P(A1) P(A2∣A1)⋯P(An∣A1∩⋯∩An−1)\Prob(A_1 \cap \cdots \cap A_n) = \Prob(A_1)\,\Prob(A_2 \mid A_1)\cdots \Prob(A_n \mid A_1 \cap \cdots \cap A_{n-1})P(A1​∩⋯∩An​)=P(A1​)P(A2​∣A1​)⋯P(An​∣A1​∩⋯∩An−1​)

The sequential view of any without-replacement draw.

Independence
P(A∩B)=P(A) P(B)\Prob(A \cap B) = \Prob(A)\,\Prob(B)P(A∩B)=P(A)P(B)

Independent is not the same as mutually exclusive. Two disjoint events of positive probability are maximally dependent: one occurring rules the other out.

Law of total probability
P(A)=∑iP(A∣Bi) P(Bi)\Prob(A) = \sum_{i} \Prob(A \mid B_i)\,\Prob(B_i)P(A)=∑i​P(A∣Bi​)P(Bi​)

Partition on the piece of information you wish you had.

Bayes' rule
P(A∣B)=P(B∣A) P(A)P(B)\Prob(A \mid B) = \frac{\Prob(B \mid A)\,\Prob(A)}{\Prob(B)}P(A∣B)=P(B)P(B∣A)P(A)​
Bayes in odds form
P(H∣E)P(Hc∣E)=P(H)P(Hc)⏟prior odds×P(E∣H)P(E∣Hc)⏟likelihood ratio\frac{\Prob(H \mid E)}{\Prob(H^{c} \mid E)} = \underbrace{\frac{\Prob(H)}{\Prob(H^{c})}}_{\text{prior odds}} \times \underbrace{\frac{\Prob(E \mid H)}{\Prob(E \mid H^{c})}}_{\text{likelihood ratio}}P(Hc∣E)P(H∣E)​=prior oddsP(Hc)P(H)​​​×likelihood ratioP(E∣Hc)P(E∣H)​​​

Posterior odds = prior odds × likelihood ratio. Far faster than the fraction form under time pressure, and it composes: independent pieces of evidence multiply their likelihood ratios.

At least one
P(at least one)=1−P(none)\Prob(\text{at least one}) = 1 - \Prob(\text{none})P(at least one)=1−P(none)

Almost always faster than a union. The trigger words are at least, some, any, collision, max, min.

Union bound (Boole)
P ⁣(⋃iAi)≤∑iP(Ai)\Prob\!\left(\bigcup_i A_i\right) \le \sum_i \Prob(A_i)P(⋃i​Ai​)≤∑i​P(Ai​)

A free upper bound with no independence assumption. Good enough for most rare-event sanity checks.

Screening / base rates
P(sick∣+)=πsπs+(1−π)(1−t)\Prob(\text{sick} \mid +) = \frac{\pi s}{\pi s + (1-\pi)(1-t)}P(sick∣+)=πs+(1−π)(1−t)πs​

Prevalence π\piπ, sensitivity sss, specificity ttt. Rebuild it as counts out of 10,000 rather than algebra and the base-rate fallacy disappears.

Conditional independence
P(A∩B∣C)=P(A∣C) P(B∣C)\Prob(A \cap B \mid C) = \Prob(A \mid C)\,\Prob(B \mid C)P(A∩B∣C)=P(A∣C)P(B∣C)

Neither implies nor is implied by unconditional independence. Coin flips from an unknown-bias coin are conditionally independent given the bias and dependent without it.

3. Discrete distributions

Nine times out of ten the question is not "what is the formula" but "which distribution is this". The deciding features are: fixed trials or waiting, with or without replacement, and one success or many.

Bernoulli (p)(p)(p)
P(X=1)=p,P(X=0)=1−p\Prob(X=1)=p,\qquad \Prob(X=0)=1-pP(X=1)=p,P(X=0)=1−p

Mean ppp, variance p(1−p)p(1-p)p(1−p) — maximised at p=12p=\tfrac12p=21​. One trial; the atom every indicator argument is built from.

Binomial Bin(n,p)\mathrm{Bin}(n,p)Bin(n,p)
P(X=k)=(nk)pk(1−p) n−k\Prob(X=k) = \binom{n}{k} p^{k}(1-p)^{\,n-k}P(X=k)=(kn​)pk(1−p)n−k

Mean npnpnp, variance np(1−p)np(1-p)np(1−p). Fixed number of independent trials, count the successes. Heads in nnn flips; reds in nnn draws with replacement.

Geometric — trials until first success
P(X=k)=(1−p) k−1p,k=1,2,…\Prob(X=k) = (1-p)^{\,k-1} p, \qquad k = 1, 2, \ldotsP(X=k)=(1−p)k−1p,k=1,2,…

Mean 1/p1/p1/p, variance (1−p)/p2(1-p)/p^{2}(1−p)/p2. Memoryless: P(X>m+n∣X>m)=P(X>n)\Prob(X > m+n \mid X > m) = \Prob(X > n)P(X>m+n∣X>m)=P(X>n).

Geometric — failures before first success
P(X=k)=(1−p) kp,k=0,1,…\Prob(X=k) = (1-p)^{\,k} p, \qquad k = 0, 1, \ldotsP(X=k)=(1−p)kp,k=0,1,…

Mean (1−p)/p(1-p)/p(1−p)/p, same variance (1−p)/p2(1-p)/p^{2}(1−p)/p2. Identical process, different convention — read the question to see which one it wants. The two means differ by exactly 1.

Negative binomial — trials until the rrr-th success
P(X=n)=(n−1r−1)pr(1−p) n−r\Prob(X=n) = \binom{n-1}{r-1} p^{r} (1-p)^{\,n-r}P(X=n)=(r−1n−1​)pr(1−p)n−r

Mean r/pr/pr/p, variance r(1−p)/p2r(1-p)/p^{2}r(1−p)/p2. It is a sum of rrr independent geometrics, which is why both moments are just rrr times the geometric ones.

Hypergeometric
P(X=k)=(Kk)(N−K n−k)(Nn)\Prob(X=k) = \frac{\binom{K}{k}\binom{N-K}{\,n-k}}{\binom{N}{n}}P(X=k)=(nN​)(kK​)(n−kN−K​)​

Population NNN with KKK successes, nnn drawn without replacement. Mean nKNn\frac{K}{N}nNK​ — same as the binomial. Variance nKN ⁣(1−KN) ⁣N−nN−1n\frac{K}{N}\!\left(1-\frac{K}{N}\right)\!\frac{N-n}{N-1}nNK​(1−NK​)N−1N−n​; that last finite-population correction is what makes it tighter than the binomial. This is the card-problem distribution.

Poisson (λ)(\lambda)(λ)
P(X=k)=e−λλkk!\Prob(X=k) = \frac{e^{-\lambda} \lambda^{k}}{k!}P(X=k)=k!e−λλk​

Mean λ\lambdaλ, variance λ\lambdaλ — equal, which is the diagnostic. The limit of Bin(n,p)\mathrm{Bin}(n,p)Bin(n,p) as n→∞n \to \inftyn→∞, p→0p \to 0p→0 with np→λnp \to \lambdanp→λ. Sums of independent Poissons are Poisson.

Discrete uniform on {1,…,n}\{1,\ldots,n\}{1,…,n}
P(X=k)=1n\Prob(X=k) = \frac{1}{n}P(X=k)=n1​

Mean n+12\frac{n+1}{2}2n+1​, variance n2−112\frac{n^{2}-1}{12}12n2−1​. A fair nnn-sided die.

4. Continuous distributions

For continuous variables the survival function P(X>x)\Prob(X > x)P(X>x) is usually the faster object to reason about than the density.

Uniform (a,b)(a,b)(a,b)
f(x)=1b−a,a≤x≤bf(x) = \frac{1}{b-a}, \qquad a \le x \le bf(x)=b−a1​,a≤x≤b

Mean a+b2\frac{a+b}{2}2a+b​, variance (b−a)212\frac{(b-a)^{2}}{12}12(b−a)2​.

Exponential (λ)(\lambda)(λ)
f(x)=λe−λx,P(X>x)=e−λxf(x) = \lambda e^{-\lambda x}, \qquad \Prob(X > x) = e^{-\lambda x}f(x)=λe−λx,P(X>x)=e−λx

Mean 1/λ1/\lambda1/λ, variance 1/λ21/\lambda^{2}1/λ2. The only continuous memoryless law. Gaps between Poisson arrivals; the minimum of independent exponentials is exponential with the summed rate.

Normal (μ,σ2)(\mu, \sigma^{2})(μ,σ2)
f(x)=1σ2π e−(x−μ)2/(2σ2)f(x) = \frac{1}{\sigma\sqrt{2\pi}}\, e^{-(x-\mu)^{2}/(2\sigma^{2})}f(x)=σ2π​1​e−(x−μ)2/(2σ2)

Roughly 68% / 95% / 99.7% of mass lies within 1 / 2 / 3 standard deviations.

Standard normal facts worth memorising
φ(0)=12π≈0.399,E∣Z∣=2π≈0.798\varphi(0) = \tfrac{1}{\sqrt{2\pi}} \approx 0.399, \qquad \E|Z| = \sqrt{\tfrac{2}{\pi}} \approx 0.798φ(0)=2π​1​≈0.399,E∣Z∣=π2​​≈0.798

Two-sided 90% / 95% / 99% intervals use z=1.645z = 1.645z=1.645 / 1.961.961.96 / 2.5762.5762.576.

Sums of independent normals
N(μ1,σ12)+N(μ2,σ22)  =  N(μ1+μ2, σ12+σ22)N(\mu_1, \sigma_1^{2}) + N(\mu_2, \sigma_2^{2}) \;=\; N(\mu_1 + \mu_2,\ \sigma_1^{2} + \sigma_2^{2})N(μ1​,σ12​)+N(μ2​,σ22​)=N(μ1​+μ2​, σ12​+σ22​)

Variances add; standard deviations do not. Scaling time by ttt scales volatility by t\sqrt{t}t​.

Gamma (k,λ)(k, \lambda)(k,λ)
sum of k i.i.d. Exp(λ)\text{sum of } k \text{ i.i.d. } \mathrm{Exp}(\lambda)sum of k i.i.d. Exp(λ)

Mean k/λk/\lambdak/λ, variance k/λ2k/\lambda^{2}k/λ2. Time until the kkk-th Poisson arrival.

Beta (α,β)(\alpha, \beta)(α,β)
E[X]=αα+β\E[X] = \frac{\alpha}{\alpha+\beta}E[X]=α+βα​

The conjugate prior for a coin bias: a Beta(α,β)\mathrm{Beta}(\alpha,\beta)Beta(α,β) prior plus hhh heads and ttt tails gives a Beta(α+h, β+t)\mathrm{Beta}(\alpha+h,\ \beta+t)Beta(α+h, β+t) posterior. A uniform prior is Beta(1,1)\mathrm{Beta}(1,1)Beta(1,1), which is why the posterior mean after hhh heads in nnn flips is h+1n+2\frac{h+1}{n+2}n+2h+1​ (Laplace).

Lognormal
X=eY,  Y∼N(μ,σ2) ⟹ E[X]=eμ+σ2/2X = e^{Y},\ \ Y \sim N(\mu, \sigma^{2}) \ \Longrightarrow\ \E[X] = e^{\mu + \sigma^{2}/2}X=eY,  Y∼N(μ,σ2) ⟹ E[X]=eμ+σ2/2

The mean sits above the median eμe^{\mu}eμ. This gap is the volatility drag that makes compounded returns lag their arithmetic average.

5. Expectation and variance identities

Linearity of expectation is the highest-yield identity in the entire subject: it needs no independence, so almost any "expected number of ..." question collapses into a sum of indicator probabilities.

Linearity of expectation
E ⁣[∑iXi]=∑iE[Xi]\E\!\left[\sum_{i} X_i\right] = \sum_{i} \E[X_i]E[∑i​Xi​]=∑i​E[Xi​]

No independence required. Write the quantity as a sum of indicators, price each indicator with a probability, and add.

Indicators
E[1A]=P(A)\E[\mathbf{1}_A] = \Prob(A)E[1A​]=P(A)

The bridge that turns counting into expectation.

Affine transforms
E[aX+b]=aE[X]+b,Var⁡(aX+b)=a2Var⁡(X)\E[aX+b] = a\E[X]+b, \qquad \Var(aX+b) = a^{2}\Var(X)E[aX+b]=aE[X]+b,Var(aX+b)=a2Var(X)

Shifts move the mean and leave the variance alone.

LOTUS
E[g(X)]=∑xg(x) P(X=x)\E[g(X)] = \sum_{x} g(x)\,\Prob(X=x)E[g(X)]=∑x​g(x)P(X=x)

And in general E[g(X)]≠g(E[X])\E[g(X)] \ne g(\E[X])E[g(X)]=g(E[X]) — see Jensen below.

Variance shortcut
Var⁡(X)=E[X2]−(E[X])2\Var(X) = \E[X^{2}] - (\E[X])^{2}Var(X)=E[X2]−(E[X])2
Variance of a sum
Var⁡ ⁣(∑iXi)=∑iVar⁡(Xi)+2∑i<jCov⁡(Xi,Xj)\Var\!\left(\sum_{i} X_i\right) = \sum_{i} \Var(X_i) + 2\sum_{i<j} \Cov(X_i, X_j)Var(∑i​Xi​)=∑i​Var(Xi​)+2∑i<j​Cov(Xi​,Xj​)

Unlike expectation, variances add only when the terms are uncorrelated. Forgetting the covariance term is the single most common quant-interview slip.

Covariance
Cov⁡(X,Y)=E[XY]−E[X]E[Y]\Cov(X,Y) = \E[XY] - \E[X]\E[Y]Cov(X,Y)=E[XY]−E[X]E[Y]
Bilinearity
Cov⁡(aX+b, cY+d)=ac Cov⁡(X,Y)\Cov(aX+b,\ cY+d) = ac\,\Cov(X,Y)Cov(aX+b, cY+d)=acCov(X,Y)
Correlation
ρ=Cov⁡(X,Y)σXσY∈[−1,1]\rho = \frac{\Cov(X,Y)}{\sigma_X \sigma_Y} \in [-1, 1]ρ=σX​σY​Cov(X,Y)​∈[−1,1]

Zero correlation is not independence: with X∼N(0,1)X \sim N(0,1)X∼N(0,1), XXX and X2X^{2}X2 are uncorrelated and completely dependent. Correlation only measures the linear part.

Tower property (law of total expectation)
E[X]=E[E[X∣Y]]\E[X] = \E\big[\E[X \mid Y]\big]E[X]=E[E[X∣Y]]

Condition on the first step, the hidden state, or the piece of information you wish you had — then average it away.

Law of total variance (EVE)
Var⁡(X)=E[Var⁡(X∣Y)]+Var⁡(E[X∣Y])\Var(X) = \E\big[\Var(X \mid Y)\big] + \Var\big(\E[X \mid Y]\big)Var(X)=E[Var(X∣Y)]+Var(E[X∣Y])

Read it as within-group variation plus between-group variation.

Tail sum (discrete, X∈{0,1,2,…}X \in \{0,1,2,\ldots\}X∈{0,1,2,…})
E[X]=∑k≥1P(X≥k)\E[X] = \sum_{k \ge 1} \Prob(X \ge k)E[X]=∑k≥1​P(X≥k)

The fastest route to the expected maximum of several draws, because P(max⁡≥k)\Prob(\max \ge k)P(max≥k) is easy and the full pmf is not.

Tail integral (continuous, X≥0X \ge 0X≥0)
E[X]=∫0∞P(X>x) dx\E[X] = \int_{0}^{\infty} \Prob(X > x)\,dxE[X]=∫0∞​P(X>x)dx
Wald's identity
E ⁣[∑i=1NXi]=E[N] E[X]\E\!\left[\sum_{i=1}^{N} X_i\right] = \E[N]\,\E[X]E[∑i=1N​Xi​]=E[N]E[X]

Requires NNN to be a stopping time for the i.i.d. sequence, with E[N]<∞\E[N] < \inftyE[N]<∞. It breaks if NNN is allowed to look at the XiX_iXi​ it is about to include — which is exactly how "guaranteed profit" betting systems smuggle in their error.

Jensen's inequality
g convex ⟹ E[g(X)]≥g(E[X])g \text{ convex} \ \Longrightarrow\ \E[g(X)] \ge g(\E[X])g convex ⟹ E[g(X)]≥g(E[X])

Convex payoffs love variance; concave utilities hate it. Reversed for concave ggg.

Markov's inequality
P(X≥a)≤E[X]a(X≥0)\Prob(X \ge a) \le \frac{\E[X]}{a} \qquad (X \ge 0)P(X≥a)≤aE[X]​(X≥0)
Chebyshev's inequality
P(∣X−μ∣≥kσ)≤1k2\Prob(|X-\mu| \ge k\sigma) \le \frac{1}{k^{2}}P(∣X−μ∣≥kσ)≤k21​

Distribution-free, therefore loose. If you know the shape, use it instead.

Cauchy–Schwarz
∣Cov⁡(X,Y)∣≤σXσY|\Cov(X,Y)| \le \sigma_X \sigma_Y∣Cov(X,Y)∣≤σX​σY​

Equivalently ∣ρ∣≤1|\rho| \le 1∣ρ∣≤1.

6. Waiting times, streaks and stopping rules

Every waiting-time question is a first-step analysis in disguise. Define the state as "how much progress survives a failure", write one equation per state, solve.

Expected trials to first success
E[T]=1p\E[T] = \frac{1}{p}E[T]=p1​

Variance 1−pp2\frac{1-p}{p^{2}}p21−p​. Expected rolls to a first six: 6.

Coupon collector
E[T]=n∑k=1n1k=nHn≈n(ln⁡n+γ)\E[T] = n\sum_{k=1}^{n} \frac{1}{k} = n H_n \approx n(\ln n + \gamma)E[T]=n∑k=1n​k1​=nHn​≈n(lnn+γ)

With γ≈0.5772\gamma \approx 0.5772γ≈0.5772. For a fair die, 6H6=14.76H_6 = 14.76H6​=14.7 rolls to see all six faces. Variance ≈π2n26\approx \frac{\pi^{2} n^{2}}{6}≈6π2n2​ — the distribution has a long right tail, so the mean understates the typical bad case.

Run of kkk consecutive successes
E[T]=1−pkpk (1−p)\E[T] = \frac{1 - p^{k}}{p^{k}\,(1-p)}E[T]=pk(1−p)1−pk​

For a fair coin this is 2k+1−22^{k+1} - 22k+1−2: 6 flips for HHHHHH, 14 for HHHHHHHHH, 30 for HHHHHHHHHHHH.

Fair-coin pattern waiting times
E[THH]=6,E[THT]=4,E[TTHH]=8,E[THTH]=10,E[THHH]=14\E[T_{HH}] = 6,\quad \E[T_{HT}] = 4,\quad \E[T_{THH}] = 8,\quad \E[T_{HTH}] = 10,\quad \E[T_{HHH}] = 14E[THH​]=6,E[THT​]=4,E[TTHH​]=8,E[THTH​]=10,E[THHH​]=14

Self-overlapping patterns wait longer. After a failed HHHHHH you keep nothing; after a failed HTHTHT you still hold an HHH. Attack any of these with states indexed by the length of the currently matching prefix.

Birthday problem / first collision
P(no repeat in k)=∏i=0k−1 ⁣(1−in)≈e−k(k−1)/(2n)\Prob(\text{no repeat in } k) = \prod_{i=0}^{k-1}\!\left(1 - \frac{i}{n}\right) \approx e^{-k(k-1)/(2n)}P(no repeat in k)=∏i=0k−1​(1−ni​)≈e−k(k−1)/(2n)

Crosses 50% at k≈1.177nk \approx 1.177\sqrt{n}k≈1.177n​ — for n=365n = 365n=365 that is k=23k = 23k=23. Expected draws to the first repeat ≈πn/2+23≈24.6\approx \sqrt{\pi n / 2} + \tfrac{2}{3} \approx 24.6≈πn/2​+32​≈24.6.

Optimal stopping rule
stop when the current value ≥ E[value of continuing]\text{stop when the current value} \ \ge\ \E[\text{value of continuing}]stop when the current value ≥ E[value of continuing]

Solve backwards from the last decision. One reroll of a fair die: continuation value is 3.5, so keep 4, 5, 6 and reroll otherwise, giving E=4.25\E = 4.25E=4.25.

Secretary problem
reject the first n/e, then take the next record\text{reject the first } n/e \text{, then take the next record}reject the first n/e, then take the next record

Success probability tends to 1/e≈0.3681/e \approx 0.3681/e≈0.368. The lesson interviewers want is that "observe, then commit" beats both greed and patience.

Optional stopping theorem
Sn a martingale, T a bounded stopping time ⟹ E[ST]=E[S0]S_n \text{ a martingale},\ T \text{ a bounded stopping time} \ \Longrightarrow\ \E[S_T] = \E[S_0]Sn​ a martingale, T a bounded stopping time ⟹ E[ST​]=E[S0​]

The reason most "is this game fair?" answers are one line. It needs the boundedness or integrability condition — dropping it is precisely why the double-your-bet martingale system is not free money.

7. Random walks and gambler's ruin

Set up: you start at iii, move up 1 with probability ppp and down 1 with probability q=1−pq = 1-pq=1−p, and stop on hitting 000 or NNN. Nearly every wealth, streak, or barrier story reduces to this.

Fair walk — reaching NNN before 000
P(hit N first)=iN\Prob(\text{hit } N \text{ first}) = \frac{i}{N}P(hit N first)=Ni​

Linear in the starting point. Your chance of doubling before busting is just your fraction of the total stake.

Fair walk — expected duration
E[T]=i (N−i)\E[T] = i\,(N-i)E[T]=i(N−i)

Maximised in the middle, and surprisingly long: from 50 with barriers at 0 and 100 the game lasts 2,500 steps on average.

Biased walk — reaching NNN before 000
P(hit N first)=1−r i1−r N,r=qp\Prob(\text{hit } N \text{ first}) = \frac{1 - r^{\,i}}{1 - r^{\,N}}, \qquad r = \frac{q}{p}P(hit N first)=1−rN1−ri​,r=pq​

A small edge compounds hard: with r<1r < 1r<1 the probability approaches 1−ri1 - r^{i}1−ri for large NNN, so an infinitely rich opponent still cannot ruin you with certainty.

Biased walk — expected duration
E[T]=iq−p−Nq−p⋅1−r i1−r N\E[T] = \frac{i}{q-p} - \frac{N}{q-p}\cdot\frac{1 - r^{\,i}}{1 - r^{\,N}}E[T]=q−pi​−q−pN​⋅1−rN1−ri​

Valid for p≠qp \ne qp=q.

Reflection principle
#{paths A→B touching a line}=#{paths A∗→B}\#\{\text{paths } A \to B \text{ touching a line}\} = \#\{\text{paths } A^{*} \to B\}#{paths A→B touching a line}=#{paths A∗→B}

Reflect the start across the barrier. This one bijection gives the ballot problem, Catalan paths, and first-passage counts.

Ballot problem
P(A strictly ahead throughout)=a−ba+b\Prob(A \text{ strictly ahead throughout}) = \frac{a-b}{a+b}P(A strictly ahead throughout)=a+ba−b​

For aaa votes for A and b<ab < ab<a for B, counted in random order.

Return to the origin
P(S2n=0)=(2nn)4n≈1πn\Prob(S_{2n} = 0) = \frac{\binom{2n}{n}}{4^{n}} \approx \frac{1}{\sqrt{\pi n}}P(S2n​=0)=4n(n2n​)​≈πn​1​

Decays slowly, which is why symmetric walks keep coming back.

Typical displacement
E∣S2n∣=2n(2nn)4n≈4nπ\E|S_{2n}| = \frac{2n\binom{2n}{n}}{4^{n}} \approx \sqrt{\frac{4n}{\pi}}E∣S2n​∣=4n2n(n2n​)​≈π4n​​

Distance grows like n\sqrt{n}n​, not nnn.

Parity
Sn≡n(mod2)S_n \equiv n \pmod 2Sn​≡n(mod2)

A free sanity check: after an odd number of steps you cannot be at the origin.

Pólya's recurrence theorem
recurrent in d=1,2;transient for d≥3\text{recurrent in } d = 1, 2; \quad \text{transient for } d \ge 3recurrent in d=1,2;transient for d≥3

A symmetric walk returns to its start with probability 1 on a line or a grid, but only about 34% of the time in three dimensions.

8. Coins, dice and cards — standard results

These are the numbers worth having cached, because interviewers use them as the scaffolding for harder questions rather than as the question itself.

Single fair die
E=72,Var⁡=3512\E = \tfrac{7}{2}, \qquad \Var = \tfrac{35}{12}E=27​,Var=1235​

For an mmm-sided die: E=m+12\E = \frac{m+1}{2}E=2m+1​, Var⁡=m2−112\Var = \frac{m^{2}-1}{12}Var=12m2−1​.

Sum of nnn fair dice
E=7n2,Var⁡=35n12\E = \tfrac{7n}{2}, \qquad \Var = \tfrac{35n}{12}E=27n​,Var=1235n​

Variance scales with nnn because the dice are independent; the standard deviation scales with n\sqrt{n}n​.

Two-dice sum distribution
#{2,3,…,12}=1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1  out of 36\#\{2,3,\ldots,12\} = 1,\,2,\,3,\,4,\,5,\,6,\,5,\,4,\,3,\,2,\,1 \ \text{ out of } 36#{2,3,…,12}=1,2,3,4,5,6,5,4,3,2,1  out of 36

Triangular. P(7)=16\Prob(7) = \tfrac16P(7)=61​ is the mode.

Maximum of nnn dice
P(max⁡≤k)=(km) ⁣n\Prob(\max \le k) = \left(\frac{k}{m}\right)^{\!n}P(max≤k)=(mk​)n

Then use the tail sum. For two fair d6, E[max⁡]=16136≈4.47\E[\max] = \frac{161}{36} \approx 4.47E[max]=36161​≈4.47.

Minimum of nnn dice
P(min⁡≥k)=(m−k+1m) ⁣n\Prob(\min \ge k) = \left(\frac{m-k+1}{m}\right)^{\!n}P(min≥k)=(mm−k+1​)n
Two dice compared
P(A>B)=512,P(A=B)=16\Prob(A > B) = \tfrac{5}{12}, \qquad \Prob(A = B) = \tfrac16P(A>B)=125​,P(A=B)=61​

By symmetry P(A>B)=P(B>A)=1−1/62\Prob(A>B) = \Prob(B>A) = \frac{1 - 1/6}{2}P(A>B)=P(B>A)=21−1/6​. Note that "beats" can be intransitive once the dice are non-standard — that is the Efron dice trap.

Expected distinct faces in nnn rolls
E[distinct]=m ⁣(1−(1−1m) ⁣n)\E[\text{distinct}] = m\!\left(1 - \left(1 - \tfrac{1}{m}\right)^{\!n}\right)E[distinct]=m(1−(1−m1​)n)

Linearity over one indicator per face — the indicators are dependent and it does not matter.

Exactly kkk heads in nnn flips
P=(nk)2n\Prob = \frac{\binom{n}{k}}{2^{n}}P=2n(kn​)​
Expected head–tail gap
E∣#H−#T∣ after 2n flips=2n(2nn)4n\E\big|\#H - \#T\big| \ \text{after } 2n \text{ flips} = \frac{2n\binom{2n}{n}}{4^{n}}E​#H−#T​ after 2n flips=4n2n(n2n​)​

Grows like n\sqrt{n}n​: 4 flips give 1.5, 100 flips give about 8.

Standard deck
52=13 ranks×4 suits,(525)=2,598,96052 = 13 \text{ ranks} \times 4 \text{ suits}, \qquad \binom{52}{5} = 2{,}598{,}96052=13 ranks×4 suits,(552​)=2,598,960

52!≈8.07×106752! \approx 8.07 \times 10^{67}52!≈8.07×1067 orderings.

Second card matches the first suit
1251=417≈23.5%\frac{12}{51} = \frac{4}{17} \approx 23.5\%5112​=174​≈23.5%
Expected aces in a five-card hand
5⋅452=5135 \cdot \tfrac{4}{52} = \tfrac{5}{13}5⋅524​=135​

Linearity, no hypergeometric needed.

Position of the first of kkk marked cards
E[position]=n+1k+1\E[\text{position}] = \frac{n+1}{k+1}E[position]=k+1n+1​

The kkk marked cards cut the deck into k+1k+1k+1 gaps of equal expected length. First ace in a 52-card deck: 535=10.6\frac{53}{5} = 10.6553​=10.6.

9. Five-card poker hand counts

Out of (525)=2,598,960\binom{52}{5} = 2{,}598{,}960(552​)=2,598,960 hands. Worth knowing cold: interviewers use these as a correctness check on a counting argument you just built.

Royal flush
444

0.00015%

Straight flush (including royal)
404040

0.0015%. Ten starting ranks × 4 suits.

Four of a kind
624624624

0.024%. 13×4813 \times 4813×48.

Full house
3,7443{,}7443,744

0.144%. 13⋅(43)⋅12⋅(42)13 \cdot \binom{4}{3} \cdot 12 \cdot \binom{4}{2}13⋅(34​)⋅12⋅(24​).

Flush (excluding straight flushes)
5,1085{,}1085,108

0.197%. 4(135)=5,1484\binom{13}{5} = 5{,}1484(513​)=5,148, minus the 40 straight flushes.

Straight (excluding straight flushes)
10,20010{,}20010,200

0.393%. 10⋅45=10,24010 \cdot 4^{5} = 10{,}24010⋅45=10,240, minus 40.

Three of a kind
54,91254{,}91254,912

2.113%. 13(43)(122)4213\binom{4}{3}\binom{12}{2}4^{2}13(34​)(212​)42.

Two pair
123,552123{,}552123,552

4.754%. (132)(42)2⋅44\binom{13}{2}\binom{4}{2}^{2} \cdot 44(213​)(24​)2⋅44.

One pair
1,098,2401{,}098{,}2401,098,240

42.257%. 13(42)(123)4313\binom{4}{2}\binom{12}{3}4^{3}13(24​)(312​)43.

High card
1,302,5401{,}302{,}5401,302,540

50.118%. The nine counts above sum with this to exactly (525)\binom{52}{5}(552​) — that is your check.

10. Geometric and continuous probability

Reduce the question to a ratio of lengths, areas or angles. Then look for a symmetry that lets you anchor on one point and multiply by nnn.

nnn uniform points all within some semicircle
P=n2 n−1\Prob = \frac{n}{2^{\,n-1}}P=2n−1n​

Anchor on each point in turn and ask whether the other n−1n-1n−1 fall in the semicircle clockwise from it; the nnn cases are disjoint up to a measure-zero tie. For an arc covering a fraction a≤12a \le \tfrac12a≤21​ of the circle, the same argument gives n a n−1n\,a^{\,n-1}nan−1.

Triangle from 3 uniform points contains the centre
P=14\Prob = \tfrac14P=41​

The complement of "all three in a semicircle", which is 3/22=3/43/2^{2} = 3/43/22=3/4.

Uniform point in a disk of radius RRR
P(dist≤r)=(rR) ⁣2,E[dist]=23R\Prob(\text{dist} \le r) = \left(\frac{r}{R}\right)^{\!2}, \qquad \E[\text{dist}] = \tfrac{2}{3}RP(dist≤r)=(Rr​)2,E[dist]=32​R

Uniform in area, not in radius — the density of the radius is proportional to rrr. Half the area sits outside r=R/2r = R/\sqrt{2}r=R/2​.

Bertrand's paradox (chord longer than R3R\sqrt{3}R3​)
13,12,14\tfrac13, \quad \tfrac12, \quad \tfrac1431​,21​,41​

Random endpoint pair gives 13\tfrac1331​; uniform distance from the centre along a radius gives 12\tfrac1221​; uniform midpoint in the disk gives 14\tfrac1441​. The lesson is to state the sampling rule before computing — say this out loud in an interview.

Order statistics of nnn uniforms on [0,1][0,1][0,1]
E[U(k)]=kn+1\E[U_{(k)}] = \frac{k}{n+1}E[U(k)​]=n+1k​

So E[max⁡]=nn+1\E[\max] = \frac{n}{n+1}E[max]=n+1n​ and E[min⁡]=1n+1\E[\min] = \frac{1}{n+1}E[min]=n+11​. The nnn points cut the interval into n+1n+1n+1 gaps, each with mean length 1n+1\frac{1}{n+1}n+11​.

Two uniforms on [0,1][0,1][0,1]
E∣X−Y∣=13\E|X - Y| = \tfrac13E∣X−Y∣=31​

And E[max⁡]=23\E[\max] = \tfrac23E[max]=32​, E[min⁡]=13\E[\min] = \tfrac13E[min]=31​.

Broken stick forms a triangle
P=14\Prob = \tfrac14P=41​

Two uniform cut points; the condition is that no piece exceeds 12\tfrac1221​.

Buffon's needle
P(crossing)=2Lπd(L≤d)\Prob(\text{crossing}) = \frac{2L}{\pi d} \qquad (L \le d)P(crossing)=πd2L​(L≤d)

Needle of length LLL, lines spaced ddd apart.

11. Lattice paths, grids and parity

Encode the walk as a word in its step letters. Counting the words is then pure combinatorics, and constraints become forbidden prefixes.

Monotone paths (0,0)→(m,n)(0,0) \to (m,n)(0,0)→(m,n)
(m+nn)\binom{m+n}{n}(nm+n​)
Paths through a required waypoint (a,b)(a,b)(a,b)
(a+ba)((m−a)+(n−b) m−a)\binom{a+b}{a}\binom{(m-a)+(n-b)}{\,m-a}(aa+b​)(m−a(m−a)+(n−b)​)

Multiply the two legs. For a forbidden point, subtract this from the total.

Paths never crossing the diagonal
Cn=1n+1(2nn)C_n = \frac{1}{n+1}\binom{2n}{n}Cn​=n+11​(n2n​)

Dyck paths. Derived from the reflection principle: (2nn)−(2nn+1)\binom{2n}{n} - \binom{2n}{n+1}(n2n​)−(n+12n​).

Rectangles in an m×nm \times nm×n grid of cells
(m+12)(n+12)\binom{m+1}{2}\binom{n+1}{2}(2m+1​)(2n+1​)

Choose two of the m+1m+1m+1 vertical lines and two of the n+1n+1n+1 horizontal lines.

Squares in an n×nn \times nn×n grid of cells
∑k=1n(n−k+1)2=n(n+1)(2n+1)6\sum_{k=1}^{n} (n-k+1)^{2} = \frac{n(n+1)(2n+1)}{6}∑k=1n​(n−k+1)2=6n(n+1)(2n+1)​
Parity / colouring invariants
a domino always covers one light and one dark square\text{a domino always covers one light and one dark square}a domino always covers one light and one dark square

When a tiling or reachability question smells impossible, look for a two-colouring the move preserves. Counting the colour imbalance usually finishes the proof in one line.

12. Statistics and regression essentials

Enough to hold a conversation about estimation, error bars and linear fits — the layer that separates a research interview from a puzzle interview.

Sample mean
E[Xˉ]=μ,Var⁡(Xˉ)=σ2n,SE=σn\E[\bar X] = \mu, \qquad \Var(\bar X) = \frac{\sigma^{2}}{n}, \qquad \mathrm{SE} = \frac{\sigma}{\sqrt{n}}E[Xˉ]=μ,Var(Xˉ)=nσ2​,SE=n​σ​

Four times the data halves the error bar.

Unbiased sample variance
s2=1n−1∑i=1n(xi−xˉ)2s^{2} = \frac{1}{n-1}\sum_{i=1}^{n} (x_i - \bar x)^{2}s2=n−11​∑i=1n​(xi​−xˉ)2

The n−1n-1n−1 (Bessel) corrects for having spent one degree of freedom estimating xˉ\bar xxˉ.

Central limit theorem
Xˉ−μσ/n → d  N(0,1)\frac{\bar X - \mu}{\sigma/\sqrt{n}} \ \xrightarrow{\ d\ } \ N(0,1)σ/n​Xˉ−μ​  d ​ N(0,1)

Needs finite variance. Convergence is fast for symmetric distributions and slow for heavy-tailed ones — which is the caveat interviewers are listening for.

Normal approximation to the binomial
Bin(n,p)≈N(np, np(1−p))\mathrm{Bin}(n,p) \approx N\big(np,\ np(1-p)\big)Bin(n,p)≈N(np, np(1−p))

Apply a ±0.5\pm 0.5±0.5 continuity correction. Rule of thumb: npnpnp and n(1−p)n(1-p)n(1−p) both above roughly 10.

Poisson approximation to the binomial
Bin(n,p)≈Poisson(np)\mathrm{Bin}(n,p) \approx \mathrm{Poisson}(np)Bin(n,p)≈Poisson(np)

Large nnn, small ppp. Better than the normal in the rare-event tail.

Confidence interval
xˉ±z sn\bar x \pm z\,\frac{s}{\sqrt{n}}xˉ±zn​s​

Use ttt rather than zzz for small nnn.

OLS in simple regression
β^=Cov⁡(x,y)Var⁡(x)=ρ sysx,α^=yˉ−β^xˉ\hat\beta = \frac{\Cov(x,y)}{\Var(x)} = \rho\,\frac{s_y}{s_x}, \qquad \hat\alpha = \bar y - \hat\beta \bar xβ^​=Var(x)Cov(x,y)​=ρsx​sy​​,α^=yˉ​−β^​xˉ

The fitted line always passes through (xˉ,yˉ)(\bar x, \bar y)(xˉ,yˉ​), and R2=ρ2R^{2} = \rho^{2}R2=ρ2.

Regression to the mean
E[y∣x]−yˉ=ρ sysx(x−xˉ)\E[y \mid x] - \bar y = \rho\,\frac{s_y}{s_x}(x - \bar x)E[y∣x]−yˉ​=ρsx​sy​​(x−xˉ)

With ∣ρ∣<1|\rho| < 1∣ρ∣<1, predictions are pulled toward the mean. The name of the technique comes from this effect, not the other way round.

Two-asset portfolio variance
Var⁡(aX+bY)=a2σX2+b2σY2+2abρ σXσY\Var(aX + bY) = a^{2}\sigma_X^{2} + b^{2}\sigma_Y^{2} + 2ab\rho\,\sigma_X \sigma_YVar(aX+bY)=a2σX2​+b2σY2​+2abρσX​σY​
Equally weighted portfolio, common vol and pairwise ρ\rhoρ
σp2=σ2 ⁣(1−ρn+ρ)\sigma_p^{2} = \sigma^{2}\!\left(\frac{1-\rho}{n} + \rho\right)σp2​=σ2(n1−ρ​+ρ)

As n→∞n \to \inftyn→∞ the idiosyncratic term vanishes and volatility floors at σρ\sigma\sqrt{\rho}σρ​. Diversification removes specific risk, never common risk.

13. Mental math and estimation

Timed arithmetic screens reward recall and decomposition, not cleverness. The table below is the recall half; everything under it is the decomposition half.

Reciprocals to memorise
12=.513=.33314=.2515=.216=.166717=.142918=.12519=.1111111=.0909112=.0833113=.0769114=.0714115=.0667116=.0625117=.0588118=.0556119=.0526120=.05125=.04132=.03125\begin{array}{llll} \tfrac12 = .5 & \tfrac13 = .333 & \tfrac14 = .25 & \tfrac15 = .2 \\[2pt] \tfrac16 = .1667 & \tfrac17 = .1429 & \tfrac18 = .125 & \tfrac19 = .1111 \\[2pt] \tfrac{1}{11} = .0909 & \tfrac{1}{12} = .0833 & \tfrac{1}{13} = .0769 & \tfrac{1}{14} = .0714 \\[2pt] \tfrac{1}{15} = .0667 & \tfrac{1}{16} = .0625 & \tfrac{1}{17} = .0588 & \tfrac{1}{18} = .0556 \\[2pt] \tfrac{1}{19} = .0526 & \tfrac{1}{20} = .05 & \tfrac{1}{25} = .04 & \tfrac{1}{32} = .03125 \end{array}21​=.561​=.1667111​=.0909151​=.0667191​=.0526​31​=.33371​=.1429121​=.0833161​=.0625201​=.05​41​=.2581​=.125131​=.0769171​=.0588251​=.04​51​=.291​=.1111141​=.0714181​=.0556321​=.03125​

1/7=0.142857‾1/7 = 0.\overline{142857}1/7=0.142857 cycles, and every multiple of 1/71/71/7 is a rotation of the same six digits.

Percent swap
x% of y  =  y% of xx\% \text{ of } y \;=\; y\% \text{ of } xx% of y=y% of x

16% of 25 is the same as 25% of 16, which is 4.

Difference of squares
a⋅b=(a+b2) ⁣2−(a−b2) ⁣2a \cdot b = \left(\frac{a+b}{2}\right)^{\!2} - \left(\frac{a-b}{2}\right)^{\!2}a⋅b=(2a+b​)2−(2a−b​)2

47×53=502−32=249147 \times 53 = 50^{2} - 3^{2} = 249147×53=502−32=2491. The workhorse for any pair straddling a round number.

Squares ending in 5
(10a+5)2=100 a(a+1)+25(10a+5)^{2} = 100\,a(a+1) + 25(10a+5)2=100a(a+1)+25

852=100⋅8⋅9+25=722585^{2} = 100 \cdot 8 \cdot 9 + 25 = 7225852=100⋅8⋅9+25=7225.

Products near a base BBB
(B+x)(B+y)=B (B+x+y)+xy(B+x)(B+y) = B\,(B + x + y) + xy(B+x)(B+y)=B(B+x+y)+xy

103×108=100⋅111+24=11,124103 \times 108 = 100 \cdot 111 + 24 = 11{,}124103×108=100⋅111+24=11,124.

Multiply by 11
ab‾×11=a∣a+b∣b(carrying)\overline{ab} \times 11 = a \mid a+b \mid b \quad (\text{carrying})ab×11=a∣a+b∣b(carrying)

47×11=4 ∣ 11 ∣ 7=51747 \times 11 = 4\,|\,11\,|\,7 = 51747×11=4∣11∣7=517.

Divide by 5, 25, 125
÷5=×210,÷25=×4100,÷125=×81000\div 5 = \times \tfrac{2}{10}, \qquad \div 25 = \times \tfrac{4}{100}, \qquad \div 125 = \times \tfrac{8}{1000}÷5=×102​,÷25=×1004​,÷125=×10008​
Square roots
2≈1.414,  3≈1.732,  5≈2.236,  7≈2.646,  10≈3.162\sqrt2 \approx 1.414, \ \ \sqrt3 \approx 1.732, \ \ \sqrt5 \approx 2.236, \ \ \sqrt7 \approx 2.646, \ \ \sqrt{10} \approx 3.1622​≈1.414,  3​≈1.732,  5​≈2.236,  7​≈2.646,  10​≈3.162
One Newton step for a root
N≈x+N−x22x\sqrt{N} \approx x + \frac{N - x^{2}}{2x}N​≈x+2xN−x2​

From x=7x=7x=7, 50≈7+114=7.071\sqrt{50} \approx 7 + \tfrac{1}{14} = 7.07150​≈7+141​=7.071 — correct to four decimals in one step.

Small-change binomial
(1+x)n≈1+nx(1+x)^{n} \approx 1 + nx(1+x)n≈1+nx

Good while ∣nx∣|nx|∣nx∣ stays well below 1. Add (n2)x2\binom{n}{2}x^{2}(2n​)x2 for a second digit.

Compounding
(1+r)n≈e nr,ndouble≈72100r(1+r)^{n} \approx e^{\,nr}, \qquad n_{\text{double}} \approx \frac{72}{100r}(1+r)n≈enr,ndouble​≈100r72​

The rule of 72: 6% a year doubles in about 12 years.

Percent composition
(1+a)(1+b)=1+a+b+ab(1+a)(1+b) = 1 + a + b + ab(1+a)(1+b)=1+a+b+ab

A 10% loss then a 10% gain is −1%-1\%−1%, not flat. The cross term is where money goes.

Logs
ln⁡2≈0.693,  ln⁡10≈2.303,  log⁡102≈0.301,  log⁡103≈0.477,  log⁡107≈0.845\ln 2 \approx 0.693, \ \ \ln 10 \approx 2.303, \ \ \log_{10} 2 \approx 0.301, \ \ \log_{10} 3 \approx 0.477, \ \ \log_{10} 7 \approx 0.845ln2≈0.693,  ln10≈2.303,  log10​2≈0.301,  log10​3≈0.477,  log10​7≈0.845
Powers of two
210=1024≈1032^{10} = 1024 \approx 10^{3}210=1024≈103

So 220≈1062^{20} \approx 10^{6}220≈106 and 230≈1092^{30} \approx 10^{9}230≈109 — the fastest way to size anything exponential.

Constants
e≈2.718,π≈3.1416,π2≈9.87,γ≈0.577e \approx 2.718, \quad \pi \approx 3.1416, \quad \pi^{2} \approx 9.87, \quad \gamma \approx 0.577e≈2.718,π≈3.1416,π2≈9.87,γ≈0.577
Fermi anchors
8×109 people,3.4×108 in the US,π×107 seconds per year8 \times 10^{9} \ \text{people}, \quad 3.4 \times 10^{8} \ \text{in the US}, \quad \pi \times 10^{7} \ \text{seconds per year}8×109 people,3.4×108 in the US,π×107 seconds per year

Also: 1 mile ≈ 1.61 km, a year ≈ 2,000 working hours, and a typical rich-country household is 2–3 people. Estimate in orders of magnitude, state your assumptions, and quote a range.

14. Market making and betting basics

Making a market means committing to buy at your bid and sell at your ask. Everything below follows from taking that commitment seriously.

Fair value
fair=E[payoff∣your information]\text{fair} = \E[\text{payoff} \mid \text{your information}]fair=E[payoff∣your information]

Compute this first and say it out loud before quoting anything.

A two-sided quote
bid=fair−s2,ask=fair+s2\text{bid} = \text{fair} - \tfrac{s}{2}, \qquad \text{ask} = \text{fair} + \tfrac{s}{2}bid=fair−2s​,ask=fair+2s​

You must be happy to trade on either side. If you would not, your fair is wrong or your spread is too tight.

Edge on a trade
edge=∣fair−price∣−fees\text{edge} = |\text{fair} - \text{price}| - \text{fees}edge=∣fair−price∣−fees
EV of a quote that gets hit
E[PnL∣lifted at ask]=ask−E[value∣lifted at ask]\E[\text{PnL} \mid \text{lifted at ask}] = \text{ask} - \E[\text{value} \mid \text{lifted at ask}]E[PnL∣lifted at ask]=ask−E[value∣lifted at ask]

The conditioning is the whole point. If a counterparty only lifts you when they know something, then E[value∣lifted]>fair\E[\text{value} \mid \text{lifted}] > \text{fair}E[value∣lifted]>fair and the naive ask−fair\text{ask} - \text{fair}ask−fair overstates your edge.

What the spread is paying for
s≈2(valuation uncertainty+adverse selection+inventory+fees)s \approx 2\big(\text{valuation uncertainty} + \text{adverse selection} + \text{inventory} + \text{fees}\big)s≈2(valuation uncertainty+adverse selection+inventory+fees)

Widen for high payoff variance, informed counterparties, large size, thin markets, and inventory you already do not want. Tighten to win flow when you are confident and flat.

Adverse selection
E[value∣you were filled]≠E[value]\E[\text{value} \mid \text{you were filled}] \ne \E[\text{value}]E[value∣you were filled]=E[value]

Getting filled is itself information. The trades you win are disproportionately the ones you should have lost.

Inventory skew
long ⟹ lower both bid and ask\text{long} \ \Longrightarrow\ \text{lower both bid and ask}long ⟹ lower both bid and ask

Move the midpoint against your position so you are more likely to trade out than in. Skewing is a different lever from widening; use the right one.

Implied probability from a binary price
p≈pricemax payoffp \approx \frac{\text{price}}{\text{max payoff}}p≈max payoffprice​
Decimal odds and the vig
p=1decimal odds,pino-vig=qi∑jqjp = \frac{1}{\text{decimal odds}}, \qquad p_i^{\text{no-vig}} = \frac{q_i}{\sum_j q_j}p=decimal odds1​,pino-vig​=∑j​qj​qi​​

Raw implied probabilities sum above 1; the excess is the bookmaker margin. Normalise before comparing to your own estimate.

Break-even probability
p∗=11+bp^{*} = \frac{1}{1 + b}p∗=1+b1​

At net odds bbb to 1. Even money needs 50%, 2-to-1 needs 33.3%.

Kelly criterion
f∗=bp−qb=edgeoddsf^{*} = \frac{bp - q}{b} = \frac{\text{edge}}{\text{odds}}f∗=bbp−q​=oddsedge​

Net odds bbb, win probability ppp, q=1−pq = 1-pq=1−p. For an even-money bet this is 2p−12p-12p−1. Kelly maximises long-run log growth, not expected wealth, and it is brutally sensitive to a mis-estimated ppp — which is why practitioners size at a half or a quarter of it.

Volatility drag
g≈μ−σ22g \approx \mu - \frac{\sigma^{2}}{2}g≈μ−2σ2​

Geometric growth sits below the arithmetic mean. A +50%+50\%+50% / −33.3%-33.3\%−33.3% pair averages +8.3%+8.3\%+8.3% arithmetically and exactly 0%0\%0% compounded. Repeated betting is a log-growth problem, not an expected-value problem.

Fair price of a game
price=E[payoff]\text{price} = \E[\text{payoff}]price=E[payoff]

Then adjust for risk: a fair-EV bet with ruinous variance is still a bad bet if you cannot survive the left tail.

15. Interview attack patterns

Recognition beats recall. These are the cues that tell you which method to reach for before you have finished reading the question.

"At least one", "some", "any", "collision"

Take the complement. Count the clean failure case and subtract from 1.

"Expected number of ..."

One indicator per thing that could be counted, then linearity. Dependence between the indicators does not matter.

"Expected time until ..."

First-step analysis. Choose states by asking what progress survives a failure.

"Expected value of the maximum / minimum"

Work with the CDF, then the tail sum E[X]=∑k≥1P(X≥k)\E[X] = \sum_{k\ge1}\Prob(X \ge k)E[X]=∑k≥1​P(X≥k). Never build the full pmf.

Draws described as with or without replacement

With replacement is binomial; without is hypergeometric. Deciding this first fixes most of the problem.

A partially matched pattern that can be lost

Markov states indexed by the length of the currently matching prefix. Overlapping patterns wait longer.

Wealth, lives, or a count with two barriers

Gambler's ruin. Identify iii, NNN, and ppp, then quote the ratio.

Roles in the setup that are interchangeable

Use symmetry before algebra. If two outcomes are exchangeable they are equally likely, full stop.

"Is this bet fair?"

Compute the EV. Then, unprompted, comment on variance and on whether you could survive a losing run.

A diagnostic test, a signal, or a base rate

Natural frequencies out of 10,000, or Bayes in odds form. Avoid the fraction form under pressure.

A continuous or geometric setting

Reduce to a ratio of lengths, areas or angles, and state your sampling rule explicitly.

"Make me a market on ..."

State your fair value, then your spread, then defend both. Expect to be traded against and to be asked why you did not go wider.

A number you genuinely cannot compute

Bound it above and below, then narrow. An interviewer would rather see a defended range than a confident wrong point estimate.

Counting where you are unsure of the formula

Decide whether order matters and whether repeats are allowed. The formula follows from those two answers.

A game repeated many times

Switch from expected value to log growth. Positive EV with full-bankroll sizing still goes to zero.

You are stuck

Shrink the problem. Solve n=1,2,3n = 1, 2, 3n=1,2,3 by hand, find the pattern, then generalise — and narrate it, because the process is what is being graded.

How to use this sheet

Read it once end to end so you know what is on it, then stop reading it. A cheat sheet is a lookup table for a memory you are actively building, not a substitute for building one. The value is in noticing, mid problem, that you already have the tool.

Print it or save it as a PDF — the layout is built for it, and the navigation drops out. Keep it beside your practice, and every time you reach for a line on it, note which one. The lines you keep reaching for are your actual study list.

Where to go from here

Knowing the formulas is the easy half. If you want to find out which of these you can actually apply under time pressure, the LeetQuidity Quant Readiness Test is free and tells you which topics to work on first. If you would rather be taught the reasoning behind this sheet — the derivations that produce each line, with worked examples and practice — that is what the curriculum is for.

Take the free readiness testView the curriculum

Keep going

The full quant interview prep resource listBest quant interview prep platforms in 2026: an honest comparisonQuant Interview Probability Cheat SheetQuant Interview Formula SheetQuant Interview Probability RoadmapQuant Interview Mental Math RoadmapQuant Interview Prep Resources: Best Free and Paid OptionsBest Quant Interview Prep Platforms in 2026: An Honest Comparison

Found an error? These are standard results, but transcription slips happen — tell us and we will fix it and update the date at the top. This page is free to use, print, and link to.

LeetQuidity

The complete quant interview course.

InstitutionsCurriculumPricingFAQCalibrationDemoGuides
TwitterLinkedIn

© 2026 LeetQuidity — a W Interior company. All rights reserved.

Privacy PolicyTerms of Service