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

mccullagh2_pdf(x, n, theta)
% mccullagh2_pdf.m - evaluates a McCullagh 2 Probability Density.
%   See "Continuous Univariate Distributions", v.2, Johnson, Kotz, & Balakrishnan,
%   J. Wiley, 1995, p.615 and "Some Statistical Properties of a Family of Continuous Univariate
%   Distributions", P. McCullagh, U. Chicago, JASA, v.84, No.405, p.125, 1989.
%
%   Vector Form of PDF !!!
%
%  Created by Jim Huntley,  7/11/07
%

function [pdf] = mccullagh2_pdf(x, n, theta)

nu = 0.5*n;
pdf = (1-x.^2).^(nu-0.5) .* (1-theta^2) ./ ...
      ((1-2.*theta.*x+theta^2).^(nu+1).*beta(nu+0.5,0.5));

return

Contact us