SigmaField
Mathematical Foundations for Quant Finance
0 of 256 lessons
      1. 5.7.1 The Markov, Chebyshev and Jensen inequalitiesConcept · 35 min
      2. 5.7.2 The law of large numbersConcept · 30 min
      3. 5.7.3 The central limit theoremConcept · 35 min
      4. 5.7.4 Practice set: inequalities and limit theoremsPractice set · 25 min
      5. 5.7.5 Case study: the error of a Monte Carlo priceCase study · 35 min

Level 5, Probability and statistics 5.7 Inequalities and limit theorems Lesson 1 of 5

ConceptLesson 5.7.1 in Level 5, Probability and statistics. About 35 minutes.

The Markov, Chebyshev and Jensen inequalities

A guarantee from the mean alone

Often you know a mean, or a mean and a variance, but not the whole distribution. An inequality turns those numbers into a bound: a probability that cannot be exceeded, whatever the distribution. It is a guarantee, not an estimate.

Waits in a queue are never negative and average 2 minutes. Could half of all customers wait 10 minutes or more? No: those customers alone would push the mean to at least 0.5×10=50.5 \times 10 = 5 minutes.

At most a fifth can wait that long, since 0.2×10=20.2 \times 10 = 2 already uses up the whole mean. This argument is Markov's inequality.

Markov's inequality

Rule: Markov's inequality

X≥0, a>0:P(X≥a)≤E[X]a\begin{gathered} X \ge 0,\ a > 0: \\[4pt] P(X \ge a) \le \frac{\mathbb{E}[X]}{a} \end{gathered}

A variable that is never negative lands at aa or above with probability at most its mean divided by aa. The values at aa or above contribute at least a⋅P(X≥a)a \cdot P(X \ge a) to the mean, and no value pulls the mean down, because none is negative.

A fair die. XX is the number shown, with mean 3.5 (lesson 5.3.1). The bound 3.5a\frac{3.5}{a} against the truth:

aa123456
P(X≥a)P(X \ge a)156\frac{5}{6}23\frac{2}{3}12\frac{1}{2}13\frac{1}{3}16\frac{1}{6}
bound 3.5a\frac{3.5}{a}3.51.751.16670.8750.70.5833

The bound always holds, but loosely: at a=6a = 6 it allows 0.5833 where the truth is 16\frac{1}{6}. Up to a=3a = 3 it is above 1 and says nothing at all.

An exponential wait. With mean 1 (lesson 5.4.2), P(X≥a)=e−aP(X \ge a) = e^{-a}. At a=3a = 3 that is 0.0498, against the bound 13≈0.3333\frac{1}{3} \approx 0.3333; at a=5a = 5 it is 0.0067 against 0.2.

Three cases complete the picture.

  • The bound can be reached. Let XX be 0 with probability 0.8 and 10 with probability 0.2. Its mean is 2, and P(X≥10)=0.2=210P(X \ge 10) = 0.2 = \frac{2}{10} exactly. So no better bound can come from the mean alone.
  • For a≤E[X]a \le \mathbb{E}[X] it says nothing. The bound is then 1 or more, and every probability is at most 1 anyway.
  • Negative values break it. Let XX be −10-10 or 1010 with equal chances. Its mean is 0, so the "bound" would say P(X≥10)≤0P(X \ge 10) \le 0, yet that probability is 12\frac{1}{2}. The negative values cancel the large ones in the mean.

Try it

The loop prints the die's table: the exact probability as a fraction, then the bound. The second loop compares e−ae^{-a} with 1a\frac{1}{a}.

Then 100,000 seeded exponential draws. In this run their mean is 0.9951, and the shares at or above 2, 3 and 5 are close to e−ae^{-a}, far below the bound.

⌘/Ctrl + Enter runs the cell

Chebyshev's inequality

Markov's inequality uses only the mean. Add the variance and you can bound how far XX strays on either side.

The squared distance (X−μ)2(X - \mu)^2 is never negative, and its mean is the variance σ2\sigma^2 (lesson 5.3.2). Markov's inequality applied to it, with a=ε2a = \varepsilon^2, gives the rule below. Here μ\mu is the mean, σ\sigma the standard deviation and ε\varepsilon (epsilon) any positive distance.

