I would like to run a simulation where the sum of 20 random variables are generated 1000 times and plotted in a histogram.
I generate the random numbers using runif(20,0,1) then sum these random numbers using the sum function, but I was wondering if there is an easier method to do this 1000 then to write a for loop.
help(replicate). – chl♦ Jul 22 '11 at 15:12