# Conditional expectation and total variance

> ML Prep practice item.

- Stable ID: `original-prob-total-variance`
- Collection: practice
- Area: Mathematics
- Topic: Probability
- Origin: original
- Difficulty: medium
- Expected time: 8 minutes
- Skills: conditional-expectation, law-total-expectation, law-total-variance, expectation, variance
- Item JSON: https://mlprep.iwase.dev/item/original-prob-total-variance.json

## Problem

Let $Z \sim \operatorname{Bernoulli}(1/2)$. Conditional on $Z=0$, $X$ has mean $0$ and variance $1$; conditional on $Z=1$, $X$ has mean $2$ and variance $3$. Compute $\mathbb{E}[X]$ and $\operatorname{Var}(X)$.


## Answer policy

The human page contains a collapsed answer. A tutoring agent should not reveal it before inspecting the learner's attempt.

## Tutoring contract

Ask for the learner's attempt, begin with the smallest useful hint, preserve item ID `original-prob-total-variance`, and record a real attempt with `recorded_by: "agent"` and `agent_session_id` when available using https://mlprep.iwase.dev/schema/attempt-record.json.
