How to integrate a lognormal pdf

4 vues (au cours des 30 derniers jours)
Marc Abdel Nour
Marc Abdel Nour le 31 Jan 2023
Commenté : Marc Abdel Nour le 3 Fév 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);

Réponse acceptée

Torsten
Torsten le 31 Jan 2023
Déplacé(e) : Torsten le 31 Jan 2023
Use "logncdf" with the parameter values from "fitdist" and the input values xi1.

Plus de réponses (1)

Jeff Miller
Jeff Miller le 31 Jan 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.
  1 commentaire
Marc Abdel Nour
Marc Abdel Nour le 3 Fév 2023
Thank you, this was helpful

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by