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

qbinom22_pdf(n, phi, rho, nn)
% qbinom22_pdf.m - tests a q-Binomial II Probability Density.
%   See "Generalized Poisson Distributions", P. C. Consul, Dekker, 1989, 
%   p.28.  
%
%  Created by Jim Huntley,  10/28/09
%

function [pdf] = qbinom22_pdf(n, phi, rho, nn)

%persistent coef

%if(isempty(coef))
    coef = rho * (1-rho-nn*phi) / (1-nn*phi);
%end

pdf = coef * binomial_coef(nn,n) * (rho+n*phi)^(n-1) * (1-rho-n*phi)^(nn-n-1);

return

Contact us