draw.rayleigh {UnivRNG} | R Documentation |
Generates variates from Rayleigh distribution
Description
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.
Usage
draw.rayleigh(nrep,sigma)
Arguments
nrep |
Number of data points to generate. |
sigma |
Scale parameter of the desired Rayleigh distribution. |
Value
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.
Examples
draw.rayleigh(nrep=100000,sigma=0.5)
draw.rayleigh(nrep=100000,sigma=3)
[Package UnivRNG version 1.2.3 Index]