Skip to contents

Density, distribution function, quantile function and random generation for the Two-Parameter Rayleigh distribution with parameters location and scale.

Usage

dtprd(x, lambda = 1, mu, log = FALSE)

ptprd(q, lambda = 1, mu, lower.tail = TRUE, log.p = FALSE)

qtprd(p, lambda = 1, mu, lower.tail = TRUE)

rtprd(n, lambda = 1, mu)

Arguments

x, q

vector of quantiles.

lambda

a scale parameter.

mu

a location 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

dtprd gives the density, ptprd gives the distribution function, qtprd gives the quantile function and rtprd generates random deviates.

Details

The Two-Parameter Rayleigh distribution with scale parameter \(\lambda\) and location parameter \(\mu\), has density $$f\left( x\right) =2\lambda \left( x-\mu \right) e^{-\lambda \left( x-\mu\right) ^{2}},$$ where $$x>\mu ,~\lambda >0.$$

References

Dey, S., Dey, T. ve Kundu, D., 2014, Two-parameter Rayleigh distribution: different methods of estimation, American Journal of Mathematical and Management Sciences, 33 (1), 55-74.

Examples

library(new.dist)
dtprd(5, lambda=4, mu=4)
#> [1] 0.1465251
ptprd(2,lambda=2,mu=1)
#> [1] 0.8646647
qtprd(.5,lambda=2,mu=1)
#> [1] 1.588705
rtprd(10,lambda=2,mu=1)
#>  [1] 1.084529 1.101900 1.481549 1.190852 1.306570 1.478381 1.140066 1.752413
#>  [9] 1.431353 1.254237