User:Tomkeelin/sandbox

From Wikipedia, the free encyclopedia


Moments[edit]

The moment of the unbounded metalog distribution, , is a special case of the more general formula for QPDs.[1] For the unbounded metalog, such integrals evaluate to closed-form moments that are order polynomials in the coefficients . The first four central moments of the four-term unbounded metalog are:

Moments for fewer terms are subsumed in these equations. For example, moments of the three-term metalog can be obtained by setting to zero. Moments for metalogs with more terms, and higher-order moments (), are also available.[2] Moments for semi-bounded and bounded metalogs are not available in closed form.

Parameterization with Four Moments[edit]

Let and be mean, variance, skewness, and kurtosis, respectively. For the four-term unbounded metalog, these central moments may be expressed in terms of coefficients.

... and let be the standardized skewness, .

Parameterization with Three Moments[edit]

Three-term unbounded metalogs can be parameterized in closed form with moments. Let and be the mean, variance, and skewness as given above, and let be the standardized skewness, . Equivalent expressions of the moments in terms of the coefficients and coefficients in terms of the moments are as follows.


Setting yields a set of cubic equations in terms of coefficients and that can be solved in closed form form as a function of and .

Parameterizing metalogs with their moments is useful, for example, when summing independent, non-identically distributed uncertainties. Given first three or four central moments

To validate this equivalence, start with a given set of moments and calculate the corresponding coefficients with the equations on the right. Then take these coefficients, fill them into the equations on the left, and note that the result is exactly the set of moments with which you started. We derived this result by noting that the equations on the left reduce to a cubic polynomial in terms of the coefficients, which can be solved in closed form in terms of the moments. Moreover, this solution is unique. In terms of moments, the feasibility condition is , which can be shown to be equivalent to the feasibility condition in terms of coefficients: and .

Click here to view the proof.

Median[edit]

The median of any distribution in the metalog family has a simple closed form. Note that defines the median and that since all subsequent terms are zero under this condition. It follows that the medians of the unbounded metalog, log metalog, negative-log metalog, and logit metalog distributions are , , , and respectively.

Simulation[edit]

Since the quantile function is expressed in closed form, metalogs facilitate Monte Carlo simulation. Substituting in uniformly distributed random samples of produces random samples of in closed form, thereby eliminating the need to invert a CDF. See below for simulation applications.

Applications[edit]

For 3,474 steelhead trout caught and released on the Babine River in British Columbia during 2010-2014, empirical weight data (histogram) and 10-term log metalog PDF (blue curve) fit to this data by least squares.
Metalog panel for steelhead weight data

Due to their shape and bounds flexibility, metalogs can be used to represent empirical or other data in virtually any field of human endeavor.

  • Astronomy. Metalogs were applied to assess the risks of asteroid impact[3].
  • Cybersecurity. Metalogs were used in cyber security risk assessment[4][5].
  • Eliciting and Combining Expert Opinion. Statistics Canada elicited expert opinions on future Canadian fertility rates from 18 experts, which included the use of spreadsheet-based real-time PDF feedback based on five-term metalogs. The individual expert opinions were then weighted and combined into an overall metalog-based forecast[6].
  • Empirical Data Exploration and Visualization. In fish biology, a 10-term log metalog distribution (bounded below at 0) was fit to the weights of 3,474 steelhead trout caught and released on the Babine River in British Columbia during 2010-2014. The bimodality of the resulting distribution has been attributed to the presence of both first-time and second-time spawners in the river, the latter of which tend to weigh more[7].
  • Hydrology. A 10-term semi-bounded metalog was used to model the probability distribution of annual river gauge heights[8].
  • Oil Field Production. Semi-bounded SPT metalogs were used to analyze biases in projections of oil-field production when compared to observed production after the fact[9].
  • Portfolio Management. SPT metalogs have been used to model commercial value of new products and product portfolios.
  • Simulation Input Distributions. Since quantile functions in the metalog family are expressed in closed form, they facilitate Monte Carlo simulation. Substituting in uniformly distributed random samples of produces random samples of in closed form, thereby eliminating the need to invert a CDF expressed as . This approach was used to simulate the total value of a portfolio of 259 financial assets[10].
  • Simulation Output Distributions. Metalogs have also been used to fit output data from simulations in order to represent those outputs as closed-form continuous distributions (both CDFs and PDFs). Used in this way, they are typically more stable and smoother than histograms[10].
  • Sums of Lognormals. Metalogs enable a closed-form representation of known distributions whose CDFs have no closed-form expression. Keelin et al. (2019)[11] apply this to the sum of independent identically distributed lognormal distributions, where quantiles of the sum can be determined by a large number of simulations. Nine such quantiles are used to parameterize a semi-bounded metalog distribution that runs through each of these nine quantiles exactly. Quantile parameters are stored in a table, which can then be interpolated to yield in-between values; these values are guaranteed to be feasible by the convexity property above.

