Solution (source code)

= Solution

For a <moment> of order $q$ with $\theta+q>-1$, integration of the <probability density function> gives
$$
\mathbb E[X^q]=(\theta+1)\int_0^1x^{\theta+q}\,dx=\frac{\theta+1}{\theta+q+1}.
$$
Thus the <expected value> and <variance> are
$$
\boxed{\mathbb E[X]=\frac{\theta+1}{\theta+2}},\qquad
\operatorname{Var}(X)=\frac{\theta+1}{\theta+3}-\left(\frac{\theta+1}{\theta+2}\right)^2
=\boxed{\frac{\theta+1}{(\theta+3)(\theta+2)^2}}.
$$
The <cumulative distribution function> on $(0,1)$ is $F(x)=x^{\theta+1}$. Its unique <median> $m$ satisfies $F(m)=1/2$, giving
$$
\boxed{m=2^{-1/(\theta+1)}}.
$$