Solution
= Solution
For a <probability density function> $P$, the <mean> and <variance> are
$$
\boxed{\mu=\int_{-\infty}^\infty xP(x)dx,\qquad \sigma^2=\int_{-\infty}^\infty(x-\mu)^2P(x)dx=\mathbb E[X^2]-\mu^2.}
$$
These formulas assume the required <moments> are finite; finiteness of the second moment ensures a finite mean as well.