The Maxwell Distribution
Density, distribution function, quantile function and random generation for the Maxwell distribution.
dmaxwell(x, rate, log = FALSE) pmaxwell(q, rate, lower.tail = TRUE, log.p = FALSE) qmaxwell(p, rate, lower.tail = TRUE, log.p = FALSE) rmaxwell(n, rate)
See maxwell
, the VGAM family function for
estimating the (rate) parameter a by maximum likelihood
estimation, for the formula of the probability density function.
dmaxwell
gives the density,
pmaxwell
gives the distribution function,
qmaxwell
gives the quantile function, and
rmaxwell
generates random deviates.
The Maxwell distribution is related to the Rayleigh distribution.
T. W. Yee and Kai Huang
Balakrishnan, N. and Nevzorov, V. B. (2003). A Primer on Statistical Distributions. Hoboken, New Jersey: Wiley.
## Not run: rate <- 3; x <- seq(-0.5, 3, length = 100) plot(x, dmaxwell(x, rate = rate), type = "l", col = "blue", las = 1, main = "Blue is density, orange is cumulative distribution function", sub = "Purple lines are the 10,20,...,90 percentiles", ylab = "") abline(h = 0, col = "blue", lty = 2) lines(x, pmaxwell(x, rate = rate), type = "l", col = "orange") probs <- seq(0.1, 0.9, by = 0.1) Q <- qmaxwell(probs, rate = rate) lines(Q, dmaxwell(Q, rate), col = "purple", lty = 3, type = "h") lines(Q, pmaxwell(Q, rate), col = "purple", lty = 3, type = "h") abline(h = probs, col = "purple", lty = 3) max(abs(pmaxwell(Q, rate) - probs)) # Should be zero ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.