Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates


James Huntley (view profile)


generates random variates from over 870 univariate distributions

mccullagh1_pdf(x, n, theta)
% mccullagh1_pdf.m - evaluates a McCullagh 1 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] = mccullagh1_pdf(x, n, theta)

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


Contact us