I define a function as f[x_] := ...;which is in fact the PDF of a random variable $X$. The PDF if given by $f_X(x)$.

Let $Y$ is a random variable, which is the square of the random variable $X$, i.e., $Y=X^2$.

The PDF of $Y$ is expressed as $f_Y(y)$.

Let $I$ is a function of $Y$, which we express in MMA as I = ... (not as I[y_]:=)

I need to evaluate


How do I do it?

  • 1
    $\begingroup$ Please provide a complete minimal working example. "..." as a function body is useless to readers in general. $\endgroup$ – ciao May 3 '16 at 6:37

I think you almost did right, but you need to give the distribution rather than the PDF of a distribution when evaluating the expectation.

For example:

f[x_] := Sqrt[2]/Pi/(1 + x^4)

distX = ProbabilityDistribution[f[x], {x, -Infinity, Infinity}];
distY = TransformedDistribution[X^2, X \[Distributed] distX];
distI = TransformedDistribution[2 Y + 1, Y \[Distributed] distY];

Exp[-Expectation[II, II \[Distributed] distI]]
(* 1/E^3 *)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.