ISmHyperGeometricDistribution.N1

Syntax

N1: Integer;

Description

The N1 property determines size of the entire population.

Comments

The property value must satisfy the conditions: 1 ≤ N ≤ N1 and 1 ≤ M ≤ N1. Where:

Example

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

Sub UserProc;
Var
    Distrib: ISmHyperGeometricDistribution;
    Values: Array Of Double;
    i: Integer;
    Cnt: Integer = 10;
Begin
    Distrib := New SmHyperGeometricDistribution.Create;
    Distrib.N1 := 10000;
    Distrib.N := 500;
    Distrib.M := 10;
    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 of pseudo-random values from discrete hypergeometric distribution based on selected parameters.

See also:

ISmHyperGeometricDistribution