Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates

by

James Huntley (view profile)

 

generates random variates from over 870 univariate distributions

betnegbin_pdf(n, alpha, bet, gam)
% betnegbin_pdf.m - evaluates a Beta Negative Binomial Probability Density.
%   See "Linearity of Regression for Non-Adjacent Weak Records", Wesolowski and Ahsanullah,
%   PolyTechnika Warsawska, Statistica Sinica, v.11, p. 39, 2001. 
%
%  Created by Jim Huntley,  11/17/06
%

function [pdf] = betnegbin_pdf(n, alpha, bet, gam)

pdf = gam * binomial_coef(bet,gam) * binomial_coef(alpha+n-1,n) ...
      / ((gam+n) * binomial_coef(alpha+bet+n,gam+n));

return


Contact us