Let $X \sim U(0,1)$ be uniformly distributed on $(0,1)$ and let $Y \equiv -\frac{1}{\lambda} \log X$ and $\lambda > 0$.
I want to compute the distribution of $Y$.
Attempt:
I tried to use the "change-of-variable"-method.
Let $\mathbb{E}[h(Y)] = \mathbb{E}[h(-\frac{1}{\lambda} \log X)] = \int_0^1 h(-\frac{1}{\lambda} \log x) dx$.
Now substituting $u= -\frac{1}{\lambda} \log x \iff x = e^{-u\lambda}$ and $dx = -du \lambda x$
$\implies \int_0^1 -h(u)du\lambda e^{-u \lambda}$.
Now as I see it the distribution should now be $-\lambda e^{-u\lambda}$.
But the distribution should be exponential hence $\lambda e^{-u \lambda}. $
I'm a bit confused. The minus sign does matter in terms of distribution, right?And is it correct that in this case distribution as well as density are the same?
You forgot to change the bounds. When $x\to0$ you have $u\to+\infty$ and when $x=1$ you have $u=0$, hence $$ \int_0^1h\left(-\frac1\lambda\log x\right)\,dx=\int_{+\infty}^0-h(u)\lambda\exp(-u\lambda)\,du=\int_0^{+\infty}h(u)\lambda\exp(-u\lambda)\,du. $$ and now you find a meaningful distribution.