Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates

by

 

generates random variates from over 870 univariate distributions

binbin_pdf(n, k, m, p)
% binbin_pdf.m - evaluates a Binomial-Binomial Probability Density.
%   See "The Branching Process Method in Lagrange Random Variate Generation", L. Devroye.
%
%  Created by Jim Huntley,  5/19/05
%

function [pdf] = binbin_pdf(n, k, m, p)

pdf = k * binomial(k+m*n,n) * p^n * (1-p)^(k+m*n-n) / (k+m*n);

return

Contact us