| Statistics Toolbox | Search  Help Desk |
| chi2cdf | Examples |
Chi-square (
2) cumulative distribution function (cdf).
Syntax
P = chi2cdf(X,V)
Description
chi2cdf(X,V) computes the
2 cdf with parameter V at the values in X. The arguments X and V must be the same size except that a scalar argument functions as a constant matrix of the same size as the other argument.
The degrees of freedom,V, must be a positive integer.
The
2 cdf is:
2 distribution with degrees of freedom,
, will fall in the interval [0 x].
The
2 density function with n degrees of freedom is the same as the gamma density function with parameters n/2 and 2.
Examples
probability = chi2cdf(5,1:5)
probability =
0.9747 0.9179 0.8282 0.7127 0.5841
probability = chi2cdf(1:5,1:5)
probability =
0.6827 0.6321 0.6084 0.5940 0.5841