CHISQ_DIST_RT
Updated: 31 July 2015
Use CHISQ_DIST_RT to calculate the upper distribution of a chi-squared distribution for x and a number of degrees of freedom.
Syntax
SELECT [wct].[CHISQ_DIST_RT](
<@X, float,>
,<@Degrees_freedom, float,>)
Arguments
@X
The value of interest to be evaluated. @X must be of a type float or of type that intrinsically converts to float.
@Degrees_freedom
The number of degrees freedom. @Degrees_freedom must be of a type float or of a type that intrinsically converts to float.
Return Type
float
Remarks
· 0 < @X
· 0 < @Degrees_freedom
Examples
In this example we calculate the right-tailed probability.
SELECT
wct.CHISQ_DIST_RT(
0.5 --@X
,1 --@Degrees_freedom
) as [Right Tail]
This produces the following result
The chi-squared distribution is a special case of the gamma distribution
SELECT
wct.CHISQ_DIST_RT(x,df) as [Chi-squared]
,wct.GAMMAQ(0.5*df,0.5*x) as GammaQ
FROM (VALUES (42,57))n(x,df)
This produces the following result.
See Also