## Public Forum => Pathfinder => Topic started by: lesbaert on September 28, 2016, 12:52:45 pm

Title: Behavior - Initial Delay - Log Normal distribution
Post by: lesbaert on September 28, 2016, 12:52:45 pm
Hi,

the user manual does not provide information on the definition of the statistical parameters used in the Log Normal distribution used for the 'Initial Delay' behavior.

What is the field 'Avg' and 'Std. Dev' standing for? After some testing, it seems that the Log Normal distribution reacts as a Normal distribution.

A log normal distribution of a stochastic variable is defined with mu and sigma. https://en.wikipedia.org/wiki/Log-normal_distribution (https://en.wikipedia.org/wiki/Log-normal_distribution)

E.g.: for mu=5, and sigma=1 => median value=148s, and value with highest probability is about 60s.

Thanks
Title: Re: Behavior - Initial Delay - Log Normal distribution
Post by: Charlie Thornton on October 12, 2016, 03:45:01 pm
The input "Avg" is the location parameter for the associated normal distribution (mu) and the input "Std. Dev." corresponds to the scale parameter (sigma) of the associated normal distribution. The particular algorithm Pathfinder uses is based on Box-Muller.

To test the theory that the Log-Normal distribution was incorrectly generating a Normal distribution, I attempted to reproduce using the location parameters you gave (mu=5, sigma=1) using the behavior setting for initial delay and 10,000 occupants. I added some code to the simulator to output the initial delay time that was generated for each occupant and created a histogram. See attached result.

The histograms matched my expectations, but I don't understand the values you gave for median value (148s) and highest probability (60s). Are we using incorrect nomenclature for the location and scale parameters?
Title: Re: Behavior - Initial Delay - Log Normal distribution
Post by: lesbaert on October 14, 2016, 02:25:31 am
Thanks for the test with a large number of occupants. It shows that the log-normal distribution of the initial delay is functioning properly.

Like suggested, it would be convenient for the reader of the manual to include the definition of the parameters. From your worked example, I have understood that "Avg" and "Std. Dev." correspond to the mean and standard deviation of the non-logarithmized samples. While a log-normal function is normally defined in literature with location parameter "mu" and scale parameter "sigma" on a logarithmic scale. For the example "Avg"=5 and "Std. Dev."=3, this would result in "mu"=1.46 and "sigma"=0.55.

Title: Re: Behavior - Initial Delay - Log Normal distribution
Post by: Charlie Thornton on October 17, 2016, 11:08:07 am
Thank you! I've added an entry to our issue tracker to use more convenient inputs and add the additional information to the manual.
Title: Re: Behavior - Initial Delay - Log Normal distribution
Post by: alexsym on June 27, 2017, 10:08:18 pm
Could more common distributions be added to future versions of pathfinder . i.e. weibull distribution