Jensen's
Inequality
Understand how convexity governs the relationship between the expectation of a function and the function of an expectation: a cornerstone of probability, optimization, and information theory.
What Is a Convex Function?
A function \(\varphi\) is convex on an interval if, for every pair of points \(x_1, x_2\) and every \(\lambda \in [0,1]\):
The Chord Above the Curve
Concave Functions: The Mirror
A function \(\varphi\) is concave if \(-\varphi\) is convex. Equivalently, \(\varphi''(x) \leq 0\), and the chord lies below the curve. Jensen's inequality reverses for concave functions:
The Formal Statement
Let \(X\) be a random variable with \(E[|X|] < \infty\), and let \(\varphi\) be a convex function such that \(E[|\varphi(X)|] < \infty\). Then:
Proof Sketch: Supporting Line
The Finite (Discrete) Form
For weights \(\lambda_1, \ldots, \lambda_n \geq 0\) with \(\sum \lambda_i = 1\) and a convex \(\varphi\):
Convex vs Concave: Direction Matters
| Convex \(\varphi\) | Concave \(\varphi\) | |
|---|---|---|
| Second derivative | \(\varphi'' \geq 0\) | \(\varphi'' \leq 0\) |
| Chord vs curve | Chord above | Chord below |
| Jensen's direction | \(\varphi(E[X]) \leq E[\varphi(X)]\) | \(\varphi(E[X]) \geq E[\varphi(X)]\) |
| Typical examples | \(x^2,\; e^x,\; -\ln x\) | \(\ln x,\; \sqrt{x}\) |
| Equality condition | \(X\) is constant a.s. or \(\varphi\) is affine on \(\mathrm{supp}(X)\) | |
Why Jensen's Inequality Matters
How to Apply Jensen's Inequality
Example 1: \(E[X^2] \geq (E[X])^2\)
Let \(\varphi(x) = x^2\). Since \(\varphi''(x) = 2 > 0\), the function is convex. Applying Jensen's inequality directly:
Example 2: AM-GM Inequality
Let \(\varphi(x) = -\ln x\), which is convex for \(x > 0\) (since \(\varphi''(x) = 1/x^2 > 0\)). Let \(X\) take values \(a_1, \ldots, a_n > 0\) each with probability \(1/n\).
Example 3: KL Divergence \(\geq 0\)
Let \(P\) and \(Q\) be distributions on the same space. Define \(\varphi(t) = -\ln t\) (convex). Let \(X = Q(x)/P(x)\) under \(P\):
Example 4: Power Mean Inequality
For \(1 \leq p < q\), we can show \(M_p \leq M_q\) where \(M_r = \left(\frac{1}{n}\sum a_i^r\right)^{1/r}\). The key step uses Jensen with \(\varphi(x) = x^{q/p}\), which is convex for \(q/p \geq 1\):
Common Mistakes
Summary of Key Applications
| Application | \(\varphi(x)\) | Result |
|---|---|---|
| \(\mathrm{Var}(X) \geq 0\) | \(x^2\) (convex) | \(E[X^2] \geq (E[X])^2\) |
| AM-GM | \(-\ln x\) (convex) | \(\text{AM} \geq \text{GM}\) |
| \(D_{KL} \geq 0\) | \(-\ln x\) (convex) | Gibbs' inequality |
| Power means | \(x^{q/p}\) (convex) | \(M_p \leq M_q\) |
| EM algorithm | \(\ln x\) (concave) | \(\text{ELBO} \leq \log\text{-likelihood}\) |
Question 1 of 5
If \(\varphi\) is a convex function and \(X\) is a non-constant random variable, which statement is true?
Question 2 of 5
Let \(X > 0\) be a non-constant random variable. By Jensen's inequality applied to \(\varphi(x) = \ln x\), which holds?
Question 3 of 5
Which classical inequality is a direct consequence of Jensen's inequality with \(\varphi(x) = -\ln x\)?
Question 4 of 5
Equality holds in Jensen's inequality (\(\varphi(E[X]) = E[\varphi(X)]\)) if and only if:
Question 5 of 5
In the EM algorithm, Jensen's inequality is applied to \(\varphi(x) = \ln x\) to construct a lower bound (ELBO). Why is the inequality in the correct direction for maximization?