# Metalog Distributions

**URL:** <https://discourse.julialang.org/t/metalog-distributions/99259>\
**Category:** Modelling & Simulations\
**Tags:** question, distributions\
**Created:** [May 23, 2023, 5:16am UTC](https://discourse.julialang.org/t/metalog-distributions/99259 "2023-05-23T05:16:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vshesh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vshesh/32/20362_2.png) [@vshesh](https://discourse.julialang.org/u/vshesh)\
**Post date:** [May 23, 2023, 5:16am UTC](https://discourse.julialang.org/t/metalog-distributions/99259/1 "2023-05-23T05:16:55Z")

</div>

Hi,

I am looking to use [Metalog Distributions](http://www.metalogdistributions.com/equations.html) ([1 1 The Three Types of Probability Distributions - YouTube](https://www.youtube.com/watch?v=HLZlmMgScwY&list=PLPqypVkrS8Z4pSTQ-dV3unlfADpeTNBAZ)) in a project I’m working on.

Are there any packages that have implemented them (including fitting to data, and adding/multiplying random variables that are metalog distributed )? If not and I wanted to port the equations to julia, how would I do it (in a way that works well with julia’s other statistics libraries)?

Something like:

```julia
d = SPTMetalog(low=0, mid =15, high=20)
d2 = SPTMetalog(low=2, mid=13, high=35)

```

Then

```julia
d3 = d + d2
> Metalog(.... [a function generated from mean/skewness/kurtosis per the formula on the website])
sample(d3, 100) # uses quantile function form to generate simulation
> Vector{Real} [24, 2, 23, 34, 1, 2, 20, 14, 5, 15, .....]

```
