Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates

by

James Huntley (view profile)

 

generates random variates from over 870 univariate distributions

wtdeltbin_pdf(n, p, m, nn)
% wtdeltbin_pdf.m - evaluates a Weighted Delta Binomial Probability Density.
%   See "Lagrangian Probability Distributions", P.C. Consul & F. Famoye,
%   Birkhauser, 2006, Table 1.1.
%
%   Doesn't normalize for m*p >~ 1 !!!
%
%  Created by Jim Huntley,  11/25/08
%

function [pdf] = wtdeltbin_pdf(n, p, m, nn)

q = 1 - p;

pdf = binomial_coef(m*n,n-nn) * (1-m*p) * p^(n-nn) * q^(n*(m-1)+nn);

return

Contact us