Jensen's inequality

From testwiki
Revision as of 10:51, 13 February 2025 by imported>Thomasda
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Template:Short description Template:For Template:Use American English Template:More citations needed

Jensen's inequality generalizes the statement that a secant line of a convex function lies above its graph.

File:Convex 01.ogv

In mathematics, Jensen's inequality, named after the Danish mathematician Johan Jensen, relates the value of a convex function of an integral to the integral of the convex function. It was proved by Jensen in 1906,[1] building on an earlier proof of the same inequality for doubly-differentiable functions by Otto Hölder in 1889.[2] Given its generality, the inequality appears in many forms depending on the context, some of which are presented below. In its simplest form the inequality states that the convex transformation of a mean is less than or equal to the mean applied after convex transformation (or equivalently, the opposite inequality for concave transformations).[3]

Jensen's inequality generalizes the statement that the secant line of a convex function lies above the graph of the function, which is Jensen's inequality for two points: the secant line consists of weighted means of the convex function (for t ∈ [0,1]),

tf(x1)+(1t)f(x2),

while the graph of the function is the convex function of the weighted means,

f(tx1+(1t)x2).

Thus, Jensen's inequality in this case is

f(tx1+(1t)x2)tf(x1)+(1t)f(x2).

In the context of probability theory, it is generally stated in the following form: if X is a random variable and Template:Mvar is a convex function, then

Failed to parse (Conversion error. Server ("https://wikimedia.org/api/rest_") reported: "Class "Wikibase\Client\WikibaseClient" not found"): {\displaystyle \varphi (\operatorname {E} [X])\leq \operatorname {E} \left[\varphi (X)\right].}

The difference between the two sides of the inequality, E[φ(X)]φ(E[X]), is called the Jensen gap.[4]

Statements

The classical form of Jensen's inequality involves several numbers and weights. The inequality can be stated quite generally using either the language of measure theory or (equivalently) probability. In the probabilistic setting, the inequality can be further generalized to its full strength.

Finite form

For a real convex function φ, numbers x1,x2,,xn in its domain, and positive weights ai, Jensen's inequality can be stated as:

Template:NumBlk

and the inequality is reversed if φ is concave, which is

Template:NumBlk

Equality holds if and only if x1=x2==xn or φ is linear on a domain containing x1,x2,,xn.

As a particular case, if the weights ai are all equal, then (Template:EquationNote) and (Template:EquationNote) become

Template:NumBlk Template:NumBlk

For instance, the function Template:Math is concave, so substituting φ(x)=log(x) in the previous formula (Template:EquationNote) establishes the (logarithm of the) familiar arithmetic-mean/geometric-mean inequality:

log(i=1nxin)i=1nlog(xi)n exp(log(i=1nxin))exp(i=1nlog(xi)n) x1+x2++xnnx1x2xnn

A common application has Template:Mvar as a function of another variable (or set of variables) Template:Mvar, that is, xi=g(ti). All of this carries directly over to the general continuous case: the weights Template:Math are replaced by a non-negative integrable function Template:Math, such as a probability distribution, and the summations are replaced by integrals.

Measure-theoretic form

Let (Ω,A,μ) be a probability space. Let f:Ω be a μ-measurable function and φ: be convex. Then:[5] φ(Ωfdμ)Ωφfdμ

In real analysis, we may require an estimate on

φ(abf(x)dx)

where a,b, and f:[a,b] is a non-negative Lebesgue-integrable function. In this case, the Lebesgue measure of [a,b] need not be unity. However, by integration by substitution, the interval can be rescaled so that it has measure unity. Then Jensen's inequality can be applied to get[6]

φ(1baabf(x)dx)1baabφ(f(x))dx.

Probabilistic form

The same result can be equivalently stated in a probability theory setting, by a simple change of notation. Let (Ω,𝔉,P) be a probability space, X an integrable real-valued random variable and φ a convex function. Then:

φ(E[X])E[φ(X)].[7]

In this probability setting, the measure Template:Mvar is intended as a probability P, the integral with respect to Template:Mvar as an expected value E, and the function f as a random variable X.

Note that the equality holds if and only if φ is a linear function on some convex set A such that P(XA)=1 (which follows by inspecting the measure-theoretical proof below).

General inequality in a probabilistic setting

More generally, let T be a real topological vector space, and X a T-valued integrable random variable. In this general setting, integrable means that there exists an element E[X] in T, such that for any element z in the dual space of T: E|z,X|<, and z,E[X]=E[z,X]. Then, for any measurable convex function Template:Mvar and any sub-σ-algebra 𝔊 of 𝔉:

