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

qbinom1_pdf(n, theta, lambda, nn)
% qbinom1_pdf.m - evaluates a q-Binomial I Probability Density.
%   See "Univariate Discrete Distributions", Johnson, Kemp, and Kotz,
%   J. Wiley, 2005, p.103.    
%
%  Created by Jim Huntley,  9/25/07
%

function [pdf] = qbinom1_pdf(n, theta, lambda, nn)

%persistent coef

%if(isempty(coef))
    coef = theta / (1+theta)^nn;
%end

pdf = coef * binomial_coef(nn,n) * (1-lambda*n)^(nn-n) * (theta+lambda*n)^(n-1);

return

Contact us