TransWikia.com

LogNormal Distribution

Mathematica Asked by LINA MARCELA RUIZ GALVIS on September 17, 2020

I was replaying the next plot in Mathematica

enter image description here

For that I used the next code line

Plot[PDF[LogNormalDistribution[18.3, 8.8], x] // Evaluate, {x, 0, 40},
  Frame -> True, PlotRange -> All, PlotStyle -> Blue, 
 PlotLabel -> "Times distribution ", 
 FrameLabel -> {"days", "probability"}]

But the plot is very different:

What is it happening?
What is it happening?

One Answer

dist = LogNormalDistribution[m, s];

Given the mean and standard deviation, the underlying parameters {m, s} are

param = NSolve[{Mean[dist] == 183/10,
    StandardDeviation[dist] == 88/10, s > 0},
   {m, s}, Reals][[1]]

(* {m -> 2.80289, s -> 0.456094} *)

Plot[PDF[dist /. param, x] // Evaluate, {x, 0, 40},
 Frame -> True,
 PlotRange -> All,
 PlotStyle -> Blue,
 PlotLabel -> "Times distribution ",
 FrameLabel -> {"days", "probability"}]

enter image description here

Correct answer by Bob Hanlon on September 17, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP