IGLib  1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Meta.Numerics.Statistics.Distributions.DiscreteAsContinuousDistribution Class Reference

Represents a discrete distribution as a continous distribution. More...

+ Inheritance diagram for Meta.Numerics.Statistics.Distributions.DiscreteAsContinuousDistribution:
+ Collaboration diagram for Meta.Numerics.Statistics.Distributions.DiscreteAsContinuousDistribution:

Public Member Functions

 DiscreteAsContinuousDistribution (DiscreteDistribution distribution)
 Initializes a new shim that represents a discrete distribution as a continuous distribution. More...
 
 DiscreteAsContinuousDistribution (DiscreteDistribution distribution, Interval support)
 Initializes a new shim that represents a discrete distribution as a continuous distribution. More...
 
override double LeftProbability (double x)
 Returns the cumulative probability to the left of (below) the given point.
Parameters
xThe reference point.
Returns
The integrated probability to obtain a result below the reference point.
The left probability function is commonly called the cumulative distribution function (CDF). More...
 
override double RightProbability (double x)
 Return the cumulative probability to the right of (above) the given point.
Parameters
xThe reference point.
Returns
The integrated probability 1-P(x1) to obtain a result above the reference point.
In survival analysis, the right probability function is commonly called the survival function, because it gives the fraction of the population remaining after the given time. More...
 
override double ProbabilityDensity (double x)
 Not valid for discrete distributions. More...
 
override double Moment (int n)
 Computes a raw moment of the distribution.
Parameters
rThe order of the moment to compute.
Returns
The rth raw moment of the distribution.
See also
Moment
More...
 
override double MomentAboutMean (int n)
 Computes a central moment of the distribution.
Parameters
rThe order of the moment to compute.
Returns
The rth central moment of the distribution.
See also
Moment
More...
 
override double InverseLeftProbability (double P)
 Returns the point at which the cumulative distribution function attains a given value.
Parameters
PThe left cumulative probability P, which must lie between 0 and 1.
Returns
The value x at which LeftProbability equals P.
The inverse left probability is commonly called the quantile function. Given a quantile, it tells which variable value is the lower border of that quantile. More...
 
- Public Member Functions inherited from Meta.Numerics.Statistics.Distributions.Distribution
virtual double InverseRightProbability (double Q)
 Returns the point at which the right probability function attains the given value. More...
 
override double Moment (int r)
 Computes a raw moment of the distribution.
Parameters
rThe order of the moment to compute.
Returns
The rth raw moment of the distribution.
See also
Moment
More...
 
override double MomentAboutMean (int r)
 Computes a central moment of the distribution.
Parameters
rThe order of the moment to compute.
Returns
The rth central moment of the distribution.
See also
Moment
More...
 
virtual double ExpectationValue (Func< double, double > f)
 Computes the expectation value of the given function. More...
 
virtual double GetRandomValue (Random rng)
 Returns a random value. More...
 
- Public Member Functions inherited from Meta.Numerics.Statistics.Distributions.UnivariateDistribution
virtual double Cumulant (int r)
 Computes a cumulant of the distribution. More...
 

Properties

override double Mean [get]
 
override double Variance [get]
 
override double Skewness [get]
 
override Interval Support [get]
 
- Properties inherited from Meta.Numerics.Statistics.Distributions.Distribution
virtual double Median [get]
 Gets the median of the distribution. More...
 
virtual Interval Support [get]
 Gets the interval over which the distribution is nonvanishing. More...
 
- Properties inherited from Meta.Numerics.Statistics.Distributions.UnivariateDistribution
virtual double Mean [get]
 Gets the mean of the distribution. More...
 
virtual double Variance [get]
 Gets the variance of the distribution. More...
 
virtual double StandardDeviation [get]
 Gets the standard deviation of the distribution. More...
 
virtual double Skewness [get]
 Gets the skewness of the distribution. More...
 
virtual double ExcessKurtosis [get]
 Gets the excess kurtosis of the distribution. More...
 

Private Member Functions

void ComputeEffectiveBin (double x, out int ki, out double kf)
 

Private Attributes

DiscreteDistribution d
 
Interval xSupport
 

Detailed Description

Represents a discrete distribution as a continous distribution.

Constructor & Destructor Documentation

Meta.Numerics.Statistics.Distributions.DiscreteAsContinuousDistribution.DiscreteAsContinuousDistribution ( DiscreteDistribution  distribution)
inline

Initializes a new shim that represents a discrete distribution as a continuous distribution.

Parameters
distributionThe discrete distiribution to represent.

References Meta.Numerics.Interval.FromEndpoints().

Meta.Numerics.Statistics.Distributions.DiscreteAsContinuousDistribution.DiscreteAsContinuousDistribution ( DiscreteDistribution  distribution,
Interval  support 
)
inline

Initializes a new shim that represents a discrete distribution as a continuous distribution.

Parameters
distributionThe discrete distiribution to represent.
supportThe continuous support interval into which the discrete support interval is to be mapped.

Member Function Documentation

void Meta.Numerics.Statistics.Distributions.DiscreteAsContinuousDistribution.ComputeEffectiveBin ( double  x,
out int  ki,
out double  kf 
)
inlineprivate
override double Meta.Numerics.Statistics.Distributions.DiscreteAsContinuousDistribution.LeftProbability ( double  x)
inlinevirtual

Returns the cumulative probability to the left of (below) the given point.

Parameters
xThe reference point.
Returns
The integrated probability to obtain a result below the reference point.
The left probability function is commonly called the cumulative distribution function (CDF).

Reimplemented from Meta.Numerics.Statistics.Distributions.Distribution.

References Meta.Numerics.Interval.LeftEndpoint, Meta.Numerics.Statistics.Distributions.DiscreteDistribution.LeftExclusiveProbability(), Meta.Numerics.Statistics.Distributions.DiscreteDistribution.ProbabilityMass(), and Meta.Numerics.Interval.RightEndpoint.

override double Meta.Numerics.Statistics.Distributions.DiscreteAsContinuousDistribution.RightProbability ( double  x)
inlinevirtual

Return the cumulative probability to the right of (above) the given point.

Parameters
xThe reference point.
Returns
The integrated probability 1-P(x1) to obtain a result above the reference point.
In survival analysis, the right probability function is commonly called the survival function, because it gives the fraction of the population remaining after the given time.

Reimplemented from Meta.Numerics.Statistics.Distributions.Distribution.

References Meta.Numerics.Interval.LeftEndpoint, Meta.Numerics.Statistics.Distributions.DiscreteDistribution.ProbabilityMass(), Meta.Numerics.Interval.RightEndpoint, and Meta.Numerics.Statistics.Distributions.DiscreteDistribution.RightExclusiveProbability().

override double Meta.Numerics.Statistics.Distributions.DiscreteAsContinuousDistribution.ProbabilityDensity ( double  x)
inlinevirtual

Not valid for discrete distributions.

Parameters
xThe argument.
Returns
Throws an exception.

Technically, the PDF of a discrete probability distribution consists of delta functions at the integers, each with a weight equal to the PMF at that integer. Since this is not representable in floating point arithmetic, calling this method is an invalid operation.

Implements Meta.Numerics.Statistics.Distributions.Distribution.

References Meta.Numerics.Interval.LeftEndpoint, Meta.Numerics.Statistics.Distributions.DiscreteDistribution.Maximum, Meta.Numerics.Statistics.Distributions.DiscreteDistribution.Minimum, Meta.Numerics.Statistics.Distributions.DiscreteDistribution.ProbabilityMass(), Meta.Numerics.Interval.RightEndpoint, and Meta.Numerics.Interval.Width.

override double Meta.Numerics.Statistics.Distributions.DiscreteAsContinuousDistribution.Moment ( int  n)
inlinevirtual

Computes a raw moment of the distribution.

Parameters
rThe order of the moment to compute.
Returns
The rth raw moment of the distribution.
See also
Moment

Implements Meta.Numerics.Statistics.Distributions.UnivariateDistribution.

References Meta.Numerics.Statistics.Distributions.DiscreteDistribution.Moment().

override double Meta.Numerics.Statistics.Distributions.DiscreteAsContinuousDistribution.MomentAboutMean ( int  n)
inlinevirtual
override double Meta.Numerics.Statistics.Distributions.DiscreteAsContinuousDistribution.InverseLeftProbability ( double  P)
inlinevirtual

Returns the point at which the cumulative distribution function attains a given value.

Parameters
PThe left cumulative probability P, which must lie between 0 and 1.
Returns
The value x at which LeftProbability equals P.
The inverse left probability is commonly called the quantile function. Given a quantile, it tells which variable value is the lower border of that quantile.

Reimplemented from Meta.Numerics.Statistics.Distributions.Distribution.

References Meta.Numerics.Statistics.Distributions.DiscreteDistribution.InverseLeftProbability().

Member Data Documentation

DiscreteDistribution Meta.Numerics.Statistics.Distributions.DiscreteAsContinuousDistribution.d
private
Interval Meta.Numerics.Statistics.Distributions.DiscreteAsContinuousDistribution.xSupport
private

Property Documentation

override double Meta.Numerics.Statistics.Distributions.DiscreteAsContinuousDistribution.Mean
get

override double Meta.Numerics.Statistics.Distributions.DiscreteAsContinuousDistribution.Variance
get

override double Meta.Numerics.Statistics.Distributions.DiscreteAsContinuousDistribution.Skewness
get

override Interval Meta.Numerics.Statistics.Distributions.DiscreteAsContinuousDistribution.Support
get


The documentation for this class was generated from the following file: