# epage 73 # # Written by: # -- # John L. Weatherwax 2009-04-21 # # email: wax@alum.mit.edu # # Please send comments and especially bug reports to the # above email address. # #----- x0 = 1 alpha = 2.4 Nsim = 10^4 U = runif(Nsim) X = x0*(U^(-1/alpha)) # these are our samples ###postscript("../../WriteUp/Graphics/Chapter2/ex_2_13_pareto.eps", onefile=FALSE, horizontal=FALSE) hist(X,freq=F,breaks=100) xRng = seq( min(X), max(X), length.out=100 ) source('pareto.R') lines(xRng,dpareto(xRng,x0,alpha),lwd=2,col="blue") ###dev.off()