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

binasin_pdf(n, nn)
% binasin_pdf.m - evaluates a Compound Binomial Arcsine Probability Density.
%   See "Handbook of Beta Distribution and Its Applications", A.K Gupta &,
%   S. Nadarajah, p.140, 2004.
%
%  Created by Jim Huntley,  09/29/11
%

function [pdf] = binasin_pdf(n, nn)

%persistent denom

%if(isempty(denom))
    denom = 2^nn * prod(1:nn);
%end

bcnndn = binomial_coef(nn,n);
pdf = bcnndn * prod(1:2:2*n-1) * prod(1:2:2*nn-2*n-1) / denom;

return

Contact us