new; library pgraph;graphset; format /rd 10,8; rndseed 1166; timedt; n = 100; x = zeros(n,1); /*Generate random variates from a Laplace distribution*/ for j (1, n, 1); z_i = rndn(1,1); w_i = .5*exp(-abs(z_i))*inv(pdfn(z_i)); x[j] = w_i*z_i; endfor; x; histp(x,50); end;