Packages like Mathematica have built in procedures to deal with
distributions. The illustrtation for one of the distributed texts
was done with the following lines:
<Identity],
Plot[CDF[distr, x],{x,-5,5},
DisplayFunction->Identity]},
DisplayFunction->$DisplayFunction]];
PlotPDFandCDFArcSin:=
Show[GraphicsArray[
{Plot[1/(N[Pi] Sqrt[x(1-x)]),{x,0.0000001,1-0.0000001},
DisplayFunction->Identity],
Plot[2/N[Pi] ArcSin[Sqrt[x]],{x,0,1},
DisplayFunction->Identity]},
DisplayFunction->$DisplayFunction]];
ErlangDistribution=GammaDistribution;
Display["!psfix -land>cdist01.ps",PlotPDFandCDF[UniformDistribution[-3,3]]];
Display["!psfix -land>cdist02.ps",PlotPDFandCDF[ExponentialDistribution[2]]];
Display["!psfix -land>cdist03.ps",PlotPDFandCDF[NormalDistribution[0,1]]];
Display["!psfix -land>cdist04.ps",PlotPDFandCDF[LogNormalDistribution[0,1]]];
Display["!psfix -land>cdist05.ps",PlotPDFandCDF[GammaDistribution[2,3]]];
Display["!psfix -land>cdist06.ps",PlotPDFandCDF[ChiDistribution[5]]];
Display["!psfix -land>cdist07.ps",PlotPDFandCDF[WeibullDistribution[1,2]]];
Display["!psfix -land>cdist08.ps",PlotPDFandCDF[ErlangDistribution[1,3]]];
Display["!psfix -land>cdist09.ps",PlotPDFandCDF[CauchyDistribution[0,2]]];
Display["!psfix -land>cdist10.ps",PlotPDFandCDFArcSin];