For a given application and data set, choosing the number of metalog terms requires judgment. For expert elicitation, three to five terms is usually sufficient. For data exploration and matching other probability distributions such as the sum of lognormals, eight to 12 terms is usually sufficient. A metalog panel, which displays the metalog PDFs corresponding to differing numbers of terms for a given data set, may aid this judgment. For example, in the steelhead weight metalog panel above, using less than seven terms arguably underfits the data, by obscuring the data's inherent bimodality. Using more than 10 terms is unnecessary and could, in principle, overfit the data. The case with 16 terms is infeasible for this data set, as indicated by the blank cell in the metalog panel above. Keelin (2016) offers further perspectives on distribution selection within the metalog family[12]. Other tools (such as regularization, Akaike information criterion, and Bayesian information criterion) may also be useful.

Related distributions[edit]

The following distributions are subsumed within the metalog family:

  • The logistic distribution is a special case of the unbounded metalog where for all .
  • The uniform distribution is a special case of: 1) the unbounded metalog where , , and otherwise; and 2) the bounded metalog where , , , , and otherwise.
  • The log-logistic distribution, also known as the Fisk distribution in economics, is a special case of the log metalog where , and for all .
  • The log-uniform distribution is a special case of the log metalog where , , , and otherwise.
  • The logit-logistic distribution[13] is a special case of the logit metalog where for all .

Software[edit]

Freely available software tools can be used to work with metalog distributions:

Commercially available packages also support the use of metalog distributions:

References[edit]

  1. ^ Cite error: The named reference KeelinPowley was invoked but never defined (see the help page).
  2. ^ "The Metalog Distribution Moments". www.metalogdistributions.com. Retrieved 2021-02-13.
  3. ^ Reinhardt, J.D., Chen, X., Liu, W., Manchev, P. and Pate-Cornell, M.E. (2016). “Asteroid risk assessment: A probabilistic approach.” Risk Analysis. 36 (2): 244–261
  4. ^ Cite error: The named reference Faber was invoked but never defined (see the help page).
  5. ^ Wang, J., Neil, M. and Fenton, N. (2020). “A Bayesian network approach for cybersecurity risk assessment implementing and extending the FAIR model.” Computers & Security. 89: 101659.
  6. ^ Cite error: The named reference statCan was invoked but never defined (see the help page).
  7. ^ Keelin, T.W. (2016), Section 6.1.1,pp 266-267.
  8. ^ Keelin, T.W. (2016), Section 6.1.2, pp. 267-268.
  9. ^ Bratvold, R.B., Mohus, E., Petutschnig, D. and Bickel, E. (2020). “Production forecasting: Optimistic and overconfident—Over and over again.” Society of Petroleum Engineers. doi:10.2118/195914-PA.
  10. ^ a b Keelin, T.W. (2016), Section 6.2.2, pp. 271-274.
  11. ^ Cite error: The named reference sumLog was invoked but never defined (see the help page).
  12. ^ Keelin, T.W. (2016), Section 6.3, pp 274-275.
  13. ^ Wang, M. and Rennolls, K., 2005. Tree diameter distribution modelling: introducing the logit logistic distribution. Canadian Journal of Forest Research, 35(6), pp.1305-1313.

External links[edit]

Category:Continuous distributions Category:Systems of probability distributions


Convex Hull for Feasible Coefficients of Three-Term Metalogs[edit]

Feasibility condition for metalogs with terms: is any real number, and .

Convex Hull for Feasible Coefficients of Four-Term Metalogs[edit]

Convex Hull for Feasible Coefficients of Four-Term Metalogs

Feasibility for metalogs with terms is defined as follows:

  • is any real number, and
  • , and
  • If , then and (uniform distribution exactly)
  • If , then feasibility conditions are specified numerically
    • For a given , feasibility requires that number shown.
    • For a given , feasibility requires that number shown.
    • At the top of this table, the four-term metalog is symmetric and peaked, similar to a student-t distribution with 3 degrees of freedom.
    • At the bottom of this table, the four-term metalog is a uniform distribution exactly.
    • In between, it has varying degrees of skewness depending on . Positive yields right skew. Negative yields left skew. When , the four-term metalog is symmetric.

Convex Hull Equations[edit]

The feasible area can be closely approximated by an ellipse (dashed, gray curve), defined by center and semi-axis lengths and . Supplementing this with linear interpolation outside its applicable range, feasibility, given , can be closely approximated:

Points inside or on the boundary of this range have been shown to be feasible. There may be additional feasible points very slightly outside it.