f = x², values 1, 3
f(mean) = 4, mean of f = 5
4 ≤ 5.
For a convex function and weights with : . For concave functions the inequality reverses.
This page is easier if you are comfortable with:
For , with equal weights: ; the gap 1 is the variance of the values (variance). For with : . For on positive numbers : . Convexity is explained in convex functions and concavity and inflection.
In probability it reads : since is convex, , which is the statement that variance is non-negative (expectation and variance). Applied to the concave logarithm it proves the AM–GM inequality, and it underlies the non-negativity of the KL divergence (KL divergence).
It also bounds financial and physical averages (the average of a convex payoff is at least the payoff at the average) and gives Bernoulli's inequality for . Equality holds only when all are equal (for strictly convex ).
For a convex function the value at the average is below the average of the values.
The chord lies above the curve, so f(mean) ≤ mean of f.
These examples are worked by hand, step by step, so you can compare your own working.
Compare with the average of and .
Compare with the average of and .
Compare with the average of .
A few situations come up again and again. Knowing them saves time and helps you spot answers that cannot be right.
f(mean) = 4, mean of f = 5
4 ≤ 5.
e¹ = 2.7183 ≤ 4.1945
Convex.
ln 5 = 1.6094 ≥ 1.0986
Concave reverses.
5 − 4
Equals the variance.
For convex f, f(E X) ≤ E f(X); for concave f the inequality reverses. Equality holds iff X is constant (or f is linear).
f = x², values 1 and 3. Find f(2).
Find (1 + 9)/2.
Find e¹ and compare with (1 + e²)/2.
Find ln 5 for values 1 and 9.
f(E X) ≤ E f ✗
f(E X) ≥ E f ✓
Reverse.
any f ✗
check f″ ≥ 0 ✓
Convex only.
f(E X) = E f(X) ✗
only if constant ✓
Strict otherwise.
same ✗
differ by variance ✓
Var X = E X² − (E X)².
Try each one on paper, then open the answer. Use the solver above to see the full working.
10
9
1
1.6094
1.3863
2.7183
Unlimited fresh questions with instant marking. Choose a level, work it out on paper, then type your answer.
Solve: …
For convex f, f(E X) ≤ E f(X).
The inequality reverses.
When X is constant or f linear.
For f = x² the gap is Var X.
Bernoulli’s inequality.
More in Analysis, algebra and topology and the formula sheets.