Hello,
I'm simulating a variable say X that follows a normal standard distribution with the rannor() function.
With n=5000, the mean of X is far from 0 and out of the prediction interval.
With 100 000 000 generated variables, the mean is near 0 but we cannot simulate such a number of variables for the rest of our work.
With R, the same simulation produces a variable with a mean less than 1.10-4 in absolute value and this with only 500 generated variables.
The same problem occurs with the normal() function.
I use SAS 9.2 with Windows 7 X64.
Do you encounter the same problem ? Is it due to SAS ?
Here is my code :
data test;
do i=1 to 10000;
Y1=rannor(-1);
Y2=normal(-1);
output;
end;
run;
proc means data=test;
var Y1 Y2;
run;