φ(E[X𝔊])E[φ(X)𝔊].

Here E[𝔊] stands for the expectation conditioned to the σ-algebra 𝔊. This general statement reduces to the previous ones when the topological vector space Template:Mvar is the real axis, and 𝔊 is the trivial Template:Mvar-algebra Template:Math (where Template:Math is the empty set, and Template:Math is the sample space).[8]

A sharpened and generalized form

Let X be a one-dimensional random variable with mean μ and variance σ20. Let φ(x) be a twice differentiable function, and define the function

h(x)φ(x)φ(μ)(xμ)2φ(μ)xμ.

Then[9]

σ2infφ(x)2σ2infh(x)E[φ(X)]φ(E[X])σ2suph(x)σ2supφ(x)2.

In particular, when φ(x) is convex, then φ(x)0, and the standard form of Jensen's inequality immediately follows for the case where φ(x) is additionally assumed to be twice differentiable.

Proofs

Intuitive graphical proof

A graphical "proof" of Jensen's inequality for the probabilistic case. The dashed curve along the Template:Mvar axis is the hypothetical distribution of Template:Mvar, while the dashed curve along the Template:Mvar axis is the corresponding distribution of Template:Mvar values. Note that the convex mapping Template:Math increasingly "stretches" the distribution for increasing values of Template:Mvar.
This is a proof without words of Jensen's inequality for Template:Mvar variables. Without loss of generality, the sum of the positive weights is Template:Math. It follows that the weighted point lies in the convex hull of the original points, which lies above the function itself by the definition of convexity. The conclusion follows.[10]

Jensen's inequality can be proved in several ways, and three different proofs corresponding to the different statements above will be offered. Before embarking on these mathematical derivations, however, it is worth analyzing an intuitive graphical argument based on the probabilistic case where Template:Mvar is a real number (see figure). Assuming a hypothetical distribution of Template:Mvar values, one can immediately identify the position of E[X] and its image φ(E[X]) in the graph. Noticing that for convex mappings Template:Math of some Template:Mvar values the corresponding distribution of Template:Mvar values is increasingly "stretched up" for increasing values of Template:Mvar, it is easy to see that the distribution of Template:Mvar is broader in the interval corresponding to Template:Math and narrower in Template:Math for any Template:Math; in particular, this is also true for X0=E[X]. Consequently, in this picture the expectation of Template:Mvar will always shift upwards with respect to the position of φ(E[X]). A similar reasoning holds if the distribution of Template:Mvar covers a decreasing portion of the convex function, or both a decreasing and an increasing portion of it. This "proves" the inequality, i.e.

φ(E[X])E[φ(X)]=E[Y],

with equality when Template:Math is not strictly convex, e.g. when it is a straight line, or when Template:Mvar follows a degenerate distribution (i.e. is a constant).

The proofs below formalize this intuitive notion.

Proof 1 (finite form)

If Template:Math and Template:Math are two arbitrary nonnegative real numbers such that Template:Math then convexity of Template:Mvar implies

x1,x2:φ(λ1x1+λ2x2)λ1φ(x1)+λ2φ(x2).

This can be generalized: if Template:Math are nonnegative real numbers such that Template:Math, then

φ(λ1x1+λ2x2++λnxn)λ1φ(x1)+λ2φ(x2)++λnφ(xn),

for any Template:Math.

The finite form of the Jensen's inequality can be proved by induction: by convexity hypotheses, the statement is true for n = 2. Suppose the statement is true for some n, so

φ(i=1nλixi)i=1nλiφ(xi)

for any Template:Math such that Template:Math.

One needs to prove it for Template:Math. At least one of the Template:Math is strictly smaller than 1, say Template:Math; therefore by convexity inequality:

φ(i=1n+1λixi)=φ((1λn+1)i=1nλi1λn+1xi+λn+1xn+1)(1λn+1)φ(i=1nλi1λn+1xi)+λn+1φ(xn+1).

Since Template:Math,

i=1nλi1λn+1=1,

applying the inductive hypothesis gives

φ(i=1nλi1λn+1xi)i=1nλi1λn+1φ(xi)

therefore

φ(i=1n+1λixi)(1λn+1)i=1nλi1λn+1φ(xi)+λn+1φ(xn+1)=i=1n+1λiφ(xi)

