A nonlinear function of an average generally differs from the average of the function. For a convex function, averaging the function gives at least the function of the average. The difference can be substantial, and it can be infinite even when the original random variable is integrable. A supporting line explains the inequality without assuming a derivative.
Let be a probability space and a nonempty open interval.
Definition 4.7.1
(Convex and strictly convex functions)
A finite function is convex if
It is strictly convex if the inequality is strict whenever and .
We use monotonicity of the Lebesgue integral. Finite convex functions on open intervals are continuous; the slope estimates below establish the continuity needed here.
Supporting lines from secant slopes
Lemma 4.7.2
(Supporting line at every interior point)
Let be convex on and . Put and , over . Then are finite, , and for every ,
Proof
(Order the secant slopes on the two sides of )
For in , is a convex combination of and ; rearranging the convexity inequality gives
Each collection of slopes is nonempty because is open, and (S) bounds each left slope above by a fixed right slope and each right slope below by a fixed left slope. Hence are finite, and taking the supremum over and then the infimum over in (S) gives . Let . For , the slope from to is at least ; for , the slope from to is at most . Either way (1) holds, and it holds trivially at .
The affine minorant in (1) touches the graph at . The same slope comparisons give continuity. For , write ; convexity gives the three-chord inequalities , since the middle slope is a weighted average of the outer two and (S) orders them. At , choose . These inequalities give for , and for . Thus throughout , with . In particular is measurable whenever is.
Worked example 4.7.3
(Supporting lines at a corner)
For on and , every left slope is and every right slope is , so and . Every gives a supporting line: for all , since . At a point , every right slope and every left slope from equals , while left slopes from are smaller, so and the only supporting line is itself. A derivative is therefore not needed; at a corner there are many admissible slopes.
Jensen and equality
Theorem 4.7.4
(Jensen's inequality)
Let be convex on and let be integrable and -valued almost surely. Then lies in , and
where the right side may be . If is strictly convex, equality holds precisely when almost surely.
Proof
(Integrate one supporting line at the mean)
Choose an -valued version of . If is a finite left endpoint of , then almost surely, so ; similarly a finite right endpoint exceeds strictly. Thus . Apply (1) at with some . The affine lower bound is integrable, so the negative part of is integrable and is well defined in . Integrating (1) yields (2), since .
For strict convexity, suppose the line touched the graph at another point . At , strict convexity would give , contradicting (1). Thus vanishes only at . If equality in (2) holds, then , so and almost surely. Conversely a constant gives equality. This also covers an infinite right side, which cannot equal the finite left side.
Proof X-ray
Why a line is enough
Openness of is used twice: to put the mean strictly inside , and to supply secant slopes on both sides of so that a finite exists. The key move is to choose the slope once, at the mean; it need not be a derivative. Integrability of is used only for the affine part: it makes and gives an integrable lower bound, so that is defined even when it is infinite. The proof then closes by monotonicity of the integral applied to the nonnegative gap . Strict convexity enters only in the equality case, by forcing to vanish at the single point ; a nonnegative function with zero expectation vanishes almost surely.
The equality clause genuinely needs strict convexity.
Counterexample mode
Equality without a constant random variable
Claim: for every convex , equality in (2) forces to be almost surely constant. Take , which is convex but not strictly convex, and let or with probability each. Then and : equality holds, yet is not constant. The supporting line at touches the graph along all of . The repaired claim assumes strict convexity, or more precisely that the gap vanishes only at .
Geometric means and infinite expectations
On , is strictly convex. For a positive integrable random variable , (2) gives
where . Here , so is well defined in ; equality in (3) holds exactly when is almost surely constant. If and , set : then , and equality with holds exactly when almost surely.
Worked example 4.7.5
(Weighted arithmetic and geometric means)
For positive and nonnegative weights summing to one, let with probability . Then and (3) gives , with equality precisely when all values with positive weight agree. For instance, with , , , : the left side is and the right side is , so the inequality is strict, as it must be since .
Worked example 4.7.6
(A geometric mean equal to zero)
Even for positive , can be . If is uniform on and , then and . Hence , while . In (2) with this is the case of an infinite right side: , and the inequality holds trivially and strictly.
Common mistake
(Reading finiteness of into Jensen)
An integrable need not make integrable. On with density , has mean one, whereas . Jensen still says ; it gives a lower bound for and never its finiteness.
Practice
Quick check
(A random variable equals and with probability each. Compare and .)
Compute both sides.
Solution · Answer
, so , while . The inequality is strict because is strictly convex and is not constant.
Quick check
(Apply (3) to the values with equal weights. Is equality attained?)
Compare the geometric and arithmetic means.
Solution · Answer
The geometric mean is and the arithmetic mean is . Since , strict convexity of shows that the inequality is strict.
Quick check
(Let be integrable and nonnegative. Can equality hold in when is nonconstant?)
Use for .
Solution · Answer
Yes, always: for both sides equal . For example or with equal probability gives equality although is nonconstant; is not strictly convex.
Quick check
(For and any square-integrable , express the Jensen gap explicitly.)
Find the supporting line at .
Solution · Answer
With , the supporting line has slope and pointwise gap . Hence the gap is , which vanishes exactly when almost surely.