ContinuousDistribution

References
[IoId("00000000-B4A7-4E81-8C71-899D55D0E8AD")] public struct ContinuousDistribution : IStorable
Represents a variety of continuous statistical distributions.

Constructors

ContinuousDistribution

#
public ContinuousDistribution(IReader reader)
reader (IReader)

Fields

MinimumSuggestedInterval

#
public const double MinimumSuggestedInterval = 1E-12
Gets the suggested minimum length of a distribution interval.

Properties

Deviation

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

Entropy

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

Maximum

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

Mean

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

Median

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

Minimum

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

Mode

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

Skewness

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

Type

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

UnitInterval

#
public static ContinuousDistribution UnitInterval { get; }
Gets the default unit interval.

Variance

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

Methods

AdjustInterval

#
public static bool AdjustInterval(ref double x0, ref double x1)
Assuming a non-decreasing progression, ensure that x0 and x1 are at least MinimumSuggestedInterval apart.
x0 (ref double)Lower limit.
x1 (ref double)Upper limit.
True if the limits were adjusted.

CreateBeta

#
public static ContinuousDistribution CreateBeta(double a, double b)
Create a Beta distribution.
a (double)
b (double)

CreateCauchy

#
public static ContinuousDistribution CreateCauchy(double location, double scale)
Create a Cauchy distribution.
location (double)
scale (double)

CreateChi

#
public static ContinuousDistribution CreateChi(double degreesOfFreedom)
Create a Chi distribution.
degreesOfFreedom (double)

CreateChiSquare

#
public static ContinuousDistribution CreateChiSquare(double degreesOfFreedom)
Create a Chi² distribution.
degreesOfFreedom (double)

CreateDirichlet2DSampling

#
public static Point2d[] CreateDirichlet2DSampling(int count, (double a0, double a1, double a2) alpha, Random engine)
Compute a two-dimensional Dirichlet distribution.
count (int)Size of data set.
alpha ((double a0, double a1, double a2))Alpha parameters.
engine (Random)Random engine to use.
Random distribution.

CreateDirichlet2DSampling

#
public static Point2d[] CreateDirichlet2DSampling(int count, double alpha, Random engine)
Compute a two-dimensional Dirichlet distribution.
count (int)Size of data set.
alpha (double)Constant alpha parameter.
engine (Random)Random engine to use.
Random distribution.

CreateDirichlet3DSampling

#
public static Point3d[] CreateDirichlet3DSampling(int count, (double a0, double a1, double a2, double a3) alpha, Random engine)
Compute a three-dimensional Dirichlet distribution.
count (int)Size of data set.
alpha ((double a0, double a1, double a2, double a3))Alpha parameters.
engine (Random)Random engine to use.
Random distribution.

CreateDirichlet3DSampling

#
public static Point3d[] CreateDirichlet3DSampling(int count, double alpha, Random engine)
Compute a three-dimensional Dirichlet distribution.
count (int)Size of data set.
alpha (double)Constant alpha parameter.
engine (Random)Random engine to use.
Random distribution.

CreateErlang

#
public static ContinuousDistribution CreateErlang(int shape, double rate)
Create an Erlang distribution.
shape (int)
rate (double)

CreateFoldedNormal

#
public static ContinuousDistribution CreateFoldedNormal(double mean, double deviation)
Create a folded-normal distribution.
mean (double)
deviation (double)

CreateGamma

#
public static ContinuousDistribution CreateGamma(double shape, double rate)
Create a Gamma distribution.
shape (double)
rate (double)

CreateGompertz

#
public static ContinuousDistribution CreateGompertz(double shape, double scale)
Create a Gompertz distribution.
shape (double)
scale (double)

CreateIrwinHall

#
public static ContinuousDistribution CreateIrwinHall(int valence)
Create an Irwin-Hall distribution.
valence (int)

CreateLaplace

#
public static ContinuousDistribution CreateLaplace(double location, double scale)
Create a Laplace distribution.
location (double)
scale (double)

CreateLogNormal

#
public static ContinuousDistribution CreateLogNormal(double mu, double sigma)
Create a Log-Normal distribution.
mu (double)
sigma (double)

CreateNormal

#
public static ContinuousDistribution CreateNormal(double mean, double deviation)
Create a normal distribution.
mean (double)
deviation (double)

CreatePareto

#
public static ContinuousDistribution CreatePareto(double shape, double scale)
Create a Pareto distribution.
shape (double)
scale (double)

CreateRayleigh

#
public static ContinuousDistribution CreateRayleigh(double scale)
Create a Rayleigh distribution.
scale (double)

CreateSampling

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

CreateSamplingConsistent

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

CreateStudentT

#
public static ContinuousDistribution CreateStudentT(double location, double scale, double degreesOfFreedom)
Create a Student-T distribution.
location (double)
scale (double)
degreesOfFreedom (double)

CreateTriangular

#
public static ContinuousDistribution CreateTriangular(double lower, double mode, double upper)
Create a triangular distribution.
lower (double)
mode (double)
upper (double)

CreateUniform

#
public static ContinuousDistribution CreateUniform(double lower, double upper)
Create a uniform distribution.
lower (double)
upper (double)

CreateUPower

#
public static ContinuousDistribution CreateUPower(double lower, double upper, int power)
Create a U-Power distribution.
lower (double)
upper (double)
power (int)

CreateWeibull

#
public static ContinuousDistribution CreateWeibull(double shape, double scale)
Create a Weibull distribution.
shape (double)
scale (double)

CreateWignerSemiCircle

#
public static ContinuousDistribution CreateWignerSemiCircle(double lower, double upper)
Create a semi-elliptical distribution.
lower (double)Ellipse lower limit.
upper (double)Ellipse upper limit.

CumulativeAt

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

GetCdfPreview

#
public void GetCdfPreview(int samples, (double x0, double x1) interval, out double[] x, out double[] y)
Create an approximation of the CDF curve for this distribution using the relevant interval.
samples (int)Number of samples.
interval ((double x0, double x1))X-interval for graph.
x (out double[])X values of sample.
y (out double[])Y values of samples.

GetCdfPreview

#
public void GetCdfPreview(int samples, out double[] x, out double[] y)
Create an approximation of the CDF curve for this distribution using the relevant interval.
samples (int)Number of samples.
x (out double[])X values of sample.
y (out double[])Y values of samples.

GetPdfPreview

#
public void GetPdfPreview(int samples, (double x0, double x1) interval, out double[] x, out double[] y)
Create an approximation of the PDF curve for this distribution using the relevant interval.
samples (int)Number of samples.
interval ((double x0, double x1))X-interval for graph.
x (out double[])X values of sample.
y (out double[])Y values of samples.

GetPdfPreview

#
public void GetPdfPreview(int samples, out double[] x, out double[] y)
Create an approximation of the PDF curve for this distribution using the relevant interval.
samples (int)Number of samples.
x (out double[])X values of sample.
y (out double[])Y values of samples.

GetRelevantInterval

#
public (double x0, double x1) 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.

ProbabilityAt

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

Store

#
public void Store(IWriter writer)
writer (IWriter)
Store

ToString

#
public override string ToString()