THIS IS AN EXTENDED COMMENT
Clear["Global`*"]
distx3[a_] = ProbabilityDistribution[
Piecewise[{{a E^x, x <= 1}}, 3 (1 - a E) x^-4], {x, -∞, ∞}];
Plotting the PDF
of the this distribution
Plot3D[PDF[distx3[a], x],
{x, -3, 5}, {a, -4, 4},
PlotPoints -> 50,
MaxRecursion -> 3,
ClippingStyle -> None,
AxesLabel -> (Style[#, 14] & /@ {x, a, PDF})]
Since a PDF
cannot be negative, the distribution must be redefined to exclude the regions where the function is negative.
distx2[a_] = ProbabilityDistribution[
Piecewise[{{a E^x, x <= 1 && a > 0},
{3 (1 - a E) x^-4, x > 1 && a < 0}}], {x, -∞, ∞}];
However, this is not normalized:
Assuming[a > 0,
Integrate[PDF[distx2[a] // Simplify, x], {x, -Infinity, Infinity}]]
(* a E *)
Assuming[a < 0,
Integrate[PDF[distx2[a] // Simplify, x], {x, -Infinity, Infinity}]]
(* 1 - a E *)
Normalizing the distribution gives
distx[a_] = ProbabilityDistribution[
Piecewise[{{E^(x - 1), x <= 1 && a > 0},
{3 x^-4, x > 1 && a < 0}}], {x, -∞, ∞}];
Plot3D[PDF[distx[a], x],
{x, -3, 5}, {a, -4, 4},
PlotPoints -> 50,
MaxRecursion -> 3,
ClippingStyle -> None,
AxesLabel -> (Style[#, 14] & /@ {x, a, PDF})]
disty[a_] = TransformedDistribution[x^3, Distributed[x, distx[a]]];
PDF[disty[a], y]
Plot3D[Evaluate@PDF[disty[a], y],
{y, -3, 5}, {a, -4, 4},
PlotRange -> {0, 2},
PlotPoints -> 75,
MaxRecursion -> 4,
ClippingStyle -> None,
AxesLabel -> (Style[#, 14] & /@ {y, a, PDF})]
Integrate[Piecewise[{{a E^x, x <= 1}}, 3 (1 - a E) x^-4], {x, -∞, ∞}]
gives 1 for every value of $a$. $\endgroup$a>=0,a<=1/E
. $\endgroup$