Expected value of the log of a uniform distribution

1. Aug 24, 2010

Gekko

1. The problem statement, all variables and given/known data

How to calculate the expected value of the log of a uniform distribution?

2. Relevant equations

E[X] where X=ln(U(0,1))

3. The attempt at a solution

integral from 0 to 1 of a.ln(a) da where a = U(0,1)
= -1/4

However I know the answer is -1

2. Aug 24, 2010

8daysAweek

Why do you integrate over $$a \cdot ln(a)$$?

3. Aug 24, 2010

Gekko

Yes, thats not right I see.

I used this approach instead. To find the first moment of a uniform distribution it is:

1/(b-a) * integral from a to b of x

In this case it is

1/(b-a) * integral from a to b of ln(x)

Is this ok?

This approach calculates the correct value for expected value and variance

Last edited: Aug 24, 2010
4. Aug 24, 2010

vela

Staff Emeritus
Yup, that's the correct method.