Rule: Chebyshev's inequality

P(∣X−μ∣≥ε)≤σ2ε2P(∣X−μ∣≥kσ)≤1k2\begin{gathered} P(|X - \mu| \ge \varepsilon) \le \frac{\sigma^2}{\varepsilon^2} \\[4pt] P(|X - \mu| \ge k\sigma) \le \frac{1}{k^2} \end{gathered}

For any distribution with a finite variance. The second form counts the distance in standard deviations. At most 1k2\frac{1}{k^2} of the probability lies kk or more of them from the mean, both sides together.

So at least 1−14=75%1 - \frac{1}{4} = 75\% of any distribution lies within 2 standard deviations of its mean, and at least 89≈88.89%\frac{8}{9} \approx 88.89\% within 3. For the normal the shares are 95.45% and 99.73% (lesson 5.4.3): the guarantee is weaker because it must hold for every distribution.

The die again. μ=3.5\mu = 3.5 and σ=35/12≈1.7078\sigma = \sqrt{35/12} \approx 1.7078. The faces 1 and 6 lie 2.5 from the mean, which is k≈1.4639k \approx 1.4639 standard deviations.

So P(∣X−3.5∣≥2.5)=26=13P(|X - 3.5| \ge 2.5) = \frac{2}{6} = \frac{1}{3}, and Chebyshev allows 35/122.52≈0.4667\frac{35/12}{2.5^2} \approx 0.4667.

Three distributions at once. The two-sided tail P(∣X−μ∣≥kσ)P(|X - \mu| \ge k\sigma) for a normal, a uniform and an exponential with mean 1, against the bound:

kk1.523
normal0.13360.04550.0027
uniform0.134000
exponential0.08210.04980.0183
bound 1k2\frac{1}{k^2}0.44440.250.1111

A uniform never strays more than 3≈1.73\sqrt{3} \approx 1.73 standard deviations from its mean, so its tail is 0 from k=2k = 2 on. The exponential's long right tail keeps it above the normal far out.

The cases to know:

  • k≤1k \le 1 says nothing. The bound is then at least 1.
  • The bound can be reached. Let XX be −1-1, 0 or 1 with probabilities 18\frac{1}{8}, 34\frac{3}{4}, 18\frac{1}{8}. Then μ=0\mu = 0 and σ=12\sigma = \frac{1}{2}, and P(∣X∣≥1)=14P(|X| \ge 1) = \frac{1}{4}: exactly 1k2\frac{1}{k^2} with k=2k = 2.
  • It needs a finite variance. A Student t with ν≤2\nu \le 2 degrees of freedom has none (lesson 5.4.4), and Chebyshev's inequality says nothing about it.

Both bounds hold for every distribution with the given mean or variance, so for most they are loose. Each can be reached, but only by a distribution built for it.

Try it

The first line is the die: σ\sigma, the bound for a distance of 2.5, and that distance in standard deviations. The loop prints the table above.

Then the three-point example, which reaches the bound. Last, 100,000 seeded standard normal draws: their shares beyond 1.5, 2 and 3 are close to the normal row.

⌘/Ctrl + Enter runs the cell

Chebyshev's inequality is loose, but it holds without knowing the shape of the distribution. Lesson 5.7.2 uses it to show that averages settle on the mean.

Jensen's inequality

Lesson 5.3.1 found that for a die the mean of the squares, E[X2]≈15.17\mathbb{E}[X^2] \approx 15.17, is above the square of the mean, 3.52=12.253.5^2 = 12.25. It also found E[1X]≈0.4083\mathbb{E}\left[\frac{1}{X}\right] \approx 0.4083, above 1E[X]≈0.2857\frac{1}{\mathbb{E}[X]} \approx 0.2857. Both curves, x2x^2 and 1x\frac{1}{x} for x>0x > 0, bend up.

Rule: Jensen's inequality

g convex: E[g(X)]≥g(E[X])g concave: E[g(X)]≤g(E[X])\begin{gathered} g \text{ convex: } \mathbb{E}[g(X)] \ge g(\mathbb{E}[X]) \\[4pt] g \text{ concave: } \mathbb{E}[g(X)] \le g(\mathbb{E}[X]) \end{gathered}

