Evaluate and Sample Probability Density Functions

PDFLIB is a Python 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.

Related Data and Programs:

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

PROB, a Python library which evaluates, samples, inverts, and characterizes a number of Probability Density Functions (PDF's) and Cumulative Density Functions (CDF's), including anglit, arcsin, benford, birthday, bernoulli, beta_binomial, beta, binomial, bradford, burr, cardiod, cauchy, chi, chi squared, circular, cosine, deranged, dipole, dirichlet mixture, discrete, empirical, english sentence and word length, error, exponential, extreme values, f, fisk, folded normal, frechet, gamma, generalized logistic, geometric, gompertz, gumbel, half normal, hypergeometric, inverse gaussian, laplace, levy, logistic, log normal, log series, log uniform, lorentz, maxwell, multinomial, nakagami, negative binomial, normal, pareto, planck, poisson, power, quasigeometric, rayleigh, reciprocal, runs, sech, semicircular, student t, triangle, uniform, von mises, weibull, zipf.

RNGLIB, a Python 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 Python library which efficiently samples a discrete probability vector using Walker sampling.

Source Code:

RNGLIB Source Code:

Examples and Tests:

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

Last revised on 05 August 2013.