Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates


James Huntley


generates random variates from over 870 univariate distributions

bosein_pdf(n, b, c)
% bosein_pdf.m - evaluates a Bose Eistein Counting Probability Density.
%   See "Univariate Discrete Distributions", Johnson, Kemp, and Kotz,
%   J. Wiley, p.445, 2005. 
%  Created by Jim Huntley,  11/29/06

function [pdf] = bosein_pdf(n, b, c)

%persistent coef

    coef = 1 / binomial_coef(b+c-1,b);

pdf = coef * binomial_coef(b+c-n-2,b-n);


Contact us