draw.rayleigh {UnivRNG} | R Documentation |
This function implements pseudo-random number generation for a Rayleigh distribution with pdf
f(x|\sigma)=\frac{x}{\sigma^2}e^{-x^2/2\sigma^2}
for x \geq 0
and \sigma > 0
where \sigma
is the scale parameter.
draw.rayleigh(nrep,sigma)
nrep |
Number of data points to generate. |
sigma |
Scale parameter of the desired Rayleigh distribution. |
A list of length five containing generated data, the theoretical mean, the empirical mean, the theoretical variance, and the empirical variance with names y, theo.mean, emp.mean, theo.var, and emp.var, respectively.
draw.rayleigh(nrep=100000,sigma=0.5)
draw.rayleigh(nrep=100000,sigma=3)