How to integrate a lognormal pdf

5 ビュー (過去 30 日間)
Marc Abdel Nour
Marc Abdel Nour 2023 年 1 月 31 日
コメント済み: Marc Abdel Nour 2023 年 2 月 3 日
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);

採用された回答

Torsten
Torsten 2023 年 1 月 31 日
移動済み: Torsten 2023 年 1 月 31 日
Use "logncdf" with the parameter values from "fitdist" and the input values xi1.

その他の回答 (1 件)

Jeff Miller
Jeff Miller 2023 年 1 月 31 日
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 件のコメント
Marc Abdel Nour
Marc Abdel Nour 2023 年 2 月 3 日
Thank you, this was helpful

サインインしてコメントする。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by