# Properties of expectations

## Contents

# Properties of expectations¶

There are few very important properties that expectations satisfy. Let’s introduce them one by one. In what follows \(X\) is a random variable, either discrete or continuous.

## Expectation Property 1: The expectation of a scalar times a random variable¶

Take any scalar \(\lambda\). Then:

The proof is super easy. It follows directly from the properties of integrals and summations.

## Expectation Property 2: The expectation of a function of a random variable¶

Let \(f(x)\) be any function defined over the support of the random variable \(X\). Then:

is a new random variable. It is just a random variable that is induced by transforming the values generated by \(X\) through the function \(f(x)\). Then, the expectation of \(Z\) is:

Note

We will not prove this property. The proof is non-trivial and requires expressing the PDF of \(Z=f(X)\) in terms of the PDF of \(X\). Because people tend to take this property for granted, it is known as the law of the unconscious statistician…

This formula is, of course, extremely convenient for calculating expectations of functions of random variables. Let’s see an example. Assume that \(X\) is a uniform:

Then:

Similarly,

And so on and so forth.

Warning

I have to say this because I have seen it many times… You may get the urge to write:

Please don’t. This formula does not hold unless \(f(x)\) is a linear function (i.e., \(f(x) = ax + b\)).

Things are way more complicated than this. For example, for convex functions you have that:

For concave functions you have the opposite inequality. For arbitrary functions it could go in any direction.

## Expectation Property 3: The expectation of a random variable plus a scalar¶

This property is a direct corollary of the second property, but it is worth spelling it out on its own. Take a scalar \(\lambda\). Then:

The property makes a lot of intuitive sense.

Let’s actually do the proof of this one. We have: