Bivariate Gamma Distribution (CDF, PDF, samples)

Bivariate Gamma CDF and PDF (rho > 0) + Bivariate Gamma random generator
1.4K Downloads
Updated 23 Feb 2010

View License

This zip contains functions that allow

- to draw random samples from any arbitrary bivariate Gamma distribution, with Gamma distributed marginals. The user should specify the shape and scale parameters of the marginals, as well as the linear correlation coefficient.

The algorithm is based on Schmeiser, B. W. and Lal, R. (1982), "Bivariate Gamma Random Vectors", Operations Research, Vol. 30, No. 2, pp. 355-374 (INFORMS)

- to evaluate <at (x, y)> the joint CDF and PDF of a pair of positively correlated Gamma random variables, with (user specified) shape and scale parameters and linear correlation coefficient ( > 0 ).

The code is based on Smith, Adelfang and Tubbs (1982): "A bivariate Gamma Probability Distribution with Application to Gust Model", NASA Technical Memorandum 82483, National Aeronautics and Space Administration.

Cite As

Geert Van Damme (2024). Bivariate Gamma Distribution (CDF, PDF, samples) (https://www.mathworks.com/matlabcentral/fileexchange/26682-bivariate-gamma-distribution-cdf-pdf-samples), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R14SP3
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.6.0.0

Apparently the Bivariate Gamma random number generator requires the GaussLegendre_3.m file for performing a numerical integration step.

The files has been added now.

1.4.0.0

A function was added to draw samples from an arbitrary bivariate gamma distribution, with gamma distributed marginals

1.3.0.0

Apparently the code couldn't handle a vector input for x (y). This has been corrected now.

1.2.0.0

- Added an .mfile for computing the bivariate PDF of positively correlated Gamma variates.
- changed the code for the CDF to make it more consistent with the formulas mentioned in Smith, Adelfang and Tubbs (1982).

1.1.0.0

The code has been adjusted, in order to be able to deal with both equal and unequal shape parameters.

Also, for reasons of computational efficiency, some constant factors have been changed.

1.0.0.0