# Mean and varince of Log(X) Where X~U[1,0]

1. Nov 10, 2009

### rosh300

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

find the mean and varince of Log(X) Where X~U[1,0] (X is continuous Random variable)

2. Relevant equations
$$\mathbb{E}(X) = \int_{-\infity}^{\infity}{x f_X(x)} dx$$

$$\mathbb{E}(X^2) = \int_{-\infity}^{\infity}{x^2 f_X(x)} dx$$

$$Var(X) = \mathbb{E}(X^2) - (\mathbb{E}(X))^2$$

3. The attempt at a solution
$$\mathbb{E}[log(x)] = \int_0^1{xlog(x)} = \frac{-1}{4}$$
$$\mathbb{E}[log(x)^2] = \int_0^1{x^2log(x)} = \frac{-1}{9}$$
$$Var(X) = \mathbb{E}[log(x)^2] - \mathbb{E}[log(x)]^2 = \frac{-25}{144}$$

but i know variance cant be negative

2. Nov 10, 2009

### lanedance

you're right, variance can't be negative

not too sure what you've done, but i think you've assumed $f_{log(X)}(log(X)=x) = log(x)$ which doesn't make any sense... in fact over the given domain log(X) is negative, which doesn't make sense for a pdf, and isn't normalised

So first, define the random variable Y, related to X by
Y = log(X)

you then need to find the probabilty distrubution g(y).dy. It can be related to the original f(x), by

g(y).dy = f(x).dx
where the dy & dx are related

once you have that
$$E[log(X)] = E[Y] = \int{g(y)}dy$$

and so on, note the lmits of the pdf of y, g(y) wll be realte to the orginal x values, but not necessarily the same

Last edited: Nov 10, 2009
3. Nov 10, 2009

### rosh300

i think i get it now
let:$$f(x) = 1 \mbox{(the pdf for U[0,1]), }g(y) = e^y = x \Rightarrow \frac{dx}{dy} = e^y, f(g(y)) = 1$$

this gives you $$f_x(x) = \int_0^1{1 dx} = \int_{log(0)}^{log(1)}{e^y dy} = \int^0_{-\infty}e^y dy$$
get the pdf fo y from that and use the def/formula for mean and varaince.

it seems so simple thanks

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook