# The law of the unconscious statistician

In Casella and Berger's Statistical Inference (2nd edition) it says at the start of section 2.2 (page 55) when defining expectations that

If $\mathrm{E} \,|g(X)| = \infty$ we say that $\mathrm{E} \,g(X)$ does not exists. (Ross 1988 refers to this as the "law of the unconscious statistician." We do not find this amusing.)

Why

• would one call this the "law of the unconscious statistician"? Perhaps it is that I'm not a native speaker of English, but I have really no idea what being "unconscious" has to do with defining existence of expectations.

• can this be (or not be) considered amusing?

• Maybe it's because if you're unconscious, you don't have any expectations (in the usual, psychological sense). Oct 27, 2015 at 21:06
• Well, I'd have said the law of the unconscious statistician was "$E[g(X)]=\int_{\mathbb R} g(X)f_X(x)dx$". Never been clear why it was called that...always thought it was because it let you do the computation without ever thinking through the distribution of $g(X)$. Don't hear the term much any more. Don't see why it might be either amusing or otherwise.
– lulu
Oct 27, 2015 at 21:08
• Note: I have at least some support for my use of the term en.wikipedia.org/wiki/Law_of_the_unconscious_statistician
– lulu
Oct 27, 2015 at 21:10
• @lulu: The talk of the wikipedia page you've liked offers some insight on the naming of this theorem: see DeGroot and Schervish, p. 214, first paragraph. "Theorem 4.1.1 is called the law of the unconscious statistician because many people treat equations (4.1.9) and (4.1.10) as the definition of E[r(X)] and forget that the definition of the mean of Y=r(X) is given in Definitions 4.1.2 and 4.1.4." While I don't have the precise citation here, it's save to assume that $r=g$ and that the definitions refer to the definition of the mean of a random variable Y in this case and a R.V. given by Y=r(X) Jan 4, 2016 at 14:49
• I've always wondered this myself. Thanks for asking it. Jan 5, 2016 at 20:33

In his lectures on probability, Blitzstein gives the following explanation:

Say you've computed $E(X)$ for some continuous distribution $X$:

$$E(X) = \int_{-\infty}^{\infty} x f_x(x) dx$$

where $f_x(x)$ is the PDF for $X$. Now you're looking to compute the variance: $E(X^2) - [E(X)]^2$.

Now you need to compute $E(X^2)$, which is the expected value of a new distribution, $Y = X^2$:

$$E(X^2) = E(Y) = \int_{-\infty}^{\infty} y f_y(y) dx$$

Well the unconscious statistician doesn't feel like computing another PDF $f_y$... so instead just reasons by analogy that if $E(X) = \int_{-\infty}^{\infty} x f_x(x) dx$ then surely he can simply replace the x with an $x^2$:

$$E(X^2) = \int_{-\infty}^{\infty} x^2 f_x(x) dx$$

Well that doesn't sound very legitimate! It looks like something he'd derive if he were half asleep or even drunk, but in general, this laziness turns out to be true:

$$E(g(x)) = \int_{-\infty}^{\infty} g(x) f_x(x) dx$$

The "law of the unconscious statistician" refers to the theorem :

$$E[g(X)] = \int\limits_R g(X)f_X(x) dx$$

According to this forum, the theorem name comes from the fact that some statisticians present this as the definition of the expected value rather than a theorem. It seems that some statisticians did not like the name (including Casella and Berger's, I guess) and it was removed in later editions of the book.

• The name is pretty reasonable --- many statisticians are indeed unaware that this result requires a theorem.
– Ben
Feb 8, 2021 at 0:58
• Probably because it is often introduced earlier than substitutions for changes of variables. Finding the variance of a uniform distribution on $[a,b]$ by using $\int_a^b (x-\frac{a+b}{2})^2\, \frac1{b-a}\, dx$ is much easier than finding the density of $y= (x-\frac{a+b}{2})^2$ and then $\int_0^{((a+b)/2)^2} y \,f(y) \, dy$ Dec 6, 2021 at 2:18

This may be total nuts but "infinite" in Russian is "бес-конечный", its opposite "конечный" [kɐˈnʲet͡ɕnɨj] and it sounds as "conscious" /kŏnʹshəs/. Infinite thus can be related to unconscious. So may be this is an obscure way to make fun of a fellow Russian. Some have made great contribution to the Statistics like Komogorow or Smirnov of Kolmogorov–Smirnov test fame I just want to add this here as even if that's not the true explanation it could very well be. Some may find it not amusing, however.

• I disagree. This is an answer to why one call this the "law of the unconscious statistician". Jan 11, 2016 at 3:32
• I do not understand this answer. Why would finite or infinite be connected with the name? And what factual support is there for this opinion? Oct 16, 2020 at 7:35
• Why did this get voted up? You pointed out a potential joke, yet failed to explain what the joke could be (at least from your perspective). For example, if it's a jab at Russians, what is it jabbing at? Do you know how many phonetically similar words there are between Russian and English? There are even more if you go out of your way to imagine them to be similar. Mar 24 at 12:22