Function Repository Resource:

MeanMedianLogNormalDistribution

Source Notebook

Create a lognormal distribution using mean and median as parameters instead of the conventional parameters

Contributed by: Seth J. Chandler

ResourceFunction["MeanMedianLogNormalDistribution"][mean,median]

creates a LogNormalDistribution whose mean is mean and whose median is median.

Details and Options

The median must be less than or equal to the mean.

Examples

Basic Examples (2) 

Create a

Out[2]=
PDF:

In[4]:=
Table[Plot[
  PDF[ResourceFunction["MeanMedianLogNormalDistribution"][1, median], x], {x, 0, 20}, PlotRange -> {0, 10}, PlotLabel -> median, ScalingFunctions -> {"Log", "Log"}], {median, 0.8, 0.2, -0.2}]
Out[4]=
Solve, LogNormalDistribution with impermissible imaginary components:

In[7]:=
With[{dist = ResourceFunction["MeanMedianLogNormalDistribution"][7000, 2500]}, 1/Mean[dist] 0.01 NExpectation[
    x \[Conditioned] x > Quantile[dist, (1 - 0.01)], x \[Distributed] dist]]
Out[8]=
Table[{q, With[{dist = ResourceFunction["MeanMedianLogNormalDistribution"][7000, 2500]},
    1/Mean[dist] q NExpectation[
      x \[Conditioned] x > Quantile[dist, (1 - q)], x \[Distributed] dist]]}, {q, 0.01, 0.5, 0.01}]
Out[9]=

Publisher

Seth J. Chandler

Version History

  • 1.0.0 – 23 August 2019

License Information

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant