Function Math Probability Class

HyperGeometricRandom

Random Number with Hypergeometric Distribution

Signature (Visual Basic / VBA)

Public Function HyperGeometricRandom( _
      ByVal vNumSmp As Variant _
    , ByVal vPopSuc As Variant _
    , ByVal vNumPop As Variant _
    ) As Variant

Parameters

Parameter Description
vNumSmp Size of the sample. Number is truncated to the nearest integer. Function returns Null if vNumSmp is less than one (<1) or greater than vNumPop.
vPopSuc Number of successes in the population. Number is truncated to the nearest integer. Function returns Null if vPopSuc is less than one (<1) or greater than vNumPop.
vNumPop Size of the population. Number is truncated to the nearest integer. Function returns Null if vNumPop is less than one (<1) or greater than either vNumSmp or vPopSuc.