Rayleigh | R Documentation |
Density, distribution function, quantile function and random generation for the Rayleigh distribution.
drayleigh(x, sigma = 1, log = FALSE)
prayleigh(q, sigma = 1, lower.tail = TRUE, log.p = FALSE)
qrayleigh(p, sigma = 1, lower.tail = TRUE, log.p = FALSE)
rrayleigh(n, sigma = 1)
x , q |
vector of quantiles. |
sigma |
positive valued parameter. |
log , log.p |
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are |
p |
vector of probabilities. |
n |
number of observations. If |
Probability density function
f(x) = \frac{x}{\sigma^2} \exp\left(-\frac{x^2}{2\sigma^2}\right)
Cumulative distribution function
F(x) = 1 - \exp\left(-\frac{x^2}{2\sigma^2}\right)
Quantile function
F^{-1}(p) = \sqrt{-2\sigma^2 \log(1-p)}
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.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.