If \(X\) is a continuous random variable with probability density function \(\mathrm{f}(x)\), then the expectation (mean) of \(X\) is \(\mu\) or \(\mathrm{E}(X)\) given by
\[\mu = \mathrm{E}(X) = \int_{\text{all}\hspace{0.5em} x} x \mathrm{f}(x) \, \mathrm{d}x.\]
If \(\mathrm{g}(x)\) is any function of \(X\), then we have
\[ \mathrm{E}[\mathrm{g}(x)] = \int_{\text{all}\hspace{0.5em} x} \mathrm{g}(x)\mathrm{f}(x) \, \mathrm{d}x. \]
In particular, we have \(\mathrm{E}(X^2) = \int_{\text{all}\hspace{0.5em} x} x^2 \mathrm{f}(x) \, \mathrm{d}x.\)
Note: Recall that \(\mathrm{Var}(X) = \mathrm{E}(X^2) - [\mathrm{E}(X)]^2.\)
Create a free account to practise similar questions.
Need help? Join our JC Math tuition classes.
Learn more