draw.rayleigh: Generates variates from Rayleigh distribution In UnivRNG: Univariate Pseudo-Random Number Generation

Description

This function implements pseudo-random number generation for a Rayleigh distribution with pdf

f(x|σ)=\frac{x}{σ^2}e^{-x^2/2σ^2}

for x ≥q 0 and σ > 0 where σ is the scale parameter.

Usage

 1 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

 1 2 3 draw.rayleigh(nrep=100000,sigma=0.5) draw.rayleigh(nrep=100000,sigma=3) 

UnivRNG documentation built on Jan. 11, 2018, 1:03 a.m.