# Let `X` be a continuous random variable and let `a` be a ``constant. Using the result that `E[g(X)] = g(E[X])` if the function `g(x)` is linear, show that `E[a] = a`

### 1 Answer | Add Yours

Using the fact the expected value operator E(X) is linear we have that

`E[g(X) ] = g(E[X])`

if `g(x)` is a linear function.

In this case we are given that `g(x) = a` so that

`E[g(X)] = g(E[X]) = a`

This can be demonstrated using the definition of expectation:

`E[g(X)] = int g(x) f(x) dx`

where `f(x)` is the probability density function of the random variable `x`.

If `g(x) = a` then

`E[g(X)] = int a f(x) dx = a int f(x) dx` (since the constant `a` can be taken outside the integral.

Now, as `f(x)` is a probability density function, we must have that it integrates to` ` 1 so that

`int f(x) dx = 1`

Therefore, `E[g(X)] = a . 1 = a`

**Answer**

**`E[g(X)] = a` if `g(x) = a` **