# Simulation of a multivariate distribution

**URL:** https://discourse.julialang.org/t/simulation-of-a-multivariate-distribution/51750
**Category:** General Usage
**Tags:** statistics
**Created:** [December 13, 2020, 1:48am UTC](https://discourse.julialang.org/t/simulation-of-a-multivariate-distribution/51750 "2020-12-13T01:48:28Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![stla](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stla/32/20382_2.png) [@stla](https://discourse.julialang.org/u/stla)
#### Post date: [December 13, 2020, 1:48am UTC](https://discourse.julialang.org/t/simulation-of-a-multivariate-distribution/51750/1 "2020-12-13T01:48:28Z")

</div>

Hello,

R has the package ‘Runuran’, a wrapper of the [UNU.RAN library](https://statmath.wu.ac.at/unuran/). It allows to simulate a distribution given its unnormalized density, possibly a multivariate distribution.

Is there a package for Julia which allows such a thing?

It would be to have a ‘Junuran’ package for Julia, by the way.

Cheers.

---

<div class="post-metadata">

### Author: ![FPGro](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fpgro/32/20822_2.png) [@FPGro](https://discourse.julialang.org/u/FPGro)
#### Post date: [December 13, 2020, 3:20pm UTC](https://discourse.julialang.org/t/simulation-of-a-multivariate-distribution/51750/2 "2020-12-13T15:20:53Z")

</div>

You could look at Distributions.jl to see if that is what you want. Sampling is easy, multimodal distributions exist, as well as distribution fitting and a DiscreteNonParametric distribution, too. If that isn’t sufficient, then you could check out EmpiricalDistributions.jl

There’s no Julia UNU.RAN wrapper as far as I know, but if you think this library does something better than the existing ones, feel free to call that out 😃

---

<div class="post-metadata">

### Author: ![stla](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stla/32/20382_2.png) [@stla](https://discourse.julialang.org/u/stla)
#### Post date: [December 17, 2020, 10:05am UTC](https://discourse.julialang.org/t/simulation-of-a-multivariate-distribution/51750/3 "2020-12-17T10:05:05Z")

</div>

> [@FPGro](#):
>
> There’s no Julia UNU.RAN wrapper as far as I know, but if you think this library does something better than the existing ones, feel free to call that ou

I’m trying 🙂 So far I have successfully generate a UNU.RAN normal sample from Julia 👍