The curve must be convex (concave up, g′′≥0g'' \ge 0) or concave (g′′≤0g'' \le 0) over all the values XX can take (lesson 2.4.2). For a straight line, g(x)=ax+bg(x) = ax + b, the two sides are equal (lesson 5.3.2).

Each face puts a point (x,g(x))(x, g(x)) on the curve with weight 16\frac{1}{6}; their balance point is (E[X],E[g(X)])(\mathbb{E}[X], \mathbb{E}[g(X)]). For a curve that bends up it sits above the curve, and for one that bends down, below.

Four examples, two of each kind:

  • x2x^2, convex. 15.1667≥12.2515.1667 \ge 12.25. The gap is exactly the variance, 3512≈2.9167\frac{35}{12} \approx 2.9167: for g(x)=x2g(x) = x^2, Jensen's inequality says a variance is never negative.
  • 1x\frac{1}{x}, convex for x>0x > 0. 0.4083≥0.28570.4083 \ge 0.2857.
  • ln⁡x\ln x, concave. E[ln⁡X]≈1.0965\mathbb{E}[\ln X] \approx 1.0965, below ln⁡3.5≈1.2528\ln 3.5 \approx 1.2528. The same holds for x\sqrt{x}: 1.8053 against 1.8708.
  • exe^x, convex. Case study 5.6.5 took Y=vZY = vZ with ZZ standard normal and v≈0.141421v \approx 0.141421. Then E[eY]=ev2/2≈1.01005\mathbb{E}[e^{Y}] = e^{v^2/2} \approx 1.01005, above eE[Y]=e0=1e^{\mathbb{E}[Y]} = e^0 = 1. That excess is why its model subtracts σ22\frac{\sigma^2}{2} in the exponent.

Where the rule says less, or nothing:

  • Equality holds when XX is a constant or gg is a straight line over the values of XX.
  • Convex over every value. If XX is −1-1 or 1 with equal chances, 1x\frac{1}{x} is not convex across 0. Then E[1X]=0\mathbb{E}\left[\frac{1}{X}\right] = 0, while 1E[X]=10\frac{1}{\mathbb{E}[X]} = \frac{1}{0} does not exist.
  • A curve that bends both ways, such as x3x^3, can give either order. With XX equal to 0 or 2, E[X3]=4≥13\mathbb{E}[X^3] = 4 \ge 1^3; with XX equal to −2-2 or 0, E[X3]=−4≤(−1)3\mathbb{E}[X^3] = -4 \le (-1)^3.

Try it

For the die, each line prints E[g(X)]\mathbb{E}[g(X)] then g(3.5)g(3.5): two convex curves, then two concave ones.

The last line is case study 5.6.5's evZe^{vZ}: the exact mean ev2/2e^{v^2/2}, then the average of a million seeded draws, 1.0101 in this run.

⌘/Ctrl + Enter runs the cell

How big the gap is

For a small spread the gap is about half the curvature times the variance:

E[g(X)]−g(μ)≈12 g′′(μ)Var⁡(X)\mathbb{E}[g(X)] - g(\mu) \approx \tfrac{1}{2}\,g''(\mu)\operatorname{Var}(X)

This is the quadratic term of the Taylor polynomial about μ\mu (lesson 2.7.1), averaged. For x2x^2 it is exact: 12⋅2⋅σ2=σ2\frac{1}{2} \cdot 2 \cdot \sigma^2 = \sigma^2. For evZe^{vZ} it gives v22=0.01\frac{v^2}{2} = 0.01, against the exact 0.01005.

For the die the spread is too wide for the estimate to be close. The sign of g′′g'' still tells you the direction.

Risk aversion

Case study 2.4.5 valued wealth ww with the concave utility u(w)=ln⁡wu(w) = \ln w. A fair flip of $20,000 on $100,000 gave an expected utility of 11.4925, below ln⁡100,000≈11.5129\ln 100{,}000 \approx 11.5129.

Jensen's inequality says this happens for every gamble, not only that flip. For any concave uu and any random wealth WW, E[u(W)]≤u(E[W])\mathbb{E}[u(W)] \le u(\mathbb{E}[W]).

