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

linnegbin_pdf(n, p, m, nn)
% linnegbin_pdf.m - evaluates a Linear Negative Binomial Probability Density.
%   See "Lagrangian Probability Distributions", P.C. Consul & F. Famoye,
%   Birkhauser, 2006, Table 2.4.
%
%  Created by Jim Huntley,  12/02/08
%

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

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

return

Contact us