D: Integer;
D: integer;
The D property determines the number of degrees of freedom for the distribution.
Property value must meet the following condition: D ≥ 1.
To execute the example, add a link to the Stat system assembly.
Sub UserProc;
Var
Distrib: ISmStudentDistribution;
Values: Array Of Double;
i: Integer;
Const
Cnt = 10;
Begin
Distrib := New SmStudentDistribution.Create;
Distrib.D := 3;
Values := Distrib.RandomVector(Cnt);
For i := 0 To Cnt - 1 Do
Debug.WriteLine(Values[i]);
End For;
End Sub UserProc;
After executing the example the console window displays a sample of pseudo-random values that belong to Student's distribution with three degrees of freedom.
Imports Prognoz.Platform.Interop.Stat;
…
Public Shared Sub Main(Params: StartParams);
Var
Distrib: ISmStudentDistribution;
Values: System.Array;
i: Integer;
Cnt: Integer = 10;
Begin
Distrib := New SmStudentDistribution.Create();
Distrib.D := 3;
Values := Distrib.RandomVector(Cnt);
For i := 0 To Cnt - 1 Do
System.Diagnostics.Debug.WriteLine(Values[i]);
End For;
End Sub;
After executing the example the console window displays a sample of pseudo-random values that belong to Student's distribution with three degrees of freedom.
See also: