JoyDivisionMan

60 Reputation

3 Badges

5 years, 117 days

MaplePrimes Activity


These are questions asked by JoyDivisionMan

I have two random variables:  x and y.  I want to multiply them and get the resulting Probability Density Function, z.  If you look below, Example 1 works as expected.  When I try Example 2, however, I get disappointing results.

Clearly, Example 2 involves nonzero lower boundaries, which is messing me up.  Does anyone have any suggestions for Example 2?

Example 1

with(Statistics)

x := RandomVariable(Uniform(0, 1))

_R

(1)

y := RandomVariable(Uniform(0, 2))

_R0

(2)

z = PDF(x*y, t)

z = piecewise(t < 0, 0, t <= 2, (1/2)*ln(2)-(1/2)*ln(t), 2 < t, 0)

(3)

 

 

Example 2

x := RandomVariable(Uniform(1, 2))

_R1

(4)

y := RandomVariable(Uniform(2, 3))

_R2

(5)

z := PDF(x*y, t)

int(piecewise(_t < 1, 0, _t < 2, 1, 2 <= _t, 0)*piecewise(t/_t < 2, 0, t/_t < 3, 1, 0)/abs(_t), _t = -infinity .. infinity)

(6)
 

NULL

Download MultiplyPDFFunctions.mw

I have a random variable called Y1, which looks like the following: Y1 = 2*sqrt(1 - x^2)/Pi, on the (-1 < x < 1) interval. This "semicircle" integrates to 1, like other random variables. Random variable Y2 is the same as Y1 above. I want to find the random variable Z, which is equal to the absolute difference of two random variables Y1 and Y2. In other words, I want to find Z = |Y1 - Y2|. Via simulation, I know that |Y1 - Y2| takes on a logrithmic form, but I need to get a mathematical solution of this.

I am interested in determining the density function which results from multiplying two random variables.  I have read about the Mellin Transformation, but I just end up confused.  I have two random variables:  f[1], which is nonzero on the 0 < t < 2 interval, and f[2], which is nonzero on the 0 < t < 1 interval.  Of course, both of these random variables sum to one when evaluated.

Any thoughts on how I can obtain the density function for this?  My work is below.

restart

with(Statistics)

f[1] := piecewise(t <= 0, 0, 0 < t and t < 2, 1/(Pi*sqrt(1-(1-t)^2)), t >= 2, 0)

piecewise(t <= 0, 0, 0 < t and t < 2, 1/(Pi*(1-(1-t)^2)^(1/2)), 2 <= t, 0)

f[2] := piecewise(t <= 0, 0, 0 < t and t < 1, 2*t, t >= 1, 0)

piecewise(t <= 0, 0, 0 < t and t < 1, 2*t, 1 <= t, 0)


Download Inquiry.mw

Greetings,

I have generated two random points in the unit square.  Each point has an x and y coordinate.  The density function for the (absolute) distance between each point is (2-2d) in both the x and y direction.  These distances are shown by the "f" and "g" functions attached.

The overall (rectilinear) difference is what I am after.  The attached worksheet shows the rectilinear distance as "h".  

My question is this...how can I obtain this rectilinear distance by using convolution and the "starting" density function of (2-2d) ? 

This is probably more of a mathematics function than a Maple question, but the "rules" of convolution, particularly setting the upper and lower boundaries of the integrals confuse me.

 

DensityFunction.mw

I constructed a density function, and I am certain it shows me what I want.  The problem I am having is parsing the Elliptic functions. Is there a way to "get rid" of the ones I don't want or need.

I generated a plot of the function -- the plot tells me what I expected based on simulation. I need to know if there is a way to express the density function (y) as a function of t and without the elliptic functions..  Even a numerical solution would be fine.

I assume the denomenator term is correct. I also assume that I don't need complex values. My input file is below.

Basics.mw

1 2 3 Page 1 of 3