Use MC integration to estimate the probability that X * exp(X) < 2.5, assuming that X ~ Gamma(1.2,3.7)
data mcprobdata;
/* generate the sample */
call streaminit(23891);
count = 0;
do i=1 to 2000;
p = rand('uniform');
x = quantile('Gamma', p, 1.2, 3.7);
count = count + (x*exp(x) < 2.5);
end;
/* calculate the estimate */
t = count/2000;
se = sqrt(t*(1-t)/2000);
run;
Is my t variable correctly calculating this interval probability?