# Expectation of Normal Variable

1. Sep 6, 2007

### rwinston

Hi

More of a general integration question, but I just saw the following proof for the derivation of the expectation of a normal variable:

$$E[X] = \frac{1}{\sqrt{2\pi\sigma^2}}\int_{-\infty}^{\infty}{x exp\left( -\frac{1}{2\sigma^2}(x-\mu)^2 \right) dx}$$

Set z=(x-mu):

$$E[X] = \frac{1}{\sqrt{2\pi\sigma^2}}\int_{-\infty}^{\infty}{z exp\left( -\frac{1}{2\sigma^2}z^2 \right) dx} + \mu \frac{1}{\sqrt{2\pi\sigma^2}}\int_{-\infty}^{\infty}{exp\left( -\frac{1}{2\sigma^2}z^2 \right)dx}$$

$$=\mu$$

Now, I dont really understand how this works: if z=x-mu, then I would assume that the term inside the integral becomes:

$$(z+\mu) exp\left( -\frac{1}{2\sigma^2}z^2\right)$$

$$= z \left( exp\left( -\frac{1}{2\sigma^2}z^2 \right) \right) + \mu \left( exp\left( -\frac{1}{2\sigma^2}z^2 \right) \right)$$

However, I dont see how we get two separate integrals, as in the proof above. Can anyone help shed any light on this?

Cheers

2. Sep 6, 2007

### genneth

It's a sum of two terms which need to be integrated, so you can distribute the integration over the summation?

3. Sep 6, 2007

### rwinston

Hmm...I'm still a bit confused tho - I know that you can distribute integration as you have said, as it is a linear operation, but if this was the case, would you have the

$$\frac{1}{\sqrt{2\pi\sigma^2}}$$

term in front of both integrals? I would have thought it was just be in front of the first one?

4. Sep 6, 2007

### matt grime

a(b+c) = ab+ac

you learnt that in kindergarten (albeit not in such an algebraic form).

5. Sep 6, 2007

### rwinston

Got it, thanks :-)