Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates


James Huntley


generates random variates from over 870 univariate distributions

lostgame_pdf(n, p, r)
% lostgame_pdf.m - evaluates a Lost Game Probability Density.
%   see "Dataplot Reference Manual", LOSPDF, NIST. 
%  Created by Jim Huntley,  12/17/07

function [pdf] = lostgame_pdf(n, p, r)

pdf = binomial_coef(2*n-r,n) * (1-p)^(n-r) * p^n * r / (2*n-r);


Contact us