Why CHI2RDN and CHI2PDF accept non integer values in Statistics Toolbox 7.2 (R2009b)?

The documentation requests a degrees of freedom parameter as a positive integer:
The degrees of freedom parameters in V must be positive integers, and the values in X must lie on the interval [0 Inf].
If I use a non integer degrees of freedom parameter I don't get any error message and a number is given as output. Is this an expected behavior?

 Accepted Answer

This is expected behavior.
For many applications, the chi-square distribution has a degrees of freedom parameter that is a count and therefore, should be an integer.
Despite this, the mathematical formula that defines this distribution does not explicitly require an integer. There are other applications where non-integral degrees of freedom arise naturally. One example of this is the Satterthwaite approximation that uses a chi-square approximation with a non-integer degrees of freedom parameter.
More specifically, the chi-square distribution can be considered as a generalization of the GAMMA function:
https://www.mathworks.com/help/matlab/ref/gamma.html
which can be extended to non integer values.

More Answers (0)

Products

Release

R2009b

Tags

No tags entered yet.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!