DiscreteDistribution Class

Represents a discrete probability distribution.

Definition

Namespace: Numerics.NET.Statistics.Distributions
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
C#
[SerializableAttribute]
public abstract class DiscreteDistribution : Distribution
Inheritance
Object  →  Distribution  →  DiscreteDistribution
Derived
More

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, and the function describing the cumulative probability that a given value or any value smaller than it will occur is called the distribution function.

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

This library contains classes for the most common discrete distributions. They are listed in the table below.

DistributionDefinition
BernoulliDistributionThe outcome of a single trial.
BinomialDistributionThe number of successes in N trials.
GeometricDistributionThe number of failures before the first success.
HypergeometricDistributionThe number of successes in N trials taken from a set with m good outcomes and n bad outcomes.
NegativeBinomialDistributionThe number of failures before the nth success.
PoissonDistributionThe number of occurrences of an event in a specified unit of space or time.
DiscreteUniformDistributionA distribution with a constant probability over an interval.

DiscreteDistribution is an abstract base class that cannot be instantiated. To create a continuous distribution of a specific type, instantiate a class derived from DiscreteDistribution.

Notes to inheritors: When you inherit from DiscreteDistribution, you must override the following members: Probability(Int32), DistributionFunction(Int32), Sample(), Mean, and Variance.

Constructors

DiscreteDistribution Constructs a new DiscreteDistribution object.

Properties

Capabilities Gets a value that indicates the capabilities of the distribution class.
(Inherited from Distribution)
Entropy Gets the entropy of the distribution.
(Inherited from Distribution)
IsUnimodal Gets whether the distribution has one or more modes.
Kurtosis Gets the kurtosis of the distribution.
(Inherited from Distribution)
Mean Gets the mean or expectation value of the distribution.
(Inherited from Distribution)
Mode Gets the mode of the distribution.
NumberOfModes Gets the number of modes of the distribution.
Skewness Gets the skewness of the distribution.
(Inherited from Distribution)
StandardDeviation Gets the standard deviation of the distribution.
(Inherited from Distribution)
StatisticSymbol Gets the common symbol to describe a statistic from the distribution.
(Inherited from Distribution)
Variance Gets the variance of the distribution.
(Inherited from Distribution)

Methods

DistributionFunction Gets the probability of obtaining an outcome less than or equal to a specified value.
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)
GetAllModes Returns an array that contains all the modes of the distribution.
GetExpectedHistogram(Index<Interval<Int32>>, Double) Returns a histogram whose bins contain the expected number of samples from the distribution for a given total number of samples.
GetExpectedHistogram(Index<Int32>, Double) Returns a histogram whose bins contain the expected number of samples from the distribution for a given total number of samples.
GetExpectedHistogram(Int32, Int32, Double) 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)
InverseDistributionFunction Returns the inverse of the distribution function.
LeftTailProbability Gets the probability of obtaining a sample that is less than or less than or equal to the specified upper bound.
LogProbability Returns the logarithm of the probability of obtaining a specific integer value in the distribution.
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Probability(Int32) Returns the probability of obtaining a specific integer value in the distribution.
Probability(Int32, Int32) Gets the probability of obtaining a sample that falls within the specified interval from the distribution.
RightTailProbability Gets the probability of obtaining a sample that is less than or less than or equal to the specified upper bound.
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, Int32[]) Fills an Int32 array with random numbers.
Sample(Random, Int32[], Int32, Int32) Fills an Int32 array with random numbers from this DiscreteDistribution.
ToStringReturns a string that represents the current object.
(Inherited from Object)
TwoTailProbability Gets the probability of obtaining a sample that is less than or less than or equal to the specified upper bound.

See Also