For my homework in my computing class, I need to use SAS function to generate 100 observations from a normal distribution with mean 20 and standard deviation 10.
This is what I have so far in my code.
%LET N = 100; /* size of sample */
Data Rand(keep=x u);
call streaminit(4321); /* set seed */
DO I = 1 to 100; /* generate 100 random values */
x = rand("Normal"); /* x ~ N(0,1) */
u = rand("Uniform"); /* u ~ U(0,1) */
output;
end;
run;
proc print;
run;
Can someone please help me with how do I make my code have the mean = 20 and standard deviation = 10?
Please let me know.
Thank you:)