WorksheetFunction.Gamma_Inv Method
Returns the inverse of the gamma cumulative distribution. If p = GAMMA_DIST(x,...), then GAMMA_INV(p,...) = x.
Namespace: Microsoft.Office.Interop.Excel
Assembly: Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)
Syntax
'Declaration
Function Gamma_Inv ( _
Arg1 As Double, _
Arg2 As Double, _
Arg3 As Double _
) As Double
'Usage
Dim instance As WorksheetFunction
Dim Arg1 As Double
Dim Arg2 As Double
Dim Arg3 As Double
Dim returnValue As Double
returnValue = instance.Gamma_Inv(Arg1, _
Arg2, Arg3)
double Gamma_Inv(
double Arg1,
double Arg2,
double Arg3
)
Parameters
Arg1
Type: System.DoubleProbability - the probability associated with the gamma distribution.
Arg2
Type: System.DoubleAlpha - a parameter to the distribution.
Arg3
Type: System.DoubleBeta - a parameter to the distribution. If beta = 1, Gamma_Inv returns the standard gamma distribution.
Return Value
Type: System.Double
Remarks
You can use this function to study a variable whose distribution may be skewed.
If any argument is text, Gamma_Inv returns the #VALUE! error value.
If probability < 0 or probability > 1, Gamma_Inv returns the #NUM! error value.
If alpha ≤ 0 or if beta ≤ 0, Gamma_Inv returns the #NUM! error value.
Given a value for probability, Gamma_Inv seeks that value x such that GAMMA_DIST(x, alpha, beta, TRUE) = probability. Thus, precision of Gamma_Inv depends on precision of Gamma_Dist(Double, Double, Double, Boolean). Gamma_Inv uses an iterative search technique. If the search has not converged after 100 iterations, the function returns the #N/A error value.