Calculating E(g(X)) for a continuous random variable — 9231 FPS
Normalise a density and compute probabilities and moments by integration. Find a transformed distribution through its CDF and support.
Notes and key methods
A density f is nonnegative and integrates to one over its support. Probabilities are areas: \(P(a<X<b)=\int_a^b f(x)\,dx\). A density may be larger than 1; a probability cannot.
Use \(E(X)=\int xf(x)\,dx\), \(E(X^2)=\int x^2f(x)\,dx\) and \(\operatorname{Var}(X)=E(X^2)-E(X)^2\). A median m solves \(\displaystyle \int_{- \infty }^{m} f(x)\, dx= \frac{1}{2}\).
To find the distribution of \(\displaystyle Y=g(X)\), first determine its support and write \(F_Y(y)=P(g(X)\le y)\). On a monotone increasing branch, invert g to obtain \(F_X(g^{-1}(y))\), then differentiate.
A decreasing transformation reverses the inequality. If g is not one-to-one, collect every inverse branch that contributes. The Jacobian formula uses the absolute derivative of the inverse.
Check the conditions
State the full support and put \(\displaystyle f(x)=0\) outside it.
The density must be nonnegative throughout its support.
A single inverse branch is valid only on a monotone support.
The new support must be stated before integrating or differentiating.
Three worked examples
Example 1 · Continuous densities and moments
X has density \(f(x)=kx^{1}\) for \(0\le x\le 5\) and zero elsewhere.
Use the labelled scales alongside the numerical method.
Example 2 · Transformations of continuous variables
X has density \(\displaystyle \frac{2x}{36}\) on \(0\le x\le 6\). Define \(\displaystyle Y=X^{2}\). For \(0\le y\le 36\), \(\displaystyle F_{Y}(y)= P(X\le \sqrt{y})= \frac{y}{36}\).