log, log.p: logical; if TRUE, probabilities p are given as log(p).
lower.tail: logical; if TRUE (default), probabilities are P[X≤x]
otherwise, P[X>x].
p: vector of probabilities.
n: number of observations. If length(n) > 1, the length is taken to be the number required.
Details
Probability density function
f(x)=σ2xexp(−2σ2x2)f(x)=x/σ2∗exp(−(x2/2∗σ2))
Cumulative distribution function
F(x)=1−exp(−2σ2x2)F(x)=1−exp(−x2/2∗σ2)
Quantile function
F−1(p)=−2σ2log(1−p)F−1(p)=sqrt(−2∗σ2∗log(1−p))
Examples
x <- rrayleigh(1e5,13)hist(x,100, freq =FALSE)curve(drayleigh(x,13),0,60, col ="red", add =TRUE)hist(prayleigh(x,13))plot(ecdf(x))curve(prayleigh(x,13),0,60, col ="red", lwd =2, add =TRUE)
References
Krishnamoorthy, K. (2006). Handbook of Statistical Distributions with Applications. Chapman & Hall/CRC.
Forbes, C., Evans, M. Hastings, N., & Peacock, B. (2011). Statistical Distributions. John Wiley & Sons.