Chi {adehabitat} | R Documentation |
Density, distribution function, quantile function and random
generation for the chi distribution with df
degrees of
freedom.
dchi(x, df = 2) pchi(q, df = 2, lower.tail = TRUE, ...) qchi(p, df = 2, lower.tail = TRUE) rchi(n, df = 2)
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 . |
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.
dchi
gives the density, pchisq
gives the distribution
function, qchisq
gives the quantile function, and rchisq
generates random deviates.
Clement Calenge clement.calenge@oncfs.gouv.fr
Evans, M., Hastings, N. and Peacock, B. (2000) Statistical Distributions, 3rd ed. Wiley, New York.
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)