So the certainty equivalent, the sure wealth with the same utility, is never above the expected wealth, and the risk premium is never negative. A convex utility reverses this: that person is risk seeking, as in case study 2.4.5's u(w)=w2u(w) = w^2.

Take wealth of $50,000, $100,000 or $200,000 with probabilities 0.25, 0.5 and 0.25. The expected wealth is $112,500, but with log utility the certainty equivalent is exactly $100,000. This person would give up $12,500 to avoid the risk.

Try it

The first two lines check the gap estimate: for evZe^{vZ}, then for case study 2.4.5's flip, where g′′=−1w2g'' = -\frac{1}{w^2} and the variance is s2s^2. The estimate −0.02-0.02 is close to the exact −0.0204-0.0204.

The last line is the three-outcome gamble: expected wealth, certainty equivalent and risk premium.

⌘/Ctrl + Enter runs the cell

Common mistakes

  1. Markov's inequality needs X≥0X \ge 0. For −10-10 or 1010 with equal chances it would claim P(X≥10)≤0P(X \ge 10) \le 0.
  2. A bound is not an estimate. For a die, Markov allows P(X≥6)≤0.5833P(X \ge 6) \le 0.5833; the truth is 16\frac{1}{6}.
  3. Chebyshev's bound covers both sides together, and needs k>1k > 1 to say anything.
  4. Keep the two forms apart. σ2ε2\frac{\sigma^2}{\varepsilon^2} uses the variance and a distance in the units of XX; 1k2\frac{1}{k^2} counts standard deviations. With σ=2\sigma = 2 and ε=4\varepsilon = 4, both give 14\frac{1}{4}.
  5. Jensen's direction. Convex means the mean of gg is the larger side. Check with x2x^2: E[X2]≥(E[X])2\mathbb{E}[X^2] \ge (\mathbb{E}[X])^2.
  6. The curve must bend one way over every value of XX. 1x\frac{1}{x} is convex only for x>0x > 0.

Markov, Chebyshev and Jensen

0 of 13 correct

  1. 1.
  2. 2.
  3. 3.
  4. 4.
  5. 5.
  6. 6.
  7. 7.
  8. 8.
  9. 9.
  10. 10.
  11. 11.
  12. 12.
  13. 13.
How to type answers
  • Powers with ^: x^7, 2^(1/3), a^-2.
  • Multiply with * or by writing side by side: 3x^2, 2(x+1).
  • ln(x) is the natural log, log(x, 2) is log base 2, e is Euler's number, sqrt(x) is a square root.
  • sin(x), cos(x) and tan(x) take radians; write pi for π and sin(x)^2 for sin²x.
  • Your first answer to each question is saved: it counts towards your score and brings the question back for review.
  • Exact answers like ln(20)/ln(3) are best. Decimals need about 4 significant figures.

Summary card

  • Markov: for X≥0X \ge 0 and a>0a > 0, P(X≥a)≤E[X]aP(X \ge a) \le \frac{\mathbb{E}[X]}{a}. It fails for variables that can be negative.
  • Chebyshev: P(∣X−μ∣≥kσ)≤1k2P(|X - \mu| \ge k\sigma) \le \frac{1}{k^2}, or σ2ε2\frac{\sigma^2}{\varepsilon^2} for a distance ε\varepsilon. At least 75% lies within 2σ2\sigma and 89\frac{8}{9} within 3σ3\sigma, for any distribution with a finite variance.
  • Both are guarantees, loose for most distributions and reached by a few built for them.
  • Jensen: E[g(X)]≥g(E[X])\mathbb{E}[g(X)] \ge g(\mathbb{E}[X]) for convex gg, ≤\le for concave gg, == for a straight line. The gap is about 12g′′(μ)Var⁡(X)\frac{1}{2}g''(\mu)\operatorname{Var}(X) for small spreads.
  • A concave utility gives E[u(W)]≤u(E[W])\mathbb{E}[u(W)] \le u(\mathbb{E}[W]) for every gamble: the certainty equivalent is at most the expected wealth.

Free further reading

Optional. This lesson covers what you need; these add more examples and practice. All are free to read.