We deduce the inequality is true for Template:Math, by induction it follows that the result is also true for all integer Template:Math greater than 2.

In order to obtain the general inequality from this finite form, one needs to use a density argument. The finite form can be rewritten as:

φ(xdμn(x))φ(x)dμn(x),

where μn is a measure given by an arbitrary convex combination of Dirac deltas:

μn=i=1nλiδxi.

Since convex functions are continuous, and since convex combinations of Dirac deltas are weakly dense in the set of probability measures (as could be easily verified), the general statement is obtained simply by a limiting procedure.

Proof 2 (measure-theoretic form)

Let g be a real-valued μ-integrable function on a probability space Ω, and let φ be a convex function on the real numbers. Since φ is convex, at each real number x we have a nonempty set of subderivatives, which may be thought of as lines touching the graph of φ at x, but which are below the graph of φ at all points (support lines of the graph).

Now, if we define

x0:=Ωgdμ,

because of the existence of subderivatives for convex functions, we may choose a and b such that

ax+bφ(x),

for all real x and

ax0+b=φ(x0).

But then we have that

φg(ω)ag(ω)+b

for almost all ωΩ. Since we have a probability measure, the integral is monotone with μ(Ω)=1 so that

ΩφgdμΩ(ag+b)dμ=aΩgdμ+bΩdμ=ax0+b=φ(x0)=φ(Ωgdμ),

as desired.

Proof 3 (general inequality in a probabilistic setting)

Let X be an integrable random variable that takes values in a real topological vector space T. Since φ:T is convex, for any x,yT, the quantity

φ(x+θy)φ(x)θ,

is decreasing as Template:Mvar approaches 0+. In particular, the subdifferential of φ evaluated at Template:Mvar in the direction Template:Mvar is well-defined by

(Dφ)(x)y:=limθ0φ(x+θy)φ(x)θ=infθ0φ(x+θy)φ(x)θ.

It is easily seen that the subdifferential is linear in Template:Mvar Template:Citation needed (that is false and the assertion requires Hahn-Banach theorem to be proved) and, since the infimum taken in the right-hand side of the previous formula is smaller than the value of the same term for Template:Math, one gets

φ(x)φ(x+y)(Dφ)(x)y.

In particular, for an arbitrary sub-Template:Mvar-algebra 𝔊 we can evaluate the last inequality when x=E[X𝔊],y=XE[X𝔊] to obtain

φ(E[X𝔊])φ(X)(Dφ)(E[X𝔊])(XE[X𝔊]).

Now, if we take the expectation conditioned to 𝔊 on both sides of the previous expression, we get the result since:

E[[(Dφ)(E[X𝔊])(XE[X𝔊])]𝔊]=(Dφ)(E[X𝔊])E[(XE[X𝔊])𝔊]=0,

by the linearity of the subdifferential in the y variable, and the following well-known property of the conditional expectation:

E[(E[X𝔊])𝔊]=E[X𝔊].

Applications and special cases

Form involving a probability density function

Suppose Template:Math is a measurable subset of the real line and f(x) is a non-negative function such that

f(x)dx=1.

In probabilistic language, f is a probability density function.

Then Jensen's inequality becomes the following statement about convex integrals:

If g is any real-valued measurable function and φ is convex over the range of g, then

φ(g(x)f(x)dx)φ(g(x))f(x)dx.

If g(x) = x, then this form of the inequality reduces to a commonly used special case:

φ(xf(x)dx)φ(x)f(x)dx.

This is applied in Variational Bayesian methods.

Example: even moments of a random variable

If g(x) = x2n, and X is a random variable, then g is convex as

d2gdx2(x)=2n(2n1)x2n20 x

and so

g(E[X])=(E[X])2nE[X2n].

In particular, if some even moment 2n of X is finite, X has a finite mean. An extension of this argument shows X has finite moments of every order l dividing n.

Alternative finite form

Let Template:Math and take Template:Mvar to be the counting measure on Template:Math, then the general form reduces to a statement about sums:

φ(i=1ng(xi)λi)i=1nφ(g(xi))λi,

provided that Template:Math and

λ1++λn=1.

There is also an infinite discrete form.

Statistical physics

Jensen's inequality is of particular importance in statistical physics when the convex function is an exponential, giving:

eE[X]E[eX],

where the expected values are with respect to some probability distribution in the random variable Template:Mvar.

Proof: Let φ(x)=ex in φ(E[X])E[φ(X)].

