Chisquare {base} | R Documentation |
dchisq(x, df)
pchisq(q, df)
qchisq(p, df)
rchisq(n, df)
These functions provide information about the chi-square distribution
with df
degrees of freedom. dchisq
gives the density,
pchisq
gives the distribution function qchisq
gives
the quantile function and rchisq
generates random deviates.
The chi-square distribution with df
= n
degrees of freedom has density
f(x) =
\frac{1}{{2}^{n/2} \Gamma (n/2)}
{x}^{n/2-1} {e}^{-x/2}
for x > 0
.
dnchisq
, dgamma
, dexp
.
dchisq(1, df=1:3)
x <- 1:10
## Chisquare( df = 2) is a special exponential distribution
dchisq(x, df=2) == dexp(x, 1/2)
pchisq(x, df=2) == pexp(x, 1/2)#- only approximately