Probability Density Function of a Function of a Random Variable

S

sameer_1987

Hello everyone!
I am stuck in my research with a probability density function problem..
I have 'Alpha' which is a random variable from 0-180. Alpha has a uniform pdf equal to 1/180.
Now, 'Phi' is a function of 'Alpha' and the relation is given by,
Phi = (-0.000001274370471*Alpha^4) + (0.000393888213304*Alpha^3) - (0.037767210716686*Alpha^2) + (1.66089231837634*Alpha) - 5.83257204679921
I am trying to find the PDF or CDF of 'Phi' but having a hard time in doing that..

Any help will be greatly appreciated!

Thanks.

H

Hodgepodge

Hello everyone!
I am stuck in my research with a probability density function problem..
I have 'Alpha' which is a random variable from 0-180. Alpha has a uniform pdf equal to 1/180.
Now, 'Phi' is a function of 'Alpha' and the relation is given by,
Phi = (-0.000001274370471*Alpha^4) + (0.000393888213304*Alpha^3) - (0.037767210716686*Alpha^2) + (1.66089231837634*Alpha) - 5.83257204679921
I am trying to find the PDF or CDF of 'Phi' but having a hard time in doing that..

Any help will be greatly appreciated!

Thanks.
Hopefully this will get you started in the right direction.

Check here and choose the 7th item for a brief tutorial. It's the one from Fullerton.edu.

Attachments

• 114.5 KB Views: 127
S

sameer_1987

Hi Hodgepodge,
I saw the power point file. The part of the problem is that 'Phi' is not normally distributed. I realized that by calculating the histogram of Phi. Therefore, maybe I first need to calculate the CDF of Phi and then PDF can be found by differentiating the CDF. But I am not sure how to go about that.

Thanks

Tim Folkerts

Trusted Information Resource
I used a spreadsheet to calculate the value of phi as a function of alpha. (A few of the first points are negative, so I arbitrarily set them to zero, since a probability cannot be negative).

For this to represent a probability, the total of these values for Phi (as alpha goes from 0-180) should equal 1. In reality, the sum is 7674. So if all the values for Phi are divided by 7674, then it is a proper probability density function. The cumulative distribution would then be the integral of Phi, which can be approximated very well in a spreadsheet by simply adding up the values of Phi from zero to any given angle.

At least that is my take after a few minutes' thought.

Attachments

• 60.5 KB Views: 109
H

Hodgepodge

Hi Hodgepodge,
I saw the power point file. The part of the problem is that 'Phi' is not normally distributed. I realized that by calculating the histogram of Phi. Therefore, maybe I first need to calculate the CDF of Phi and then PDF can be found by differentiating the CDF. But I am not sure how to go about that.

Thanks
Non-normal distribution...is beyond me. Hopefully some of the big brains here can help.

Best regards,
H

Tim Folkerts

Trusted Information Resource
PS You could also integrate the polynomial for phi from 0 to 180 and see what you get (I get ~ 7660) (and again, you have to watch out for the first few values that are negative). This confirms the the spreadsheet is on the right track.

Steve Prevette

Deming Disciple
Staff member
Super Moderator
Best thing at this point is to brute force Monte Carlo simulate it.

Determine the reverse cdf for the origninal function

Generate LOTS (thousands) of random numbers between 0 and 1 (easily done on an Excel spreadsheet).

Apply the reverse CDF to the 0 to 1 random numbers

Apply the transformation function

Make a histogram of the results.

S

sameer_1987

Best thing at this point is to brute force Monte Carlo simulate it.

Determine the reverse cdf for the origninal function

Generate LOTS (thousands) of random numbers between 0 and 1 (easily done on an Excel spreadsheet).

Apply the reverse CDF to the 0 to 1 random numbers

Apply the transformation function

Make a histogram of the results.
Thanks Steve,
but the problem is to find the inverse. i.e to find alpha in terms of phi..since its a 4th order polynomial...

Steve Prevette

Deming Disciple
Staff member
Super Moderator
Thanks Steve,
but the problem is to find the inverse. i.e to find alpha in terms of phi..since its a 4th order polynomial...
Actually the inverse is VERY easy. The statement is that it is a uniform random number from 1 to 180. Generate in Excel thousands of lines of =Rand() * 180. Then execute the formula to each line. Then accumulate as a histogram.

Tim Folkerts

Trusted Information Resource
It looks like I was answering a slightly different question before. And now I like the approach Steve posted. Either select a large number of random numbers between 0-180 or select a large number of uniformly spaced numbers between 0-180. Then make the histogram and fit some function to the results. (I actually redid the spreadsheet to do this and the plot is rather nice, with peaks near 23.5 and 79. Finding an actual function to approximate this could be a trick)

PS. Wolfram alpha is a handy site for all sorts of math. It actually finds the inverse of the function, but the answer is a HUGE mess!

http://www.wolframalpha.com/input/?...^2)+++(1.66089231837634*x)+-+5.83257204679921