Information theory

If Template:Math is the true probability density for Template:Mvar, and Template:Math is another density, then applying Jensen's inequality for the random variable Template:Math and the convex function Template:Math gives

E[φ(Y)]φ(E[Y])

Therefore:

D(p(x)q(x))=p(x)log(q(x)p(x))dxlog(p(x)q(x)p(x)dx)=log(q(x)dx)=0

a result called Gibbs' inequality.

It shows that the average message length is minimised when codes are assigned on the basis of the true probabilities p rather than any other distribution q. The quantity that is non-negative is called the Kullback–Leibler divergence of q from p, where D(p(x)q(x))=p(x)log(p(x)q(x))dx.

Since Template:Math is a strictly convex function for Template:Math, it follows that equality holds when Template:Math equals Template:Math almost everywhere.

Rao–Blackwell theorem

Template:Main article

If L is a convex function and 𝔊 a sub-sigma-algebra, then, from the conditional version of Jensen's inequality, we get

L(E[δ(X)𝔊])E[L(δ(X))𝔊]E[L(E[δ(X)𝔊])]E[L(δ(X))].

So if δ(X) is some estimator of an unobserved parameter θ given a vector of observables X; and if T(X) is a sufficient statistic for θ; then an improved estimator, in the sense of having a smaller expected loss L, can be obtained by calculating

δ1(X)=Eθ[δ(X)T(X)=T(X)],

the expected value of δ with respect to θ, taken over all possible vectors of observations X compatible with the same value of T(X) as that observed. Further, because T is a sufficient statistic, δ1(X) does not depend on θ, hence, becomes a statistic.

This result is known as the Rao–Blackwell theorem.

Risk aversion

The relation between risk aversion and declining marginal utility for scalar outcomes can be stated formally with Jensen's inequality: risk aversion can be stated as preferring a certain outcome u(E[x]) to a fair gamble with potentially larger but uncertain outcome of u(x):

u(E[x])>E[u(x)].

But this is simply Jensen's inequality for a concave u(x): a utility function that exhibits declining marginal utility.[11]

Generalizations

Beyond its classical formulation for real numbers and convex functions, Jensen’s inequality has been extended to the realm of operator theory. In this non‐commutative setting the inequality is expressed in terms of operator convex functions—that is, functions defined on an interval I that satisfy

f(λx+(1λ)y)λf(x)+(1λ)f(y)

for every pair of self‐adjoint operators x and y (with spectra in I) and every scalar λ[0,1]. Hansen and Pedersen[12] established a definitive version of this inequality by considering genuine non‐commutative convex combinations. In particular, if one has an n‑tuple of bounded self‐adjoint operators x1,,xn with spectra in I and an n‑tuple of operators a1,,an satisfying

i=1nai*ai=I,

then the following operator Jensen inequality holds:

f(i=1nai*xiai)i=1nai*f(xi)ai.

This result shows that the convex transformation “respects” non-commutative convex combinations, thereby extending the classical inequality to operators without the need for additional restrictions on the interval of definition.[12] A closely related extension is given by the Jensen trace inequality. For a continuous convex function f defined on I, if one considers self‐adjoint matrices x1,,xn (with spectra in I) and matrices a1,,an satisfying i=1nai*ai=I, then one has

Tr(f(i=1nai*xiai))Tr(i=1nai*f(xi)ai).

This inequality naturally extends to C*-algebras equipped with a finite trace and is particularly useful in applications ranging from quantum statistical mechanics to information theory. Furthermore, contractive versions of these operator inequalities are available when one only assumes i=1naitaiI, provided that additional conditions such as f(0)0 (when 0 ∈ I) are imposed. Extensions to continuous fields of operators and to settings involving conditional expectations on C-algebras further illustrate the broad applicability of these generalizations.



See also

Notes

Template:Reflist

References

Template:Convex analysis and variational analysis

  1. Template:Cite journal
  2. Template:Cite journal
  3. Template:Cite book
  4. Template:Cite journal
  5. p. 25 of Template:Cite book
  6. Niculescu, Constantin P. "Integral inequalities", P. 12.
  7. p. 29 of Template:Cite book
  8. Attention: In this generality additional assumptions on the convex function and/ or the topological vector space are needed, see Example (1.3) on p. 53 in Template:Cite journal
  9. Template:Cite journal
  10. Template:Cite book
  11. Template:Cite book
  12. 12.0 12.1 Template:Cite journal