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

qpascal_pdf(n, nn, q, theta)
% qpascal_pdf.m - evaluates a q-Pascal Probability Density.
%   See "The q-Factorial Moments of Discrete q-Distributions and a Characterization
%   of the Euler Distribution", Ch. A. Charalambides and N. Papdatos, U. Athens.
%
%  Created by Jim Huntley,  8/02/06
%

function [pdf] = qpascal_pdf(n, nn, q, theta)

qcoef = qbinomial_coef(n-1, nn-1, q);
prod = 1;
for jn = 1:nn
    prod = prod * (1 - theta*q^(jn-1));
end
pdf = qcoef * theta^(n-nn) * prod;

return

Contact us