Login     Register

        Contact Us     Search

XLeratorDB/statistics Documentation

SQL Server NEGBINOM.INV function


NEGBINOMINV

Updated: 31 July 2010

Use NEGBINOMINV to calculate the smallest value of x such that NEGBINOMDISTP(@x, @Number_s, @Probability_s) >= @P.
Syntax
SELECT [wctStatistics].[wct].[NEGBINOMINV] (
  <@P, float,>
 ,<@Number_s, float,>
 ,<@Probability_s, float,>)
Arguments
@P
the cumulative distribution function. @P is an expression of type float or of a type that implicitly converts to float
@Number_s
is the number of successes. @Number_s is an expression of type float or of a type that implicitly converts to float
@Probability_s
is the probability of success. @Probability_s is an expression of type float or of a type that implicitly converts to float
Return Types
float
Remarks
·         @P must be greater than zero and less than one (0 < @P < 1).
·         @Number_s must be greater than or equal to one (1<= @Number_s).
·         @Number_s is truncated to an integer.
·         @Probability_s must be greater than zero and less than one (0 < @Probability_s < 1).
Examples
Calculate the cumulative distribution function:
SELECT wct.NEGBINOMDISTP(4,90,0.975)
This produces the following result
----------------------
0.912840044254704
 
(1 row(s) affected)

Calculate the inverse:
SELECT wct.NEGBINOMINV(0.912840044254704,90,0.975)   
This produces the following result
----------------------
4
 

(1 row(s) affected)

 

See Also

 



Copyright 2008-2013 WestClinTech LLC         Privacy Policy        Terms of Service