Probability for a uniform distribution: mean and varience I am stuck on a question and don't know how the textbook got the answer. Please help: "The random variable $X$ has a uniform distribution on $[0,1]$, find the mean and variance of the variable $P:=4(1-X^2)^{0.5}$ ". They got the answer for the mean as $\pi$, please explain how??
 A: In general, let $X$ be a random variable with density function $f_X(x)$, and let $Y=g(X)$. Then the mean of $Y$ is given by
$$E(Y)=\int_{-\infty}^{\infty} g(x)f_X(x)\,dx.$$
In our case, $f_X(x)=1$ on $[0,1]$, and $0$ elsewhere, and $g(x)=4\sqrt{1-x^2}$.
We can evaluate the integral by noting that $\int_0^1 \sqrt{1-x^2}\,dx$ is the integral for the area of a quarter circle of radius $1$.
For the variance of $P$, use the fact that $\text{Var}(W)=E(W^2)-(E(W))^2$. We already know that $E(P)=\pi$.
To find $E(P^2)$, use the fact that $P^2=16(1-X^2)$. Thus
$$E(P^2)=\int_0^1 16(1-x^2)\,dx.$$
A: p(x) = 1 (the pdf, because it's constant and the length of the region is $1$, therefore $\int_0^1 dx = 1$ gives the proper overall probability of $1$), therefore the mean is simply:
$$
[P] = \int\limits_0^1 P(x)dx = 4\int\limits_0^1 \sqrt{1 - x^2}dx
$$
Do you really want to take the integral?  It requires a trig-substitution, otherwise, you can just consult a table of integrals, or better yet, Wolfram:
$$
\int \sqrt{1 - x^2}dx = \frac{1}{2}\left(x\sqrt{1 - x^2} + \sin^{-1}(x)\right) + C
$$
Now just evaluate from $0$ to $1$:
$$
4\int\limits_0^1 \sqrt{1 - x^2}dx = 2\left.\left(x\sqrt{1 - x^2} + \sin^{-1}(x)\right)\right|_0^1 = 2\left(\sin^{-1}(1) - \sin^{-1}(0)\right)
$$
$\sin(0) = 0$ therefore $\sin^{-1}(0) = 0$ and $\sin\left(\frac{\pi}{2}\right) = 1$ so $\sin^{-1}(1) = \frac{\pi}{2}$.  So the integral is just $2\frac{\pi}{2} = \pi$
