What is the law of the unconscious statistician and how do you use it to find the expectation of g(X)?

Quick Overview

Asks you to state the law of the unconscious statistician and use it to compute the expectation of a function of a random variable. Tests the discrete and continuous formulas, its use in variance calculations, and why the expectation of g(X) usually differs from g applied to the mean.

What is the law of the unconscious statistician and how do you use it to find the expectation of g(X)?

Role: Data Scientist

Category: Statistics & Math

Difficulty: medium

Interview Round: Other

What is the law of the unconscious statistician, and how do you use it to compute the expectation of a function of a random variable, $E[g(X)]$? ```hint Compare two routes Think about what the definition of expectation would require if you treated $Y = g(X)$ as a new random variable, and whether that step is really needed. ``` ### What a Strong Answer Covers - The statement of the law for discrete and continuous random variables - Why it saves work compared with deriving the distribution of $g(X)$ - A worked example, such as $E[X^2]$ for a fair die and the variance that follows - Why $E[g(X)]$ generally differs from $g(E[X])$, with Jensen's inequality for the direction - When the expectation exists, or how the law extends to functions of several variables ### Follow-up Questions - For $X \sim \text{Uniform}(0, 1)$, compute $E[e^X]$ and compare it with $e^{E[X]}$. - How does the law extend to $E[g(X, Y)]$ for two random variables? - How would you use it to derive the moment generating function of a random variable? - When can $E[g(X)]$ fail to exist even though $X$ has a well-defined distribution?

Overview: Asks you to state the law of the unconscious statistician and use it to compute the expectation of a function of a random variable. Tests the discrete and continuous formulas, its use in variance calculations, and why the expectation of g(X) usually differs from g applied to the mean.

PracHub logo
General
Nov 25, 2026
mediumData ScientistOtherStatistics & Math
0
0

What is the law of the unconscious statistician, and how do you use it to compute the expectation of a function of a random variable, E[g(X)]E[g(X)]?

What a Strong Answer Covers Guidance

  • The statement of the law for discrete and continuous random variables
  • Why it saves work compared with deriving the distribution of g(X)g(X)
  • A worked example, such as E[X2]E[X^2] for a fair die and the variance that follows
  • Why E[g(X)]E[g(X)] generally differs from g(E[X])g(E[X]) , with Jensen's inequality for the direction
  • When the expectation exists, or how the law extends to functions of several variables

Follow-up Questions Guidance

  • For X∼Uniform(0,1)X \sim \text{Uniform}(0, 1) , compute E[eX]E[e^X] and compare it with eE[X]e^{E[X]} .
  • How does the law extend to E[g(X,Y)]E[g(X, Y)] for two random variables?
  • How would you use it to derive the moment generating function of a random variable?
  • When can E[g(X)]E[g(X)] fail to exist even though XX has a well-defined distribution?