Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates


James Huntley (view profile)


generates random variates from over 870 univariate distributions

% bintrnorm_cdf.m - evaluates a Compound Binomial Truncated Normal Cumulative Distribution.
%   See "The Compounding of the Binomial and Generalized Beta Distributions",   
%   T. Gerstenkorn, Prob. and Statistical Inference, p.87, 1982.                 
%  Created by:  Jim Huntley,  06/08/11.

function [cdf] = bintrnorm_cdf(n,nn,c,b)

sum1 = bintrnorm_pdf(0, nn, c, b);
for jn = 1:n
    sum1 = sum1 + bintrnorm_pdf(jn, nn, c, b);
cdf = sum1;


Contact us