Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Create a lognormal distribution using mean and median as parameters instead of the conventional parameters
ResourceFunction["MeanMedianLogNormalDistribution"][mean,median] creates a LogNormalDistribution whose mean is mean and whose median is median. |
Create a LogNormalDistribution whose mean is ⅇ3 and whose median is ⅇ:
| In[1]:= |
| Out[1]= |
Create a lognormal distribution whose mean is 7000 and whose median is 2000:
| In[2]:= |
| Out[2]= |
The function handles symbolic parameters:
| In[3]:= |
| Out[3]= |
Show how decreasing the median of a lognormal distribution affects the associated PDF:
| In[4]:= | ![]() |
| Out[4]= | ![]() |
An alternative parameterization would use the mean and the ratio of the median to the mean:
| In[5]:= |
| Out[5]= |
For other distributions, one can perform similar reparameterizations by using Solve, Reduce or similar methods:
| In[6]:= | ![]() |
| Out[6]= |
If the median is greater than the mean, one gets a LogNormalDistribution with impermissible imaginary components:
| In[7]:= |
| Out[7]= |
Observations of health claims show that the mean is 7000 and the median is 2500. Compute the fraction of total claims incurred by persons in the top 1% of claims:
| In[8]:= | ![]() |
| Out[8]= |
Make a table showing the corresponding fraction as one examines the top q percent of claims:
| In[9]:= | ![]() |
| Out[9]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License