Tutorials › Measure Theory › Equality In Jensen’s Inequality

L^p Spaces and the Basic Inequalities · Tutorial 534 of 798

Equality In Jensen's Inequality

Learn how supporting lines identify equality in Jensen’s inequality, when strict convexity forces almost-everywhere constancy, and what changes when strictness fails.

Advanced 12 min read

What You'll Learn

  • State precise integrability and domain hypotheses for equality in integral Jensen’s inequality
  • Prove that strict convexity forces a real-valued function to equal its mean almost everywhere
  • Characterize equality for a convex function using its supporting line at the mean
  • Identify how affine portions of a convex function allow nonconstant equality cases
  • Distinguish equality almost everywhere from equality at every point
  • Check Jensen equality by computing both sides in finite and continuous probability spaces

What Equality in Jensen’s Inequality Tells Us

Jensen’s inequality compares the value of a convex function at a mean with the mean of the function’s values. Its equality case is more informative than the inequality alone: if the convex function bends strictly, equality can occur only when the input has no genuine variation, apart from changes on a null set. When the function is convex but not strictly convex, equality can also occur for nonconstant inputs, provided their values lie along a portion where the function is affine.

We work on a probability space \((\Omega,\mathcal{F},\mathbb{P})\). A random variable \(X:\Omega\to\mathbb{R}\) is real-valued and measurable, and is assumed integrable, meaning \(\mathbb{E}[|X|]<\infty\). Write \(a=\mathbb{E}[X]\). Let \(I\subseteq\mathbb{R}\) be an open interval, and let \(\phi:I\to\mathbb{R}\) be a finite convex function. Assume \(X\in I\) \(\mathbb{P}\)-a.e. and \(\phi(X)\) is integrable. These conditions ensure both sides of Jensen’s inequality are finite real numbers. In particular, equality means ordinary equality of those finite numbers, not an equality involving \(+\infty\).

Theorem (Equality for Strictly Convex Functions): Under the assumptions above, suppose also that \(a\in I\) and \(\phi\) is strictly convex on \(I\). Then $$ \mathbb{E}[\phi(X)]=\phi(\mathbb{E}[X]) \quad\Longleftrightarrow\quad X=\mathbb{E}[X]\ \mathbb{P}\text{-a.e.} $$

Here strictly convex means that for distinct \(x,y\in I\) and every \(t\in(0,1)\), \(\phi((1-t)x+ty)<(1-t)\phi(x)+t\phi(y)\). The theorem concerns equality almost everywhere, not equality at every point: a random variable may differ from its mean on a null set without changing either expectation.

Supporting Lines and the Equality Criterion

The proof uses a supporting line at the mean. A line \(x\mapsto\phi(a)+s(x-a)\) supports \(\phi\) at \(a\in I\) if it lies below the graph throughout \(I\) and agrees with \(\phi\) at \(a\). For a finite convex function on an open interval, at least one such slope \(s\in\mathbb{R}\) exists. To see why, consider the secant slopes to the left and right of \(a\): convexity implies that every slope \((\phi(a)-\phi(x))/(a-x)\), for \(x<a\), is at most every slope \((\phi(y)-\phi(a))/(y-a)\), for \(y>a\). The supremum of the left slopes and the infimum of the right slopes are finite and ordered; choosing \(s\) between them gives the supporting inequality on both sides.

Proposition (Equality via a Supporting Line): On the probability space and under the integrability and domain assumptions just stated, let \(\phi\) be convex, let \(a=\mathbb{E}[X]\in I\), and choose any supporting slope \(s\) at \(a\). Define $$ C_s=\{x\in I:\phi(x)=\phi(a)+s(x-a)\}. $$ Then \(\mathbb{E}[\phi(X)]=\phi(a)\) if and only if \(X\in C_s\) \(\mathbb{P}\)-a.e. The set \(C_s\) is an interval, possibly empty except for the point \(a\), and may be larger when \(\phi\) has an affine portion.

Proof. Define \(q(x)=\phi(x)-\phi(a)-s(x-a)\) for \(x\in I\). The supporting-line property gives \(q(x)\ge0\) and \(q(a)=0\). The random variable \(q(X)\) is measurable and integrable: it is a difference of the integrable random variables \(\phi(X)\), the constant \(\phi(a)\), and \(s(X-a)\). Since \(\mathbb{E}[X]=a\), linearity of expectation gives \(\mathbb{E}[q(X)]=\mathbb{E}[\phi(X)]-\phi(a)\). A nonnegative integrable function has integral zero exactly when it is zero a.e.: indeed, if its integral is zero, each set \(\{q(X)>1/n\}\) has probability zero because \(\mathbb{E}[q(X)]\ge (1/n)\mathbb{P}(q(X)>1/n)\); their countable union is \(\{q(X)>0\}\). Conversely, a function zero a.e. has integral zero. Thus equality of the Jensen quantities holds exactly when \(q(X)=0\) a.e., which is precisely \(X\in C_s\) a.e. Finally, if \(x,y\in C_s\), convexity gives, for \(z=(1-t)x+ty\) with \(0\le t\le1\), \(\phi(z)\le(1-t)\phi(x)+t\phi(y)=\phi(a)+s(z-a)\). The supporting-line inequality gives the reverse inequality, so \(z\in C_s\). Hence \(C_s\) is an interval. \(\square\)

Proof of the strict-convexity theorem. Choose a supporting slope \(s\) at \(a\). If \(x\ne a\) and \(q(x)=0\), then \(\phi(x)\) equals the supporting line at both \(a\) and \(x\). For every point strictly between \(a\) and \(x\), convexity bounds \(\phi\) above by the line segment joining these endpoint values, while the supporting-line inequality bounds it below by that same line. Thus \(\phi\) agrees with a line throughout the segment, contradicting strict convexity. Therefore \(q(x)=0\) only at \(x=a\). By the proposition, equality in Jensen’s inequality implies \(X=a\) a.e. Conversely, if \(X=a\) a.e., then \(\phi(X)=\phi(a)\) a.e., so \(\mathbb{E}[\phi(X)]=\phi(a)\). \(\square\)

Worked Examples

Worked Example: Strict Convexity Gives Strict Inequality

Let \(\Omega=\{\omega_1,\omega_2\}\), with \(\mathcal{F}\) the set of all subsets and \(\mathbb{P}(\{\omega_1\})=\mathbb{P}(\{\omega_2\})=1/2\). Set \(X(\omega_1)=0\), \(X(\omega_2)=2\), and \(\phi(x)=x^2\) on \(I=\mathbb{R}\). The random variable and its image under \(\phi\) are integrable, and \(\phi\) is strictly convex. Compute both sides:

$$ \mathbb{E}[X]=\frac12(0)+\frac12(2)=1, \qquad \phi(\mathbb{E}[X])=1^2=1, $$
$$ \mathbb{E}[\phi(X)] =\frac12(0^2)+\frac12(2^2) =\frac12(0)+\frac12(4)=2. $$

Thus the Jensen gap is \(2-1=1\), so equality does not hold. As an independent check, the mean squared deviation is \(\frac12(0-1)^2+\frac12(2-1)^2=\frac12+\frac12=1\), which agrees with the gap for \(x^2\). Since \(X\) is not constant a.e. on this two-point probability space, the strict-convexity theorem predicts strict inequality.

Worked Example: Equality Along an Affine Portion

On the same two-point probability space, let \(X(\omega_1)=0\), \(X(\omega_2)=2\), and define \(\phi(x)=\max(0,x)\) on \(I=(-2,3)\). This function is convex but not strictly convex: it equals the affine function \(x\) for \(x\ge0\). Its values at both outcomes lie in \(I\), and all variables involved are integrable. The mean is \(\mathbb{E}[X]=\frac12(0)+\frac12(2)=1\), so \(\phi(\mathbb{E}[X])=\max(0,1)=1\). Also, \(\mathbb{E}[\phi(X)]=\frac12\max(0,0)+\frac12\max(0,2)=\frac12(0)+\frac12(2)=1\). Equality holds even though \(X\) is not constant a.e.

At the mean \(a=1\), slope \(s=1\) gives the supporting line \(x\mapsto x\). Its contact set in \(I\) is \(C_1=[0,3)\), which contains both possible values of \(X\). This verifies the contact-set criterion directly. Check: both sides are exactly \(1\), and the mean of the two values \(0\) and \(2\) lies in the same affine portion.

Worked Example: Equality Means Almost-Everywhere Constancy

Take \(\Omega=[0,1]\), \(\mathcal{F}\) the Lebesgue sigma-algebra, and \(\mathbb{P}\) Lebesgue measure restricted to \([0,1]\), which has total mass \(1\). Let \(X(x)=3\) for \(x\ne1/2\) and \(X(1/2)=7\), and let \(\phi(t)=e^t\) on \(I=\mathbb{R}\). The exceptional singleton has probability zero, so \(X=3\) a.e. and \(X\) is integrable. Directly, \(\mathbb{E}[X]=3\cdot1=3\), and \(\mathbb{E}[e^X]=e^3\cdot m([0,1]\setminus\{1/2\})+e^7\cdot m(\{1/2\})=e^3\cdot1+e^7\cdot0=e^3\). Consequently, \(\phi(\mathbb{E}[X])=e^3=\mathbb{E}[\phi(X)]\). The exponential function is strictly convex, and \(X=3\) a.e., as the theorem requires.

Check: changing \(X\) at the single point \(1/2\) does not change its integral or the integral of \(e^X\), because that set has measure zero. Equality here does not assert that \(X(x)=3\) at every point.

Common Mistake: Treating a Convex Function as Linear

A frequent incorrect calculation is to replace \(\mathbb{E}[\phi(X)]\) by \(\phi(\mathbb{E}[X])\) on the grounds that expectation “passes through” a function. Expectation is linear, but applying a nonlinear function is not a linear operation. In the first example, that mistaken step would give \(\mathbb{E}[X^2]=(\mathbb{E}[X])^2=1\). The actual computation is \(\mathbb{E}[X^2]=\frac12(0^2)+\frac12(2^2)=2\), not \(1\). The difference \(1\) is exactly the Jensen gap.

Strict convexity is essential to the conclusion that equality forces constancy. For a general convex function, equality only forces the values of \(X\) to lie a.e. in the contact set of a supporting line at the mean. That set can contain many points, as in the affine-portion example. Conversely, strict convexity does not say that every nonconstant input gives equality; it says that a nonconstant input gives a strict inequality under the theorem’s hypotheses. Finiteness and integrability matter as well: the equality statement above compares finite expectations, so it does not interpret an undefined difference such as \(+\infty-(+\infty)\).

Check Your Understanding

Use the supporting-line criterion and check the integrability and domain assumptions in each question.

  1. On a two-point probability space with equal probabilities, let \(X\) take values \(1\) and \(3\). Compute both sides of Jensen’s inequality for \(\phi(x)=x^2\), and determine whether equality holds.
  2. For the function \(\phi(x)=\max(0,x)\), identify a supporting line at a positive mean \(a\) and describe its contact set.
  3. Explain why the strict-convexity theorem concludes that \(X\) equals its mean a.e., rather than at every point.
  4. Suppose a convex function agrees with a line on an interval containing all values of \(X\). Explain why Jensen equality can hold even if \(X\) is not constant a.e.
  5. State the role of the assumption that \(\phi(X)\) is integrable in the equality criterion.