How to determine distribution parameters from quantiles
TLDR: Feel free to download or make a copy of this Sheets to calculate the parameters of uniform, normal, loguniform, lognormal, pareto and logistic distributions, including their mean, median and mode, based on the values of 2 quantiles.
Scenario
Given a random variable with cumulative distribution function , and two values and respecting the quantiles and , what are the parameters of the underlying distribution? Answering this question is relevant to determine the expected value (mean) of .
As a concrete example, could represent the cost-effectiveness distribution of an intervention whose 10th and 90th percentiles are 5 and 15. For this case, the inputs would be:
and .
and .
Distribution parameters
The relationship between the values and quantiles of is described by:
For a uniform distribution with minimum and maximum :
For a normal distribution with mean and standard deviation , denoting as the quantile function of the standard normal distribution[1]:
For a pareto distribution with minimum and tail index :
For a logistic distribution with mean and scale :
.
The parameters which define the distributions could be determined solving a system of 2 equations for each of the above relationships:
For a uniform distribution:
For a normal distribution:
For a loguniform or lognormal distribution:
follows a uniform or normal distribution.
This means the parameters referring to the logarithm of could be calculated replacing and by and .
For a pareto distribution:
.
.
For a logistic distribution:
.
.
Feel free to download or make a copy of this Sheets to calculate the parameters of uniform, normal, loguniform, lognormal, pareto and logistic distributions, based on the above formulas. I have also included formulas for the mean, median and mode of all these distributions.
- ^
The standard normal distribution has mean 0, and standard deviation 1. The quantile function is the inverse of the cumulative distribution function. The quantile function of the normal distribution could be calculated via NORMINV in Sheets, and scipy.stats.norm.ppf in Python.
- Corporate campaigns for chicken welfare are 10,000 times as effective as GiveWell’s Maximum Impact Fund? by Jul 28, 2022, 8:22 AM; 78 points) (
- Red-teaming Holden Karnofsky’s AI timelines by Jun 25, 2022, 2:24 PM; 58 points) (
- Nuclear war tail risk has been exaggerated? by Feb 25, 2024, 9:14 AM; 48 points) (
- Finding bugs in GiveWell’s top charities by Jan 23, 2023, 4:49 PM; 47 points) (
- Famine deaths due to the climatic effects of nuclear war by Oct 14, 2023, 12:05 PM; 40 points) (
- Farmed animals may have positive lives now or in a few decades? by Oct 26, 2024, 9:18 AM; 24 points) (
- Future benefits of mitigating food shocks caused by abrupt sunlight reduction scenarios by Mar 4, 2023, 4:22 PM; 20 points) (
- Moral weights for various species and distributions by Jul 3, 2022, 6:19 PM; 15 points) (
- May 9, 2024, 8:45 AM; 4 points) 's comment on Updates on the EA catastrophic risk landscape by (
- Jan 5, 2024, 4:37 PM; 4 points) 's comment on Expected value and uncertainty without full Monte Carlo simulations by (
- Jun 15, 2022, 8:59 PM; 3 points) 's comment on Differences in the Intensity of Valenced Experience across Species by (
- May 15, 2024, 6:52 AM; 3 points) 's comment on Nuclear security seems like an interesting funding gap by (
- May 31, 2024, 6:25 PM; 3 points) 's comment on Cost-effectiveness of School Plates by (
- Feb 25, 2024, 7:28 PM; 2 points) 's comment on Nuclear war tail risk has been exaggerated? by (
- Jun 22, 2023, 6:56 AM; 2 points) 's comment on Principles for AI Welfare Research by (
- May 6, 2024, 6:38 PM; 2 points) 's comment on Updates on the EA catastrophic risk landscape by (
- Feb 2, 2024, 6:59 PM; 2 points) 's comment on Famine deaths due to the climatic effects of nuclear war by (
- Jul 14, 2024, 12:19 PM; 2 points) 's comment on Resilience to Nuclear & Volcanic Winter by (
- Jun 6, 2022, 12:30 PM; 2 points) 's comment on Quantifying Uncertainty in GiveWell’s GiveDirectly Cost-Effectiveness Analysis by (
Useful stuff! I was working on something similar months ago and ended up eyeballing things.
I think the links to the sheets are broken though, they just link to this page
Sorry, and thanks! They are working now.
The hyperlink on the word “this” (in both instances) is broken. I don’t see how to get to the calculator.
Sorry, and thanks! They are working now.
Thank you for this! I had been trying to solve this exact problem recently, and I wasn’t sure if I was doing it right. And this spreadsheet is much more convenient than the way I was doing it.
Great to know that you found it useful!
One can very often avoid running Monte Carlo simulations, at least ones with more than 1 distribution, by estimating the means of input distributions using the sheet. For example, to determine the expected value of Z = X*Y if X and Y are independent distributions, E(Z) = E(X)*E(Y), and one can use the sheet to calculate each of these factors (if both X and Y follow a distribution there).