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

althadd_pdf(n, k, alpha, p)
% althadd_pdf.m - evaluates an Altham Additive Correlated Binomial Probability Density.
%   See "Univariate Discrete Distributions", Johnson, Kemp, and Kotz,
%   J. Wiley, p.153, 2005. 
%
%  Created by Jim Huntley,  11/16/06
%

function [pdf] = althadd_pdf(n, k, alpha, p)

pdf = binomial_coef(k,n) * p^n * (1-p)^(k-n) *(0.5*alpha*(n*(n-1)/p + (k-n)*(k-n-1)/(1-p)) ...
      - 0.5*alpha*k*(k-1) + 1);

return


Contact us