Explore modules

Jensen Inequality

Move a two-point distribution and compare a convex function of its mean with its expected function value.

Free theory article

Move a two-point distribution and compare a convex function of its mean with its expected function value.

Concept & interpretation

Jensen's Inequality is a fundamental result in probability theory that relates the value of a convex function applied to an expectation to the expected value of the convex function. For a random variable X and a convex function f, it states that:

Experiment

You can interact with a two-point distribution in the Jensen Inequality module.

  1. Set Value x to -2.
  2. Set Value y to 2.
  3. Set Weight p to 0.25.
  4. Set Convex function to Square.
  5. Observe the Mean E[X] is 1, Function of Mean f(E[X]) is 1, Expected Function E[f(X)] is 4, and the Jensen Gap is 3.
  6. Change Convex function to Absolute. Observe the Mean remains 1, f(E[X]) is 1, but Expected Function E[f(X)] is 2, giving a Jensen Gap of 1.
  7. Change Value x to -1, Value y to 3, and Weight p to 0.5 with Square function. Observe Mean is 1, Function of Mean is 1, Expected Function is 5, giving a Jensen Gap of 4.
  8. Set Weight p to 0 (Value x = -2, Value y = 2, Square). This creates a degenerate distribution entirely at y = 2. Observe the Jensen Gap becomes 0 because E[f(X)] and f(E[X]) are both 4.
Read the full free theory article