F_INV
Updated 2023-11-02 21:44:11.583000
Syntax
SELECT [westclintech].[wct].[F_INV](
<@p, float,>
,<@df1, float,>
,<@df2, float,>)
Description
Use the scalar function F_INV to calculate the inverse of the F lower 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 F distribution with (5,2) degrees of freedom at 0.95.
SELECT wct.F_INV( 0.95, --@p
5, --@df1
2 --@df2
) as F_INV;
This produces the following result.
{"columns":[{"field":"F_INV","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"}],"rows":[{"F_INV":"19.2964096520172"}]}
The F distribution is closely related to the beta distribution.
SELECT wct.F_INV(p, df1, df2) as F_INV,
df2 * wct.BETAINV(p, df1 / 2, df2 / 2, NULL, NULL) / (df1 * (1 - wct.BETAINV(
p, df1 / 2, df2 / 2, NULL, NULL))) as BETAINV
FROM
(
VALUES
(0.95, 5e-00, 2e-00)
) n (p, df1, df2);
This produces the following result.
{"columns":[{"field":"F_INV","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":"19.2964096520172","BETAINV":"19.2964096520172"}]}
See Also
BETAINV - Inverse of the beta distribution
F_DIST_RT - Upper F distribution
F_INV_RT - Calculate the inverse of the F upper probability distribution.