IGLib
1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
|
Represents a Wald distribution. More...
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.
| |||
override double | MomentAboutMean (int r) | ||
Computes a central moment of the distribution.
| |||
override double | Cumulant (int r) | ||
Computes a cumulant of the distribution.
| |||
override double | ProbabilityDensity (double x) | ||
Returns the probability density at the given point.
| |||
override double | LeftProbability (double x) | ||
Returns the cumulative probability to the left of (below) the given point.
| |||
![]() | |||
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] |
![]() | |
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... | |
![]() | |
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 |
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>
|
inline |
Initializes a new Wald distribution.
mean | The mean value, which must be positive. |
shape | The shape parameter, which must be positive. |
|
inlinevirtual |
Computes a raw moment of the distribution.
r | The order of the moment to compute. |
Reimplemented from Meta.Numerics.Statistics.Distributions.Distribution.
|
inlinevirtual |
Computes a central moment of the distribution.
r | The order of the moment to compute. |
Reimplemented from Meta.Numerics.Statistics.Distributions.Distribution.
|
inlinevirtual |
Computes a cumulant of the distribution.
r | The index of the cumulant to compute. |
Reimplemented from Meta.Numerics.Statistics.Distributions.UnivariateDistribution.
References Meta.Numerics.Functions.AdvancedIntegerMath.DoubleFactorial(), and Meta.Numerics.MoreMath.Pow().
|
inlinevirtual |
Returns the probability density at the given point.
x | The reference point. |
Implements Meta.Numerics.Statistics.Distributions.Distribution.
|
inlinevirtual |
Returns the cumulative probability to the left of (below) the given point.
x | The reference point. |
Reimplemented from Meta.Numerics.Statistics.Distributions.Distribution.
|
inlinestatic |
Determines the parameters of the Wald distribution that best fits a sample.
sample | The sample to 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.
ArgumentNullException | sample is null. |
InvalidOperationException | sample contains non-positive values. |
InsufficientDataException | sample 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().
|
private |
|
private |
|
get |
Gets the shape parameter of the distribution.
Referenced by Test.SampleTest.WaldFitUncertainties().
|
get |
Referenced by Test.SampleTest.WaldFitUncertainties().
|
get |
|
get |
|
get |