For a continuous random variable with probability density function , its mean is
provided . Its variance is the expectation of the squared deviation from its mean:
This is finite when ; otherwise it may be if the finite mean exists.