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

dbinom_pdf(n, nn, pii, psi)
% dbinom_pdf.m - evaluates a Double Binomial Probability Density.
%   See "Univariate Discrete Distributions", Johnson, Kemp, & Kotz,
%   J. Wiley, p.490, 2005.  
%
%  Created by Jim Huntley,  12/16/06
%

function [pdf] = dbinom_pdf(n, nn, pii, psi)

pdf = binomial_coef(nn,n) * n^n * (nn-n)^(nn-n) * nn^(nn*psi) * pii^(psi*n) ...
      * (1-pii)^(psi*(nn-n)) / (nn^nn * n^(psi*n) * (nn-n)^(psi*(nn-n)));

return


Contact us