DiscreteDistribution<T> Class

Represents a probability distribution over a countable set of objects.

Definition

Namespace: Numerics.NET.Statistics.Distributions
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
C#
[SerializableAttribute]
public class DiscreteDistribution<T>
Inheritance
Object  →  DiscreteDistribution<T>

Type Parameters

T

Remarks

The distribution of a variable is a description of the relative numbers of times each possible outcome will occur in a number of trials. The function describing the distribution is called the probability function.

A discrete probability distribution is a statistical distribution whose variables can take on only discrete values.

Constructors

DiscreteDistribution<T>(Histogram<T>) Constructs a new DiscreteDistribution<T> object.
DiscreteDistribution<T>(IList<T>, IList<Double>) Constructs a new DiscreteDistribution<T> object.

Properties

Items Gets the set of items in the distribution.
Probabilities Gets the probabilities of the items in the distribution.

Methods

EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetExpectedHistogram Returns a histogram whose bins contain the expected number of samples from the distribution for a given total number of samples.
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetRandomSequence() Returns a sequence of random samples from the distribution.
GetRandomSequence(Random) Returns a sequence of random samples from the distribution.
GetRandomSequence(Random, Int32) Returns a sequence of random samples of the specified length from the distribution.
GetTypeGets the Type of the current instance.
(Inherited from Object)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Probability Returns the probability of obtaining a specific item in the distribution.
Sample() Returns a random sample from the distribution.
Sample(Int32) Returns a vector of random samples from the distribution.
Sample(Random) Returns a random sample from the distribution.
Sample(Int32, Random) Returns a vector of random samples from the distribution.
Sample(Random, T[]) Fills an array with random samples.
Sample(Random, T[], Int32, Int32) Fills an array with random samples from this DiscreteDistribution<T>.
SampleLevel Returns the level index of a random sample from the distribution.
SampleLevels Fills an array with the level indexes of random samples from this DiscreteDistribution<T>.
ToStringReturns a string that represents the current object.
(Inherited from Object)

See Also