DiscreteDistribution

References
[IoId("00000000-35D9-4AC9-B5EA-A9AA2235396A")] public struct DiscreteDistribution : IStorable
Represents a variety of discrete statistical distributions.

Constructors

DiscreteDistribution

#
public DiscreteDistribution(
reader
)

Properties

Deviation

#
Gets the standard deviation of this distribution. Not all types of distribution have a meaningful deviation, in which case this property returns NaN.
public double Deviation { get; }

Entropy

#
Gets the entropy of this distribution. Not all types of distribution have an entropy value, in which case this property returns NaN.
public double Entropy { get; }

Maximum

#
Gets the largest parameter for which this distribution is defined.
public int Maximum { get; }

Mean

#
Gets the mean of this distribution. Not all types of distribution have a mean, in which case this property returns NaN.
public double Mean { get; }

Median

#
Gets the median of this distribution. Not all types of distribution have a median, in which case this property returns NaN.
public double Median { get; }

Minimum

#
Gets the smallest parameter for which this distribution is defined.
public int Minimum { get; }

Mode

#
Gets the mode of this distribution. Not all types of distribution have a mode, in which case this property returns NaN.
public int Mode { get; }

Skewness

#
Gets the statistical skewness of this distribution. Not all types of distribution have a skewness, in which case this property returns NaN.
public double Skewness { get; }

Type

#
Gets the type of this distribution.
public DistributionType Type { get; }

Variance

#
Gets the statistical variance of this distribution. Not all types of distribution have a variance, in which case this property returns NaN.
public double Variance { get; }

Methods

CreateBernoulli

#
Create a Bernoulli discrete distribution.
public static DiscreteDistribution CreateBernoulli(
p
Chance of success (0, 1).
)

CreateBinomial

#
Create a Binomial discrete distribution.
public static DiscreteDistribution CreateBinomial()

CreateConwayMaxwell

#
Create a Conway-Maxwell-Poisson discrete distribution.
public static DiscreteDistribution CreateConwayMaxwell(
lambda,
nu
)

CreateGeometric

#
Create a Geometric discrete distribution.
public static DiscreteDistribution CreateGeometric()

CreateHyperGeometric

#
Create a Hyper-Geometric discrete distribution.
public static DiscreteDistribution CreateHyperGeometric(
population,
success,
draws
)

CreatePoisson

#
Create a Poisson discrete distribution.
public static DiscreteDistribution CreatePoisson(
lambda
)

CreateSampling

#
Gets a collection of random samples within this distribution. This method should only be called when the distribution is discrete.
public int[] CreateSampling(
random,
Random engine.
count
Number of samples.
)
Array of samples.

CreateSamplingConsistent

#
Create a random sampling of this distribution which is more consistent but slower than the CreateSampling(Random, int) method.
public int[] CreateSamplingConsistent(
engine,
Random engine to use.
count
Number of samples to create.
)

CreateUniform

#
Create a uniform discrete distribution.
public static DiscreteDistribution CreateUniform(
minimum,
Start of distribution (inclusive).
maximum
End of distribution (includive).
)

CreateZipf

#
Create a Zipf discrete distribution.
public static DiscreteDistribution CreateZipf(
shape,
n
)

CumulativeAt

#
Gets the cumulative distribution at x.
public double CumulativeAt(
x
Parameter.
)
Cumulative probability at x.

GetPreview

#
Create a preview of the PDF and CDF functions.
public void GetPreview(
out int[]
i,
Sample indices.
out double[]
pdf,
Value of the PDF at every sample.
out double[]
cdf
Value of the CDF at every sample.
)

GetRelevantInterval

#
Gets the relevant x-interval in which the distribution has the most detailed progression. This method is used to decide on which interval any distribution previews ought to be drawn.
public (int i0, int i1) GetRelevantInterval()

ProbabilityAt

#
Gets the probability density of the distribution at index i.
public double ProbabilityAt(
i
Parameter.
)
Probability density at i.

Store

#
public void Store(
writer
)
Store

ToString

#
public override string ToString()

ValidateConwayMaxwellNuParameter

#
public static double ValidateConwayMaxwellNuParameter(
lambda,
nu
)