# NOT RUN {
# -----------------------------------------------------------------
# Example: Simulated vs exact moments
u = matrix(1,1e6,1)
x = pgdraw(1,0.5*u)
mean(x)
var(x)
pgdraw.moments(1,0.5)
x = pgdraw(2,2*u)
mean(x)
var(x)
pgdraw.moments(2,2)
# }
Run the code above in your browser using DataLab