GammaDist(Value: Double; Alpha: Double; Beta: Double; Cumulative: Boolean): Double;
Value. The value for which the distribution is to be calculated. This value must satisfy the constraint: Value >=0;
Alpha. Distribution parameter. This value must meet the following constraint: Alpha >0. If Alpha = 1, the GammaDist function returns the exponential distribution:
Beta. Distribution parameter. This value must meet the following constraint: Beta >0. If Beta = 1, the GammaDist function returns the standard gamma distribution.
Cumulative. Boolean value that defines function form:
True. The GammaDist function returns integral distribution function.
False. The GammaDist function returns the distribution density function.
The GammaDist method returns gamma-distribution.
Use this function to analyze variables with skewed distribution. Gamma-distribution is usually used in the theory of queues.
To execute the example, add a link to the Stat system assembly.
Sub UserProc;
Var
st: Statistics;
d0: Double;
Begin
st := New Statistics.Create;
d0 := st.GammaDist(10.45, 7, 2, True);
If st.Status <> 0 Then
Debug.WriteLine(st.Errors);
Else
Debug.WriteLine("Gamma distribution: " + d0.ToString);
End If;
End Sub UserProc;
Executing this example shows the gamma-distribution value in the console window:
Module execution started
Gamma-distribution: 0.27140087244101541
Module execution finished
See also: