Generation of Random Variates
09 Feb 2012
generates random variates from over 870 univariate distributions
% hoppe_cdf.m - compute a Hoppe's Urn Cumulative Distribution Function.
% "On the Number of Consecutive Successes in Bernoulli Trials",
% L. Holst, Royal Inst. of Tech, Stockholm.
% Created by: Jim Huntley, 02/26/07.
function [cdf] = hoppe_cdf(n,N,a)
sum = hoppe_pdf(0, N, a);
for jn = 1:n
sum = sum + hoppe_pdf(jn, N, a);
cdf = sum;