Click or drag to resize

UnequalProbabilityRandomSampling Class

Provides methods to draw samples from a finite population whose units have unequal probabilities of being inserted in a sample.
Inheritance Hierarchy

Namespace:  Novacta.Analytics
Assembly:  Novacta.Analytics (in Novacta.Analytics.dll) Version: 2.0.0
Syntax
public class UnequalProbabilityRandomSampling : RandomSampling

The UnequalProbabilityRandomSampling type exposes the following members.

Properties
  NameDescription
Public propertyInclusionProbabilities
Gets the inclusion probabilities of the population units.
(Overrides RandomSamplingInclusionProbabilities.)
Public propertyPopulationSize
Gets the size of the population from which this instance draws samples.
(Overrides RandomSamplingPopulationSize.)
Public propertyRandomNumberGenerator
Gets or sets the basic random generator for this instance.
(Inherited from RandomDevice.)
Public propertySampleSize
Gets the size of the samples drawn by this instance.
(Overrides RandomSamplingSampleSize.)
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodStatic memberFromBernoulliProbabilities
Initializes a new instance of the UnequalProbabilityRandomSampling class by specifying the Bernoulli probabilities assigned to the population units and the sample size.
Public methodStatic memberFromInclusionProbabilities
Initializes a new instance of the UnequalProbabilityRandomSampling class by specifying the inclusion probabilities assigned to the population units.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodNextDoubleMatrix
Draws a random sample represented as a DoubleMatrix instance.
(Overrides RandomSamplingNextDoubleMatrix.)
Public methodNextIndexCollection
Draws a sample represented as an IndexCollection instance.
(Overrides RandomSamplingNextIndexCollection.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Remarks

The current implementation of the UnequalProbabilityRandomSampling class is based on the sampling scheme proposed by Chen et al. (Procedure 1)[1] .

Instantiation

Method FromInclusionProbabilities(DoubleMatrix) creates UnequalProbabilityRandomSampling instances by specifying, for each population unit, its probability of being included in a sample. In this case, the sample size is defined as the sum of such probabilities.

Method FromBernoulliProbabilities(DoubleMatrix, Int32) creates instances by assigning to each unit an independent Bernoulli random variable and sampling from the distribution of the sum of the corresponding Bernoulli trials conditional to having exactly SampleSize successes.

Bibliography
[1] Chen, X.H., Dempster, A.P. and Liu, J.S., Weighted Finite Population Sampling to Maximize Entropy, in: Biometrika, 81, 3, pp. 457-469. (1994), http://biomet.oxfordjournals.org/content/81/3/457
See Also