Chi | 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 |
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
|
The chi distribution with df
= n > 0 degrees of freedom
has density
f_n (x) = 2^{1-n/2} x^{n-1} e^{\frac{-(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, pchi
gives the distribution
function, qchi
gives the quantile function, and rchi
generates random deviates.
Clement Calenge clement.calenge@ofb.gouv.fr
Evans, M., Hastings, N. and Peacock, B. (2000) Statistical Distributions, 3rd ed. Wiley, New York.
Chisquare
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.