F_DIST_RT
Updated 2023-11-02 21:41:46.130000
Syntax
SELECT [westclintech].[wct].[F_DIST_RT](
<@x, float,>
,<@df1, float,>
,<@df2, float,>)
Description
Use the scalar function F_DIST_RT to calculate upper cumulative probability of an F-distribution for x and degrees of freedom for 2 independent random variables.
Arguments
@df1
The number of degrees freedom for the numerator random variable. @df1 must be of a type float or of a type that intrinsically converts to float.
@X
The value of interest to be evaluated. @X must be of a type float or of type that intrinsically converts to float.
@df2
The number of degrees freedom for the denominator random variable. @df2 must be of a type float or of a type that intrinsically converts to float.
Return Type
float
Remarks
0 < @X.
0 < @df1.
0 < @df2.
Examples
In this example we calculate the F cumulative distribution function for x = 9 with 4 numerator degrees of freedom and 5 denominator degrees of freedom.
SELECT wct.F_DIST_RT( 9, --@x
4, --@df1
5 --@df2
) as F_DIST_RT;
This produces the following result.
{"columns":[{"field":"F_DIST_RT","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"}],"rows":[{"F_DIST_RT":"0.0165940658046558"}]}
The F distribution is closely related to the beta distribution.
SELECT wct.F_DIST_RT(x, df1, df2) as F_DIST_RT,
wct.BETA_DIST(df2 / (df2 + df1 * x), df2 / 2, df1 / 2, 'True', NULL, NULL)
as BETA_DIST
FROM
(
VALUES
(0.95, 6e-00, 11e-00)
) n (x, df1, df2);
This produces the following result.
{"columns":[{"field":"F_DIST_RT","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"},{"field":"BETA_DIST","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"}],"rows":[{"F_DIST_RT":"0.499078949942323","BETA_DIST":"0.499078949942323"}]}
See Also
BETA_DIST - Calculate pdf or cdf of beta distribution
F_INV - Inverse of the lower-tailed F distribution
F_INV_RT - Calculate the inverse of the F upper probability distribution.