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

hoppe_cdf(n,N,a)
% 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);
end
cdf = sum;

return



Contact us