Evaluate and Sample Probability Density Functions

**PDFLIB**
is a MATLAB library which
evaluates Probability Density Functions (PDF's)
and produces random samples from them,
including beta, binomial, chi, exponential, gamma, inverse chi,
inverse gamma, multinomial, normal, scaled inverse chi, and uniform.

The computer code and data files made available on this web page are distributed under the GNU LGPL license.

**PDFLIB** is available in
a C version and
a C++ version and
a FORTRAN77 version and
a FORTRAN90 version and
a MATLAB version and
a Python version.

LOG_NORMAL_TRUNCATED_AB, a MATLAB library which returns quantities associated with the log normal Probability Distribution Function (PDF) truncated to the interval [A,B].

PROB, a MATLAB library which evaluates, samples and inverts a number of Probability Density Functions (PDF's).

RANLIB, a MATLAB library which produces random samples from Probability Density Functions (PDF's), including Beta, Chi-square Exponential, F, Gamma, Multivariate normal, Noncentral chi-square, Noncentral F, Univariate normal, random permutations, Real uniform, Binomial, Negative Binomial, Multinomial, Poisson and Integer uniform, by Barry Brown and James Lovato.

RNGLIB, a MATLAB library which implements a random number generator (RNG) with splitting facilities, allowing multiple independent streams to be computed, by L'Ecuyer and Cote.

WALKER_SAMPLE, a MATLAB library which efficiently samples a discrete probability vector using Walker sampling.

- i4_binomial_pdf.m, evaluates the binomial PDF.
- i4_binomial_sample.m, generates a binomial random deviate.
- i4vec_multinomial_pdf.m, evaluates the multinomial PDF.
- i4vec_multinomial_sample.m, generates a multinomial random deviate.
- r8_beta_pdf.m, evaluates the PDF of a beta distribution.
- r8_beta_sample.m, generates a beta random deviate.
- r8_chi_pdf.m, evaluates the PDF of a chi-squared distribution.
- r8_chi_sample.m, generates a Chi-Square random deviate.
- r8_choose.m, computes the binomial coefficient C(N,K) as an R8.
- r8_exponential_pdf.m, evaluates the PDF of an exponential distribution.
- r8_exponential_sample.m, samples the exponential PDF.
- r8_exponential_01_pdf.m, PDF of a standard exponential distribution.
- r8_exponential_01_sample.m, samples the standard exponential PDF.
- r8_gamma_log.m, evaluates the logarithm of the gamma function.
- r8_gamma_pdf.m, evaluates the PDF of a gamma distribution.
- r8_gamma_sample.m, generates a Gamma random deviate.
- r8_gamma_01_pdf.m, evaluates the PDF of a standard gamma distribution.
- r8_gamma_01_sample.m, samples the standard Gamma distribution.
- r8_invchi_pdf.m, evaluates the PDF of an inverse chi-squared distribution.
- r8_invchi_sample.m, samples an inverse chi-squared distribution.
- r8_invgam_pdf.m, evaluates the PDF of an inverse gamma distribution.
- r8_invgam_sample.m, samples an inverse gamma distribution.
- r8_normal_pdf.m, evaluates the PDF of a normal distribution.
- r8_normal_sample.m, generates a normal random deviate.
- r8_normal_01_pdf.m, evaluates the PDF of a standard normal distribution.
- r8_normal_01_sample.m, returns a unit pseudonormal R8.
- r8_scinvchi_pdf.m, PDF for a scaled inverse chi-squared distribution.
- r8_scinvchi_sample.m, sample a scaled inverse chi-squared distribution.
- r8_uniform_pdf.m, evaluates the PDF of a uniform distribution.
- r8_uniform_sample.m, generates a uniform random deviate.
- r8_uniform_01_pdf.m, evaluates the PDF of a standard uniform distribution.
- r8_uniform_01_sample.m, generates a uniform random deviate from [0,1].
- r8mat_podet.m, computes the determinant of a factored positive definite matrix.
- r8mat_pofac.m, factors a real symmetric positive definite matrix.
- r8mat_poinv.m, computes the inverse of a factored positive definite matrix.
- r8mat_upsol.m, solves R * X = B for an upper triangular matrix R.
- r8mat_utsol.m, solves R' * X = B for an upper triangular matrix R.
- r8vec_multinormal_pdf.m, evaluates a multivariate normal PDF.
- r8vec_multinormal_pdf_test.m
- r8vec_multinormal_sample.m, samples a multivariate normal PDF.
- r8vec_print.m

- pdflib_test.m, a sample calling program.
- pdflib_test01.m, tests R8MAT_POFAC.
- pdflib_test03.m, tests R8_CHI_SAMPLE.
- pdflib_test_output.txt, the output file.

You can go up one level to the MATLAB source codes.