I am new to R and learned to program 10 years ago in C++. I am currently
working a project that looks at the distribution of randomly generated beta
values. I take 20 random beta values find their sum, repeat 100000 times.

Here is my code that it took me 4 hours to get

s=numeric(length=100000)
for(i in 1:100000){
  pop=(rbeta(n=20,shape1=2,shape2=1))
  s[i]=sum(pop)
}

So now I have them all in in vector, I would like to maybe sort or count
them to see how many are less than or equal to 10, but am guessing there is
a density r function that may be easier then that.

        [[alternative HTML version deleted]]

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to