“This law is not a trivial result of definitions as it might at first appear, but rather must be proved.” - Wikipedia

A few days ago I was writing an article titled `On Continuous Distributions’, attempting to expand as much as possible the meaning of the distributions taught in A-level’s Further Mathematics Syllabus. I tried to give a proof for every detail needed to derive the pdfs of the distributions, and one of them was the definition of expectation.

I noticed the textbook wrote, the definition of $E(X)$ is $\int_{-\infty}^\infty x f_X(x) \ dx$ whereas the definition of $E(g(X))$ for some function $g$ is $\int_{-\infty}^\infty g(x) f_X(x) \ dx$. However, this got me wondering: According to the first definition, we can construct the pdf $f_{g(X)}(x)$ of $g(X)$ and then have $E(g(X))=\int_{-\infty}^\infty x f_{g(X)}(x) \ dx$, but this is a different form from the second definition. Unless there is a clear reason why these two forms mean the same thing, I will not accept both definitions if they can potentially clash with each other.

Assume we take the second definition instead, then $E(X)=\int_{-\infty}^\infty x f_X(x) \ dx$ follows immediately, but with this we get that $E(g(X))=\int_{-\infty}^\infty x f_{g(X)}(x) \ dx$ again by replacing $X$ by $g(X)$.

Therefore, I feel there is a need to prove that the two expressions are equal. This situation is similar to how the scalar product is sometimes defined as $x_1y_1+x_2y_2+\cdots$, but is sometimes defined as $|X||Y|\cos \theta$. The difference is, the equivalence between these two statements is quite easy to prove.

After some attempts I couldn’t manage to prove LOTUS completely because things get complicated when $g(X)$ is not bijective. Thus I went online and see if this was well-known, and after some digging, I still couldn’t find anyone giving a complete proof. However, I did find out that this relation has name, which is the Law of the Unconscious Statistician. Wikipedia gives a so-called proof, but it assumes $g(x)$ is bijective and monotonic.

Therefore, I will try to take on the challenge to prove LOTUS completely in this article.

Click here to download, or read it here: