mathStatica adds about 100 new functions to Mathematica. But most of the time, we can get by with just four of them:
Table 1: Core functions for a random variable with density
This ability to handle plotting, expectations, probability, and transformations, with just four functions, makes the mathStatica system very easy to use, even for those not familiar with Mathematica.
To illustrate, let us suppose the continuous random variable has probability density function (pdf)
We enter this as:
This is known as the Arc--Sine distribution. Here is a plot of :
Fig. 1: The Arc-Sine pdf
Here is the cumulative distribution function (cdf), , which also provides the clue to the naming of this distribution:
The mean, , is:
while the variance of is:
The moment of is :
Now consider the transformation to a new random variable such that . By using the Transform and TransformExtremum functions, the pdf of , say , and the domain of its support can be found:
So, we have started out with a quite arbitrary pdf , transformed it to a new one , and since both density g and its domain have been entered into Mathematica, we can also apply the mathStatica tool set to density . For example, use PlotDensity[g] to plot the pdf of .