Chi: The Chi Distribution

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Density, distribution function, quantile function and random generation for the chi distribution with df degrees of freedom.

Usage

1
2
3
4
dchi(x, df = 2)
pchi(q, df = 2, lower.tail = TRUE, ...)
qchi(p, df = 2, lower.tail = TRUE)
rchi(n, df = 2)

Arguments

x,q

vector of quantiles.

p

vector of probabilities.

n

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

df

degrees of freedom (non-negative, but can be non-integer).

lower.tail

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

...

additional arguments to be passed to the function integrate.

Details

The chi distribution with df = n > 0 degrees of freedom has density

f_n (x) = 2^(1-n/2) x^(n-1) e^(-(x^2)/2) / Gamma(n/2)

for x > 0. This distribution is used to describe the square root of a variable distributed according to a chi-square distribution.

Value

dchi gives the density, pchisq gives the distribution function, qchisq gives the quantile function, and rchisq generates random deviates.

Author(s)

Clement Calenge clement.calenge@oncfs.gouv.fr

References

Evans, M., Hastings, N. and Peacock, B. (2000) Statistical Distributions, 3rd ed. Wiley, New York.

See Also

Chisquare

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
opar <- par(mfrow = c(2,2))

hist(rchi(100), ncla = 20, main="The Chi distribution")

plot(tutu <- seq(0, 5, length=20), dchi(tutu, df = 2), xlab = "x",
     ylab = "probability density", type = "l")

plot(tutu, pchi(tutu), xlab = "x", ylab = "Repartition function",
     type = "l")

par(opar)


Search within the adehabitat package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.