Calculating the n-th moment of a RV, including negative fractional moments I am stuck trying to solve the following exercise..
Let $X: \Omega\to [a,b] \subset \mathbb R$ be a uniformly distributed random variable. Compute the n-th moment of $X$, i.e. compute $\mathbb E[X^n]$ for any $n > −1.$ (note that you should also include negative fractional moments!
The fact that n can be smaller than 0 is making it very difficult for me to understand what I am supposed to do.. Any help?

You can work this out by evaluating the integral directly.
$$
\mathbb{E}(X^n) = \int_{-\infty}^{\infty} x^n f_X(x)dx = 
\int_{a}^{b} x^n \frac{1}{b-a}dx = \ldots
$$
As long as the interval $[a,b]$ does not include 0, you won't have an issue.
Can you see why we need $n>-1$?
