For a continuous random variable \(X\) with density \(\mathrm{f}\), the mean is the probability-weighted average of its possible values.
\(\mu=\mathrm{E}(X)=\int_{\text{all}\hspace{0.5em}x}x\mathrm{f}(x)\,\mathrm{d}x\), provided the expectation is finite.
For a function \(\mathrm{g}\), apply the function to each value before weighting by the density:
\(\mathrm{E}[\mathrm{g}(X)]=\int_{\text{all}\hspace{0.5em}x}\mathrm{g}(x)\mathrm{f}(x)\,\mathrm{d}x\), provided this expectation is finite.
In particular, \(\mathrm{E}(X^2)=\int_{\text{all}\hspace{0.5em}x}x^2\mathrm{f}(x)\,\mathrm{d}x\). This is generally different from \([\mathrm{E}(X)]^2\).
Integrate over the support of the density. For a piecewise density, add the integrals over its separate intervals.
Create a free account to practise similar questions.
Need help? Join our JC Math tuition classes.
Learn more