Skip to contents

Density, distribution function, quantile function and random generation for Maxwell distribution with parameter scale.

Usage

dmd(x, theta = 1, log = FALSE)

pmd(q, theta = 1, lower.tail = TRUE, log.p = FALSE)

qmd(p, theta = 1, lower.tail = TRUE)

rmd(n, theta = 1)

Arguments

x, q

vector of quantiles.

theta

a scale parameter.

log, log.p

logical; if TRUE, probabilities p are given as log(p).

lower.tail

logical; if TRUE (default), probabilities are \(P\left[ X\leq x\right]\), otherwise, \(P\left[ X>x\right] \).

p

vector of probabilities.

n

number of observations. If length(n) > 1, the length is taken to be the number required.

Value

dmd gives the density, pmd gives the distribution function, qmd gives the quantile function and rmd generates random deviates.

Details

Maxwell distribution with scale parameter \(\theta\), has density $$f\left( x\right) =\frac{4}{\sqrt{\pi }} \frac{1}{\theta ^{3/2}}x^{2}e^{-x^{2}/\theta },$$ where $$0\leq x<\infty ,~~\theta >0.$$

References

Krishna, H., Vivekanand ve Kumar, K., 2015, Estimation in Maxwell distribution with randomly censored data, Journal of statistical computation and simulation, 85 (17), 3560-3578.

Examples

library(new.dist)
dmd(1,theta=2)
#> [1] 0.4839414
pmd(1,theta=2)
#> [1] 0.198748
qmd(.4,theta=5)
#> [1] 2.161694
rmd(10,theta=1)
#>  [1] 1.9035055 1.0653650 1.6369688 0.7349586 0.8986685 0.8144690 1.7817030
#>  [8] 1.0929113 1.3429936 0.5431591