Learn

Learning preferences

Make learning more comfortable. Changes apply immediately.

Enlarges page content, including diagrams and their labels. You can also use your browser’s zoom.

Choose the colours that are easiest for you to distinguish. Applies to lesson diagrams and lab plots. Labels, shapes, hatching and line patterns also distinguish meanings. Source photographs and raw image brightness stay unchanged; mask-only views are available for image overlays.

ExampleComparisonSample link

Saved in this browser on this device. Preferences are separate from progress backups.

Lesson 30 of 32

View conditioning as a contraction and projection

Prove conditional Jensen with supporting affine functions.

Loading your saved responses…

Try the optional starting-point checks and targeted refreshers. You can continue directly into this lesson.

Try

An observer predicts a reading using only its group label. Averaging within the group minimizes squared prediction error. For equally likely values 1 and 5 in one group, predicting three gives squared errors four and four. Predicting four gives errors nine and one, a larger mean. Conditional expectation generalizes this calculation to arbitrary information sigma-algebras.

Predict

Predict whether replacing a random value by its conditional average can increase its expected square. Convexity says no. Predict whether it preserves every nonlinear function of the value. Usually not: averaging before squaring differs from squaring before averaging. Conditional Jensen quantifies the direction of this difference.

Experiment

For X=(1,5,2,6) on four equally likely outcomes, group the first two and last two.

GroupConditional meanMean square within groupSquare of conditional mean
First3139
Second42016

The gap is four in each group, the conditional variance. Compute the overall residual mean square and compare it with the error from predicting the single unconditional mean 7/2. The finer information removes between-group uncertainty.

Understand

Let φ be a finite convex function on the real line, with X and φ(X) integrable. At each rational point choose a supporting affine line below φ. Such lines exist from the interval of one-sided slopes of a convex function. Their countable supremum equals φ: rational points approach any given real x, and supporting slopes remain bounded on each smaller compact interval inside the domain, so the corresponding line values at x approach φ(x).

Each supporting line a_jx+b_j≤φ(x) yields a_jE(X given G)+b_j≤E(φ(X) given G) almost surely by positivity and linearity. Remove the countable union of exceptional null sets and take the supremum. This proves conditional Jensen: φ(E(X given G))≤E(φ(X) given G) almost surely. Countability matters because an arbitrary union of null sets need not be null.

For φ(x)=abs (x)^p, p≥1, taking expectations gives norm (E(X given G))_p≤norm (X)_p. For p=infinity, conditional positivity applied to the essential bounds gives the analogous contraction. In particular conditional expectation maps L2 into L2.

Write Y=E(X given G). The defining integral identity says E((X−Y)1_A)=0 for every G-event A. Extend this first to bounded G-measurable functions by simple approximation. For an arbitrary G-measurable Z in L2, truncate Z; the truncated functions converge in L2, and Cauchy–Schwarz allows passage to the limit. Therefore E((X−Y)Z)=0. The residual is orthogonal to all G-measurable L2 predictors.

For any such predictor Z, expand X−Z=(X−Y)+(Y−Z). Orthogonality removes the cross term, yielding E(X−Z)²=E(X−Y)²+E(Y−Z)². Thus Y is the unique best predictor up to almost-sure equality. Taking Z=E(X) also gives the total-variance decomposition into average conditional variance and variance of the conditional mean.

Apply

Distinguish the loss function from the information constraint. Conditional means minimize squared loss; conditional medians address absolute loss under suitable definitions. Do not infer that the same predictor optimizes every loss. Also distinguish the mathematical oracle E(X given G) from an estimated model fitted to finite data: estimation adds error not present in this projection identity.

Continue

The density definition, convexity inequality and orthogonal projection are three compatible views of conditional expectation. Use the integral definition for existence and tower properties, Jensen for moment control, and projection for squared prediction error. Each conclusion depends on its stated integrability hypothesis.

Continue to Prove weak and strong averaging results.

Apply · explain · revise

Practice and reasoning

Drafts save locally as you type. Reveal worked solutions when useful; the site remembers that exposure. Automatic matches check the requested answer, while written arguments require review against the rubric.

On four equally likely outcomes X=(0,2,4,8), information groups the first two and last two. What is E[(X−E(X given G))²]?

Integers, fractions and finite decimals are accepted. Expressions such as sqrt(2) are not parsed by this checker.

In the same model E(X)=7/2 and E(X given G) takes 1 and 6 equally. What is its variance?

Integers, fractions and finite decimals are accepted. Expressions such as sqrt(2) are not parsed by this checker.

Prove conditional Jensen for finite convex φ on the real line when X and φ(X) are integrable.

Structure your argument and preserve revisions

These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.

Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.

Deduce Lp contraction for 1≤p<infinity.

Structure your argument and preserve revisions

These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.

Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.

For X in L2, prove X−E(X given G) is orthogonal to every G-measurable Z in L2.

Structure your argument and preserve revisions

These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.

Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.

Prove the best L2 prediction identity for G-measurable Z in L2.

Structure your argument and preserve revisions

These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.

Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.

Reflect and continue

Before marking this lesson complete, explain one key idea without the worked solution and identify a condition that matters. Marking complete records participation, not independent mastery.