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.WaldDistribution Class Reference

Represents a Wald distribution. More...

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

Public Member Functions

 WaldDistribution (double mean, double shape)
 Initializes a new Wald distribution. 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...
 
override double Cumulant (int r)
 Computes a cumulant of the distribution.
Parameters
rThe index of the cumulant to compute.
Returns
The rth cumulant of the distribution.
More...
 
override double ProbabilityDensity (double x)
 Returns the probability density at the given point.
Parameters
xThe reference point.
Returns
The probability density p(x).
The probability density function (PDF) gives the relative probability of obtaining different values. 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...
 
- Public Member Functions inherited from Meta.Numerics.Statistics.Distributions.Distribution
virtual double RightProbability (double x)
 Return the cumulative probability to the right of (above) the given point. More...
 
virtual double InverseLeftProbability (double P)
 Returns the point at which the cumulative distribution function attains a given value. More...
 
virtual double InverseRightProbability (double Q)
 Returns the point at which the right probability function attains the given value. 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...
 

Static Public Member Functions

static FitResult FitToSample (Sample sample)
 Determines the parameters of the Wald distribution that best fits a sample. More...
 

Properties

double ShapeParameter [get]
 Gets the shape parameter of the distribution. More...
 
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 Attributes

readonly double mu
 
readonly double lambda
 

Detailed Description

Represents a Wald distribution.

<remakrs>

The Wald distribution, also called the inverse Gaussian distribution, is the distribution of first passage times for a random walk.

This can be phrased in terms of the Gambler's ruin problem: given an initial endowment x, a gambler repeatedly plays a game in which he wins 1 dollar with probability p and looses one dollar with probability q = 1 - p. If q > p, he will eventually loose all his endowment. What is the probability distribution that he will do so after exactly t games?

</remakrs>

Constructor & Destructor Documentation

Meta.Numerics.Statistics.Distributions.WaldDistribution.WaldDistribution ( double  mean,
double  shape 
)
inline

Initializes a new Wald distribution.

Parameters
meanThe mean value, which must be positive.
shapeThe shape parameter, which must be positive.

Member Function Documentation

override double Meta.Numerics.Statistics.Distributions.WaldDistribution.Moment ( int  r)
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

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

override double Meta.Numerics.Statistics.Distributions.WaldDistribution.MomentAboutMean ( int  r)
inlinevirtual

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

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

override double Meta.Numerics.Statistics.Distributions.WaldDistribution.Cumulant ( int  r)
inlinevirtual

Computes a cumulant of the distribution.

Parameters
rThe index of the cumulant to compute.
Returns
The rth cumulant of the distribution.

Reimplemented from Meta.Numerics.Statistics.Distributions.UnivariateDistribution.

References Meta.Numerics.Functions.AdvancedIntegerMath.DoubleFactorial(), and Meta.Numerics.MoreMath.Pow().

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

Returns the probability density at the given point.

Parameters
xThe reference point.
Returns
The probability density p(x).
The probability density function (PDF) gives the relative probability of obtaining different values.

Implements Meta.Numerics.Statistics.Distributions.Distribution.

override double Meta.Numerics.Statistics.Distributions.WaldDistribution.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.

static FitResult Meta.Numerics.Statistics.Distributions.WaldDistribution.FitToSample ( Sample  sample)
inlinestatic

Determines the parameters of the Wald distribution that best fits a sample.

Parameters
sampleThe sample to fit.
Returns
The fit.

The returned fit parameters are the Mean and ShapeParameter, in that order. These are the same parameters, in the same order, that are required by the WaldDistribution(double,double) constructor to specify a new Wald distribution.

Exceptions
ArgumentNullExceptionsample is null.
InvalidOperationExceptionsample contains non-positive values.
InsufficientDataExceptionsample contains fewer than three values.

References Meta.Numerics.Statistics.Sample.Count, Meta.Numerics.Statistics.Sample.Mean, and Meta.Numerics.MoreMath.Pow().

Referenced by Test.SampleTest.WaldFitUncertainties().

Member Data Documentation

readonly double Meta.Numerics.Statistics.Distributions.WaldDistribution.mu
private
readonly double Meta.Numerics.Statistics.Distributions.WaldDistribution.lambda
private

Property Documentation

double Meta.Numerics.Statistics.Distributions.WaldDistribution.ShapeParameter
get

Gets the shape parameter of the distribution.

Referenced by Test.SampleTest.WaldFitUncertainties().

override double Meta.Numerics.Statistics.Distributions.WaldDistribution.Mean
get
override double Meta.Numerics.Statistics.Distributions.WaldDistribution.Variance
get

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

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


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