CDF Chi-Square Distribution Function

Returns a value from the chi-square cumulative probability distribution.

Category:Probability
Returned data type:DOUBLE
Note:The QUANTILE function returns the quantile from a distribution that you specify. The QUANTILE function is the inverse of the CDF function. For more information, see QUANTILE Function.

Syntax

CDF('CHISQUARE', x, df [, nc])

Required Arguments

x

is a numeric constant, variable, or expression that specifies a random variable.

Data typeDOUBLE

df

is a numeric constant, variable, or expression that specifies a degrees of freedom parameter.

Rangedf > 0
Data typeDOUBLE

Optional Argument

nc

is a numeric constant, variable, or expression that specifies an optional noncentrality parameter.

Rangenc ≥ 0
Data typeDOUBLE

Details

The CDF function for the chi-square distribution returns the probability that an observation from a chi-square distribution, with df degrees of freedom and the noncentrality parameter nc, is less than or equal to x. This function accepts non-integer degrees of freedom. If nc is omitted or equal to zero, the value returned is from the central chi-square distribution. In the following equation, let nu equals d f. Click image for alternative formats. and let lamda equals n c. Click image for alternative formats.. The following equation describes the CDF function of the chi-square distribution:

multiline equation line 1 upper C upper D upper F left-parenthesis prime upper C upper H upper I upper S upper Q Superscript prime Baseline comma x comma nu comma lamda right-parenthesis equals StartLayout Enlarged left-brace 1st Row 1st Column 0 2nd Column x less-than 0 2nd Row 1st Column sigma-summation Underscript j equals 0 Overscript infinity Endscripts e Superscript minus StartFraction lamda Over 2 EndFraction Baseline times StartFraction left-parenthesis StartFraction lamda Over 2 EndFraction right-parenthesis Superscript j Baseline Over j factorial EndFraction upper P Subscript c Baseline left-parenthesis x comma nu plus 2 j right-parenthesis 2nd Column x greater-than-or-equal-to 0 EndLayout. Click image for alternative formats.

In the equation, Pc(.,.) denotes the probability from the central chi-square distribution:

multiline equation line 1 upper P Subscript c Baseline left-parenthesis x comma a right-parenthesis equals upper P Subscript g Baseline left-parenthesis StartFraction x Over 2 EndFraction comma StartFraction a Over 2 EndFraction right-parenthesis. Click image for alternative formats.

In the equation, Pg(y,b) is the probability from the gamma distribution given by the equation:

multiline equation line 1 upper P Subscript g Baseline left-parenthesis y comma b right-parenthesis equals StartFraction 1 Over upper Gamma left-parenthesis b right-parenthesis EndFraction integral Subscript 0 Superscript y Baseline e Superscript negative v Baseline v Superscript b minus 1 Baseline d v. Click image for alternative formats.

Example

The following program illustrates the CDF Chi-Square distribution function:

Note: In this example, DS2 statements are sent to SAS using PROC DS2.
proc ds2;
data test (overwrite=yes); 
   dcl double y;
   method run();
      y=cdf('CHISQ', 11.264, 11);
      put y=;
   end;
enddata;
run;
quit;

SAS writes the following output to the log.

y=0.5785813293173

See Also

Last updated: September 2, 2026