Hi,
I have generated 100 samples each with 100 random numbers between 0 and 1 using the following code (thnx patrick!):
data RandomNumbers;
do sample=1 to 100;
do n=1 to 1000;
RandomNumber=ranuni(0);
output;
end;
end;
run;
For each of these samples I found the mean using proc tabulate. Now, I need to find the (simulated) probability that the mean of a sample is between .49 and .5, inclusive.
Any ideas?
Is there a way to get the proc tabulate output into a dataset so I can then use "if" statements to keep all means between .49 and .5, count them and then divide by 100 to get the probability? Or is there a faster way to do this entirely in the data step (ie. using another loop)?
Thanks, your help would be much appreciated!