Statistics Toolbox | ![]() ![]() |
Chi-square (2) cumulative distribution function (cdf)
Syntax
Description
P = chi2cdf(X,V)
computes the 2 cdf at each of the values in
X
using the corresponding parameters in V
. Vector or matrix inputs for X and V
must have the same size. A scalar input is expanded to a constant matrix with the same dimensions as the other input. The degrees of freedom parameters in V
must be positive integers, and the values in X
must lie on the interval [0 1].
The 2 cdf for a given value x and degrees-of-freedom
is
where ( · ) is the Gamma function. The result,
p
, is the probability that a single observation from a 2 distribution with
degrees of freedom will fall in the interval
[0
x]
.
The 2 density function with
degrees-of-freedom is the same as the gamma density function with parameters
/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
See Also
cdf
, chi2inv
, chi2pdf
, chi2rnd
, chi2stat
![]() | cdfplot | chi2inv | ![]() |