Clear Filters
Clear Filters

How to integrate a lognormal pdf

8 views (last 30 days)
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

Accepted Answer

Torsten on 31 Jan 2023
Moved: Torsten on 31 Jan 2023
Use "logncdf" with the parameter values from "fitdist" and the input values xi1.

More Answers (1)

Jeff Miller
Jeff Miller on 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.

Community Treasure Hunt

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

Start Hunting!