# Multivariate random distribution

**URL:** <https://root-forum.cern.ch/t/multivariate-random-distribution/63796>\
**Category:** ROOT\
**Created:** [June 24, 2025, 11:22pm UTC](https://root-forum.cern.ch/t/multivariate-random-distribution/63796 "2025-06-24T23:22:30Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ferhue](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ferhue/32/29462_2.png) [@ferhue](https://root-forum.cern.ch/u/ferhue)\
**Post date:** [June 25, 2025, 7:38am UTC](https://root-forum.cern.ch/t/multivariate-random-distribution/63796/2 "2025-06-25T07:38:16Z")

</div>

There is:

> **[ROOT: tutorials/roofit/roostats/MultivariateGaussianTest.C Source File](https://root.cern/doc/master/MultivariateGaussianTest_8C_source.html)**

or for 2D:

> [@Tilt of ellipse in bigaus](https://root-forum.cern.ch/t/tilt-of-ellipse-in-bigaus/47350/2):
>
> The “bigaus” is actually based on the “[ROOT::Math::bigaussian\_pdf](https://root.cern.ch/doc/master/group__PdfFunc.html#ga118e731634d25ce7716c0b279c5e6a16)” function (you can use the “rho”, “sigmax” and “sigmay” parameters to calculate the principal axes, which are defined by the eigenvectors of the covariance matrix, and the semidiameters, which are the square-roots of its eigenvalues): { // ... create the function ... TF2 \*f = new TF2("f", "[0] \* ROOT::Math::bigaussian\_pdf(x, y, [2], [4], [5], [1], [3])", -10., 10., -10., 10.); f-\>SetParNames("constant", "x0", "sigmax", "y0"…

so not really a onliner solution yet, but PRs are welcome 🙂

---

_[View the full topic](https://root-forum.cern.ch/t/multivariate-random-distribution/63796)._
