PDF of a function of a random variable - wrong scale?
Mostrar comentarios más antiguos
I have a random variable x, which is log-normally distributed with PDF lognpdf(x, 0,psi*sqrt(rho)).
I also have a function of x, Fx which PDF I want to find; I am using the following theorem and code:

x = 0.5:0.01:2; rho = 0.1; psi = 0.1834;
%Function of a random variable
Fx = logncdf(0.7./x,0,psi*sqrt(1 - rho));
%PDF of a function of a random variable
PDF_Fx = lognpdf(x, 0,psi*sqrt(rho)).*abs(gradient(x,Fx));
%PDF reaches 30
plot(Fx,PDF_Fx); set(gca,'XLim',[0 0.095]);
%Integral over pdf gives -1
trapz(Fx,PDF_Fx)
The problem is the scale of the resulting PDF which reaches very high levels of around 30. How can a probability of certain value of a rnd variable be 30? However, when I integrate over the PDF with trapz I get -1 which also doesn't make much sense. Is there something in the transformations that messes up with the scale of the PDF that I am not taking into account?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Random Number Generation en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!