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

genbinom_pdf(n, p, s, r)
% genbinom_pdf.m - evaluates a Generalized Binomial Probability Density.
%   See "Univariate Discrete Distributions", Johnson, Kemp & Kotz,
%   J. Wiley, p.102, 2005. 
%
%  Created by Jim Huntley,  01/30/07
%

function [pdf] = genbinom_pdf(n, p, s, r)

arg = s + r*n;
pdf = s * binomial_coef(arg,n) * p^n * (1-p)^(arg-n) / arg;

return


Contact us