F_INV_RT
Updated 2023-11-02 21:45:34.007000
Syntax
SELECT [westclintech].[wct].[F_INV_RT](
<@p, float,>
,<@df1, float,>
,<@df2, float,>)
Description
Use the scalar function F_INV_RT to calculate the inverse of the F upper probability distribution.
Arguments
@p
The quantile of interest to be evaluated. @X must be of a type float or of type that intrinsically converts to float.
@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.
@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 < @p < 1.
0 < @df1.
0 < @df2.
Examples
In this example we calculate the inverse of the right-tailed F distribution with (5,2) degrees of freedom at 0.05.
SELECT wct.F_INV_RT( 0.05, --@p
5, --@df1
2 --@df2
) as F_INV_RT;
This produces the following result.
{"columns":[{"field":"F_INV_RT","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"}],"rows":[{"F_INV_RT":"19.2964096520172"}]}
The F distribution is closely related to the beta distribution.
SELECT wct.F_INV_RT(p, df1, df2) as F_INV_RT,
(df2 * (1 - wct.BETAINV(p, df2 / 2, df1 / 2, NULL, NULL)))
/ (wct.BETAINV(p, df2 / 2, df1 / 2, NULL, NULL) * df1) as BETAINV
FROM
(
VALUES
(0.05, 5e-00, 2e-00)
) n (p, df1, df2);
This produces the following result.
{"columns":[{"field":"F_INV_RT","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"},{"field":"BETAINV","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"}],"rows":[{"F_INV_RT":"19.2964096520172","BETAINV":"19.2964096520173"}]}
See Also
BETAINV - Inverse of the beta distribution