Difference between revisions of "SoLN paper supporting materials"

(Implementation)
Line 22: Line 22:
  
 
* '''Download:''' [[media:Sum of LogNormal Q-tables.xlsx|Sum of LogNormal Q-tables.xlsx]]
 
* '''Download:''' [[media:Sum of LogNormal Q-tables.xlsx|Sum of LogNormal Q-tables.xlsx]]
 +
 +
== How to use library ==
 +
 +
When you have an uncertain variable whose uncertainty is best described as a sum-of-LogNormal distribution, define it using the SoLN distribution function. For example, for a sum of 34 LNs, each with σ=1.13, use:
 +
 +
:Chance X1 := <code>SoLN( N:34, sigma:1.13 )</code>
 +
 +
::''Note: The paper uses the convention of describing a LogNormal by μ and σ, the parameters of the underlying Normal distribution (i.e., so that each component distribution is <code>[[Exp]]( [[Normal]]( mu, sigma ) )</code>. Note that Analytica's convention is to describe a [[LogNormal|LogNormal distribution]] by specifying any 2 statistics of the LogNormal variable itself -- the median, geometric standard deviation, arithmetic mean or arithmetic standard deviation. This library uses the convention of the paper, rather than the standard Analytica convention. The relationship is as follows. If you desire each component distribution to be <code>LogNormal( med, gsdev )</code>, then μ=[[Ln]](med) and σ=[[Ln]](gsdev).''
 +
 +
At an infinite simulation sample size, this is equivalent to
 +
:Chance X2 := <code>[[Local]] n:=1..34 Do [[LogNormal]]( 1, [[Exp]](1.13) )</code>
 +
 +
The following graphs compare the histograms of each of these that result from a Latin-Hypercube simulation with a sample size of 1000:
 +
 +
:[[image:SoLN34_compare_PDF.png]]  [[Image:SoLN34_compare_CDF.png]]
 +
 +
In many cases, Monte Carlo simulation of sums of LogNormals doesn't achieve very good quantile accuracy, even at very large sample sizes, and especially on the tails. Our functions are within 0.1% of the CDF over the design range 2 <= N <= 100 and 0.04 <= sigma <= 1.5.

Revision as of 23:44, 6 May 2019

Supporting Materials for Keelin, et. al. (2019)

This page contains supporting materials for the paper

  • Thomas W. Keelin, Lonnie Chrisman, Sam L. Savage (2019), "Extremely accurate sums of Lognormals in closed form using Metalog distributions", submitted to the Proceedings of the 2019 Winter Simulation Conference.

This paper has been submitted. Until final copy is complete, this page and the downloadable materials may be revised.

Abstract

We provide closed-form equations that closely approximate the sum of iid lognormal distributions as a function of lognormal parameters, μ and σ, and of N, the finite number of such distributions to be summed. This is accomplished through a finite table of inputs to a metalog distribution for a limited set of lognormal shape parameters and N’s, which may then be interpolated to estimate the continuous set of lognormal parameters and countable N’s. Uses include estimating total impact of N risk events, each with iid individual lognormal impact, noise in wireless communications networks and other applications. Furthermore, beyond lognormals, the approach may be directly applied to sums of iid variables from virtually any continuous distribution.

Implementation

Our algorithm computes CDF, Inverse CDF, and probability densities for an Average (or sum) of N Log Normal distributions to a maximum error in CDF of less that 0.01 for all N from 2 to 100 and σ from 0.04 to 1.5. We are providing the following Analytica implementation of the algorithm for download:

If you want to implement this in a different language, we note that it is almost trivial to implement (assuming you have a matrix multiply routine) once you have the Q-tables. See the paper for the details.

Q-Tables

The algorithm uses pre-compiled Q-tables. The Sum of LogNormal Library.ana includes these table, or you can download just the tables here as an Excel spreadsheet.

How to use library

When you have an uncertain variable whose uncertainty is best described as a sum-of-LogNormal distribution, define it using the SoLN distribution function. For example, for a sum of 34 LNs, each with σ=1.13, use:

Chance X1 := SoLN( N:34, sigma:1.13 )
Note: The paper uses the convention of describing a LogNormal by μ and σ, the parameters of the underlying Normal distribution (i.e., so that each component distribution is Exp( Normal( mu, sigma ) ). Note that Analytica's convention is to describe a LogNormal distribution by specifying any 2 statistics of the LogNormal variable itself -- the median, geometric standard deviation, arithmetic mean or arithmetic standard deviation. This library uses the convention of the paper, rather than the standard Analytica convention. The relationship is as follows. If you desire each component distribution to be LogNormal( med, gsdev ), then μ=Ln(med) and σ=Ln(gsdev).

At an infinite simulation sample size, this is equivalent to

Chance X2 := Local n:=1..34 Do LogNormal( 1, Exp(1.13) )

The following graphs compare the histograms of each of these that result from a Latin-Hypercube simulation with a sample size of 1000:

SoLN34 compare PDF.png SoLN34 compare CDF.png

In many cases, Monte Carlo simulation of sums of LogNormals doesn't achieve very good quantile accuracy, even at very large sample sizes, and especially on the tails. Our functions are within 0.1% of the CDF over the design range 2 <= N <= 100 and 0.04 <= sigma <= 1.5.

Comments


You are not allowed to post comments.