Jensen's Inequality (Convex)
Statement
Let be convex. For points and non-negative weights summing to 1:
Mathlib states this as ConvexOn.map_sum_le (in Mathlib.Analysis.Convex.Jensen): if hf : ConvexOn 𝕜 s f, weights are non-negative summing to 1, and points lie in , then the Jensen inequality holds.
Visualization
Take (convex) and the distribution with equal weights .
Weighted average:
Jensen LHS:
Jensen RHS:
| 1 | 1/3 | 1 | 1/3 |
| 2 | 1/3 | 4 | 4/3 |
| 3 | 1/3 | 9 | 3 |
| sum | 1 | — | 14/3 |
✓
The gap reflects the variance: for , Jensen's gap equals the variance .
Proof Sketch
- Base case : trivial, .
- Inductive step: write .
- Apply convexity once: where .
- Apply inductive hypothesis to .
- Mathlib's
ConvexOn.map_sum_lepackages this induction.
Connections
- Convex FunctionConvex FunctionA function is convex when the chord between any two points lies above the graphRead more → — Jensen's inequality is the multi-point extension of the defining two-point convexity inequality
- AM–GM InequalityAM–GM InequalityThe arithmetic mean is always at least as large as the geometric meanRead more → — AM–GM is a special case of Jensen with (concave), reversed inequality
- Cauchy–Schwarz InequalityCauchy–Schwarz InequalityThe inner product of two vectors is bounded by the product of their normsRead more → — Cauchy–Schwarz follows from Jensen applied to via the Cauchy–Schwarz trick
- Markov's InequalityMarkov's InequalityA non-negative random variable rarely exceeds a multiple of its expectationRead more → — Markov's inequality pairs with Jensen in the toolkit of moment-based bounds
Lean4 Proof
import Mathlib.Analysis.Convex.Jensen
import Mathlib.Analysis.Convex.Mul
/-- Jensen's inequality for x² with three equal weights 1/3 on {1, 2, 3}.
f(mean) ≤ mean of f: 4 ≤ 14/3. -/
theorem jensen_sq_example :
((1 : ℝ) + 2 + 3) / 3 ^ 2 ≤
((1 : ℝ) ^ 2 + 2 ^ 2 + 3 ^ 2) / 3 := by
norm_numReferenced by
- Convex FunctionOptimization