How to integrate a lognormal pdf

5 visualizaciones (últimos 30 días)
Marc Abdel Nour
Marc Abdel Nour el 31 de En. de 2023
Comentada: Marc Abdel Nour el 3 de Feb. de 2023
Hello everyone,
I'm trying to do 2 lognormal probability distribution and integrate them, but if i sum the probability density function (in this case sum(y12)), I'm getting relly large values, and it's largely dependent on the number of steps(m in the code).
How can I choose the correct number of steps and how can I integrate the pdf and make sure that it's the correct one?
Thank you for your help
a=0;
b=max(ero,[],'all');
m=0.005;
xi1=0:m:b;
xx=ero(ksi,:,1)';
xxx=ero(ksi,:,2)';
xx1=fitdist(xx,'lognormal');
xx2=fitdist(xxx,'lognormal');
y11=pdf(xx1,xi1);
y12=pdf(xx2,xi1);

Respuesta aceptada

Torsten
Torsten el 31 de En. de 2023
Movida: Torsten el 31 de En. de 2023
Use "logncdf" with the parameter values from "fitdist" and the input values xi1.

Más respuestas (1)

Jeff Miller
Jeff Miller el 31 de En. de 2023
It's hard to say for sure without seeing your xx and xxx values, but maybe it is just your expectations that are faulty? Certainly the sum of the pdf values can be arbitrarily large. pdf values are defined so that the area under the distribution is 1. For example, if the distribution of xxx only covers the narrow range from 0 to 0.01, then the average pdf value will have to be 100 to make the area 1. And the sum of those pdf values will thus be quite large. Also, the sum of the pdf values should increase with the number of steps. You are summing positive values from each step, so the sum becomes larger if there are more steps.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by