Math With AmarA C A D E M Y
All math animations

Graduate · Conditional expectation by groups

Conditional expectation by groups: Both groups shifted downward

Conditional expectation by groups: investigate both groups shifted downward with first group baseline a = -2; second group baseline b = -2.

Predict what will happen, press Play, then pause and explain what changed. Every control also works without playback.

Watch the relationship

Paused
Conditional expectation by groups: Both groups shifted downward. First group estimate: -0.5. Second group estimate: -0.5. Unconditional mean: -0.5. Mean squared error: 2.75Use only the group information-220.52.54.5value / estimateTeal: original values · amber: group estimates
The four outcomes have probability one quarter and G is generated by the two displayed pairs. Intermediate frames are G-measurable estimates but are not labeled as the conditional expectation until the endpoint. Squared error is averaged over all four outcomes.

Starts paused. Play once, pause anywhere, or use Step to inspect the mathematics. Playback stops when this panel leaves the screen.

Make it your experiment

Change one value. Notice what follows.

The controls adjust the model. Numbers below describe the current frame. Decimals are rounded.

First group estimate
-0.5
Second group estimate
-0.5
Unconditional mean
-0.5
Mean squared error
2.75

HD animation studio

From experiment to screen.

Present a crisp Canvas scene, save a full-HD image, or capture your model as a silent video.

Understand what you are seeing

The idea behind the motion.

Partial information may identify a group without revealing the exact outcome. Conditional expectation must be constant on each observable group and match that group's mean. Moving from the unconditional mean toward the two group means decreases squared error, illustrating the projection interpretation in a finite space. This investigation starts with First group baseline a = -2; Second group baseline b = -2. Predict the result before playing, then change one parameter while keeping the other fixed to test the reason for the change.

A relationship to keep

X=(a,a+2,b,b+4); E[X|G]=(a+1,a+1,b+2,b+2)

Read the symbols alongside the explanation. A diagram shows the relationship; the assumptions tell you when it applies.

  1. STEP 1

    Set up the mathematical model

    Read four equally likely outcomes and the partition that reveals only whether the outcome is in the first pair or the second pair. The starting case is “Both groups shifted downward.”

  2. STEP 2

    Follow the changing quantity

    Move the two group estimates from the overall mean to their own group means. Original outcome values remain fixed.

  3. STEP 3

    Explain and test the result

    At the endpoint, verify that residuals sum to zero within each group and that the overall expectation is preserved. Distinguish a random conditional expectation from one scalar unconditional mean.

Your turn to explain

Make a prediction. Test your reasoning.

Keep First group baseline a = -2; Second group baseline b = -2. Pause the timeline at 60%. Given first group estimate = -0.8, calculate second group estimate, unconditional mean, mean squared error. Show the substitution into the displayed formula.

Use the values specified in the question. Reset restores the initial values for this investigation.

Compare your explanation

The exact group means are (-2+-2+2)/2=-1 and (-2+-2+4)/2=0. At progress 0.6, interpolate each from overall mean -0.5, giving -0.8 and -0.2. Averaging all four squared residuals yields 2.54. Results: Second group estimate: -0.2; Unconditional mean: -0.5; Mean squared error: 2.54. Decimal values are rounded; retain the original parameters when checking.

Connect the animation to a worked example and practice questions.