ISmChi2Distribution.D

Fore Syntax

D: Integer;

Fore.NET Syntax

D: integer;

Description

The D property determines the number of degrees of freedom for the distribution.

Comments

Property value must meet the following restriction: D ≥ 1.

Fore Example

To execute the example, add a link to the Stat system assembly.

Sub UserProc;
Var
    Distrib: ISmChi2Distribution;
    Values: Array Of Double;
    i: Integer;
    Cnt: Integer = 10;
Begin
    Distrib := New SmChi2Distribution.Create;
    Distrib.D := 4;
    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 shows a sample pseudo-random numbers from χ2 distribution with two degrees of freedom.

Fore.NET Example

Imports Prognoz.Platform.Interop.Stat;

Public Shared Sub Main(Params: StartParams);
Var
    Distrib: ISmChi2Distribution;
    Values: System.Array;
    i: Integer;
    Cnt: Integer = 10;
Begin
    Distrib := New SmChi2Distribution.Create();
    Distrib.D := 4;
    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 shows a sample pseudo-random numbers from χ2 distribution with two degrees of freedom.

See also:

ISmChi2Distribution