Login     Register

        Contact Us     Search

XLeratorDB/statistics Documentation

SQL Server non-central F distribution function


NCFPDF

Updated: 31 July 2010

Use NCFPDF to calculate the probability density function of the non-central F distribution.
 
The formula for the probability density function is:

NCFPDF function for SQL Server
Syntax
SELECT [wctStatistics].[wct].[NCFPDF] (
  <@X, float,>
 ,<@DF1, float,>
 ,<@DF2, float,>
 ,<@Lambda, float,>)
Arguments
@X
is the variable to be evaluated. @X is an expression of type float or of a type that implicitly converts to float
@DF1
degrees of freedom. @DF1 is an expression of type float or of a type that implicitly converts to float
@DF2
degrees of freedom. @DF2 is an expression of type float or of a type that implicitly converts to float
@Lambda
is the non-centrality parameter. @Lambda is an expression of type float or of a type that implicitly converts to float
Return Types
float
Remarks
·         @X must be greater than zero (@X > 0).
·         @DF1 must be greater than zero (@DF1 > 0).
·         @DF2 must be greater than zero (@DF2 > 0).
·         @Lambda must be greater than or equal to zero (@Lambda > 0).
Examples
Calculate the probability density function:
SELECT wct.NCFPDF(0.5,3,2,1)
This produces the following result
----------------------
0.413072076061936
 
(1 row(s) affected)


You can use the SeriesFloat function from the XLeratorDB/math library to generate a dataset which can be pasted into EXCEL to generate a graph of the cumulative distribution function.
SELECT SeriesValue
,wct.NCFPDF(SeriesValue, 1, 1, 1) as [f(x,1,1,1)]
,wct.NCFPDF(SeriesValue, 1, 2, 1) as [f(x,1,2,1)]
,wct.NCFPDF(SeriesValue, 2, 1, 2) as [f(x,2,1,2)]
,wct.NCFPDF(SeriesValue, 2, 2, 1) as [f(x,2,2,1)]
,wct.NCFPDF(SeriesValue, 3, 1, 2) as [f(x,3,1,2)]
FROM wctMath.wct.SeriesFloat(.1, 10, .1,NULL,NULL)

This is an EXCEL-generated graph of the results




Copyright 2008-2024 Westclintech LLC         Privacy Policy        Terms of Service