Rev Language Reference


dnChisq - Chi-Square Distribution

The chi-square distribution with df degrees of freedom describes the distribution of the sum of the squares of df independent normal variables with mean 0 and variance 1.

Usage

dnChisq(Natural df)

Arguments

df : Natural (pass by const reference)
The degrees of freedom.

Domain Type

Details

The chi-square distribution takes one parameter, df, the number of degrees of freedom. The probability density function is f(x) = x^(df/2 - 1) * e^(-x/2) / (2^(df/2) * Gamma(df/2)), where Gamma is the gamma function.

Example

# The most important use of the chi-square distribution
# is arguable the quantile function.
# You can access it the following way:
df <- 10
a := qchisq(0.025, df)
a