I am unable to get Mathematica to return the CDF of a distribution produced by TransformedDistribution. It "executes" for 6 hours on my machine and then returns a blank plot. Could someone execute the code below and explain why this is happening and offer a solution ? Is there something wrong with my code ?
beg = AbsoluteTime[];
dist1 = ExponentialDistribution[0.1];
pdf1 = PDF[dist1, x];
cdf1 = CDF[dist1, x];
plot1 = Plot[pdf1, {x, 0, 100}, Frame -> True,
FrameLabel -> {"X", "PDF"}, PlotLabel -> "PDF of X (dist1)",
PlotStyle -> Red, PlotRange -> All]
plot2 = Plot[cdf1, {x, 0, 100}, Frame -> True,
FrameLabel -> {"X", "CDF"}, PlotLabel -> "CDF of X (dist1)",
PlotStyle -> Red, PlotRange -> All]
dist2 = NormalDistribution[53, 2.4];
pdf2 = PDF[dist2, x];
cdf2 = CDF[dist2, x];
plot3 = Plot[pdf2, {x, 0, 100}, Frame -> True,
FrameLabel -> {"X", "PDF"}, PlotLabel -> "PDF of X (dist2)",
PlotStyle -> Red, PlotRange -> All]
plot4 = Plot[cdf2, {x, 0, 100}, Frame -> True,
FrameLabel -> {"X", "CDF"}, PlotLabel -> "CDF of X (dist2)",
PlotStyle -> Red, PlotRange -> All]
end = AbsoluteTime[];
executiontime = (end - beg)/60 (* minutes *)
Here is the output, so far so good.
Now here is where the problem is.
beg = AbsoluteTime[];
dist3 = TransformedDistribution[
a + b, {a \[Distributed] dist1, b \[Distributed] dist2}]
pdf3 = PDF[dist3, x];
cdf3 = CDF[dist3, x];
plot5 = Plot[pdf3, {x, 0, 100}, Frame -> True,
FrameLabel -> {"X", "PDF"}, PlotLabel -> "PDF of X (dist3)",
PlotStyle -> Red, PlotRange -> All]
plot6 = Plot[cdf3, {x, 0, 100}, Frame -> True,
FrameLabel -> {"X", "CDF"}, PlotLabel -> "CDF of X (dist3)",
PlotStyle -> Red, PlotRange -> All]
end = AbsoluteTime[];
executiontime = (end - beg)/60 (* minutes *)
And here is the output.
Thanks for any help.