What is conditional expectation, and can you explain the law of total expectation?

Quick Overview

Asks what conditional expectation means and how the law of total expectation recovers an overall mean from conditional ones. Tests whether you can tell a conditional mean at a value from the random variable version, set up a conditioning argument, and weight groups correctly.

What is conditional expectation, and can you explain the law of total expectation?

Role: Data Scientist

Category: Statistics & Math

Difficulty: easy

Interview Round: Other

What is conditional expectation, and can you explain the law of total expectation? ```hint Try a two-stage experiment A fair coin decides whether you roll a six-sided or a four-sided die. Work out the mean of the roll by handling each coin outcome separately, then think about how the two pieces combine. ``` ### What a Strong Answer Covers - The difference between $E[X \mid Y = y]$, a number, and $E[X \mid Y]$, a random variable that depends on $Y$. - The law of total expectation in its general form and in a discrete or continuous form, with the weights coming from the distribution of $Y$. - A worked example where conditioning on a well-chosen variable makes an expectation easy to compute. - When the rule applies and the usual mistakes, such as averaging group means without weighting by group size. ### Follow-up Questions - State the law of total variance and compute it for the coin-and-dice example. - The number of customers per day has mean 200, and each customer spends an amount with mean \$30. What is the expected daily revenue, and what assumption does that calculation need? - Why is $E[X \mid Y]$ the best predictor of $X$ from $Y$ under squared error? - Overall conversion fell even though conversion rose in every segment. How does the law of total expectation explain that?

Overview: Asks what conditional expectation means and how the law of total expectation recovers an overall mean from conditional ones. Tests whether you can tell a conditional mean at a value from the random variable version, set up a conditioning argument, and weight groups correctly.

General logo
General
Nov 25, 2026
easyData ScientistOtherStatistics & Math
0
0

What is conditional expectation, and can you explain the law of total expectation?

What a Strong Answer Covers Guidance

  • The difference between E[X∣Y=y]E[X \mid Y = y] , a number, and E[X∣Y]E[X \mid Y] , a random variable that depends on YY .
  • The law of total expectation in its general form and in a discrete or continuous form, with the weights coming from the distribution of YY .
  • A worked example where conditioning on a well-chosen variable makes an expectation easy to compute.
  • When the rule applies and the usual mistakes, such as averaging group means without weighting by group size.

Follow-up Questions Guidance

  • State the law of total variance and compute it for the coin-and-dice example.
  • The number of customers per day has mean 200, and each customer spends an amount with mean $30. What is the expected daily revenue, and what assumption does that calculation need?
  • Why is E[X∣Y]E[X \mid Y] the best predictor of XX from YY under squared error?
  • Overall conversion fell even though conversion rose in every segment. How does the law of total expectation explain that?