Someone asked how to illustrate this method by using the DATA step. The following DATA step simulates 1000 points in the square and colors them according to whether they are inside the unit circle:

data Pi;
call streaminit(12345);
do i = 1 to 1000;
x = rand("Uniform");
y = rand("Uniform");
inside = (x**2 + y**2 < 1);
output;
end;
run;

ods graphics / width=300px height=300px;
title "Monte Carlo Estimate of Pi";
proc sgplot data=Pi noautolegend aspect=1;
scatter x=x y=y / group=inside;
ellipseparm semimajor=1 semiminor=1 / clip;
run;