Example:     Product of Pareto and Uniform           New in mathStatica 2.0

Let random variable X ∼ Pareto(a, b) with pdf f(x):

In[1]:= TransformProduct_3.gif


and let random variable Y ∼ Uniform(α, β) with pdf g(y):

In[2]:= TransformProduct_4.gif

 

Problem:  Find the pdf of V = X Y, denoted h(v).
 
Solution:  The solution is simply:


In3]:= TransformProduct_5.gif

 

Out[3]= TransformProduct_6.gif

 

A quick Monte Carlo ‘check’ of the exact solution we have just derived:
It is always a good idea to check that a theoretical solution that has been derived is consistent with pseudo-random data. To illustrate, let us suppose that (a=2, b=3, α=1, β=4). To perform a quick Monte Carlo check, we first generate 100000 pseudo-random drawings of X, and 100000 pseudo-random drawings of Y:


In[4]:= TransformProduct_7.gif

 

We now make a frequency plot of the product of the X and Y pseudo-random data, and then compare the pseudo-random Monte Carlo solution () with the theoretical symbolic solution h(v) () derived above:


In[5]:= TransformProduct_9.gif

 

Out5= TransformProduct_10.gif

Looks good!

 

Example:     Product of two Standardised Normals           New in mathStatica 2.0

Let random variable XN(0,1) with pdf f(x):

In[1]:= TransformProduct_14.gif


The pdf of the product of two standardised Normals can then be elegantly derived via:


In[2]:= TransformProduct_15.gif


Out[2]= TransformProduct_16.gif



Example:       Product of Two Triangulars           New in mathStatica 2.0

Let random variable X ∼ Triangular(-1/2, 1, 2) with pdf f(x):

In[1]=

 

and let random variable Y ∼ Triangular(-1, 2, 3) with pdf g(y):

In[2]=

 

The following diagram plots the pdf of both f(x) ()  and  g(y) ():

TransformProduct_24.gif

 

Problem: Find the pdf of V = X*Y     (i.e. the pdf of the product of the two random variables).
 
Solution: Here is the solution pdf, say h(v):

In[3]:= TransformProduct_25.gif

Out[3]= TransformProduct_26.gif


 

In[4]:= TransformProduct_27.gif

 

The solution has a piecewise form. Here is a plot of the solution pdf:


In[5]:= TransformProduct_28.gif

Out[5]= TransformProduct_29.gif


 

A quick Monte Carlo ‘check’ of the exact solution we have just plotted:
It is always a good idea to check that a theoretical solution that has been derived is consistent with pseudo-random data. Here, we generate 100000 pseudo-random drawings of X and 100000 pseudo-random drawings of Y:

In[7]:=

We can now make a frequency plot of the product of the X and Y pseudo-random data, and then compare the pseudo-random Monte Carlo solution () with the theoretical symbolic solution h(v) () derived above:

In[8]:= TransformProduct_32.gif

Out[8]= TransformProduct_33.gif

For the win!