Mathematica Asked by LINA MARCELA RUIZ GALVIS on September 17, 2020
I was replaying the next plot in Mathematica
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:
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"}]
Correct answer by Bob Hanlon on September 17, 2020
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP