dRayleigh: The Reyleigh distribution

Description Usage Arguments Value Examples

Description

Density, distribution function, quantile function and random generation for the Reyleigh distribution.

Usage

1
2
3
4

Arguments

x, q

vector of quantiles.

sigma

the scale parameter of Reyleigh distribution.

p

vector of probabilities.

n

the number of samples.

lower.tail

logical; if TRUE (default), probabilities are P[X<=x], otherwise, P[X > x].

Value

dt gives the density, pt gives the distribution function, qt gives the quantile function, and rt generates random deviates.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
n<-10000
y<-rRayleigh(n,sigma=2)
hist(y,breaks=seq(0,ceiling(max(y)),0.1),freq = FALSE,
main = "Histogram of Reyleigh",xlab = " ")
x<-seq(0,8.5,0.05)
lines(x,dRayleigh(x,sigma=2),col="red")
qRayleigh(0.05,sigma=2)
pRayleigh(0.6405828,sigma = 2)

## End(Not run)

JieHu18039/StatComp documentation built on May 18, 2019, 12:25 p.m.