Generate random numbers from an exponential distri

2019-07-12 18:04发布

问题:

Using R, I want to generate 100 random numbers from an exponential distribution with a mean of 50. I want to store these numbers in a vector. I think I did it correctly, but I cannot find anything on the internet to verify my code. Here is my code:

vector <- rexp(100,50)

回答1:

Solution:

vector <- rexp(100, 1/50)

(answered in comments by @SeverinPappadeux )



标签: r random