Click or drag to resize

NormalGamma Class

Multivariate Normal-Gamma Distribution.

The NormalGamma distribution is the conjugate prior distribution for the Normal distribution. It specifies a prior over the mean and precision of the Normal distribution.

It is parameterized by four numbers: the mean location, the mean scale, the precision shape and the precision inverse scale.

The distribution NG(mu, tau | mloc,mscale,psscale,pinvscale) = Normal(mu | mloc, 1/(mscale*tau)) * Gamma(tau | psscale,pinvscale).

The following degenerate cases are special: when the precision is known, the precision shape will encode the value of the precision while the precision inverse scale is positive infinity. When the mean is known, the mean location will encode the value of the mean while the scale will be positive infinity. A completely degenerate NormalGamma distribution with known mean and precision is possible as well.

Wikipedia - Normal-Gamma distribution.
Inheritance Hierarchy
SystemObject
  Altaxo.Calc.DistributionsNormalGamma

Namespace: Altaxo.Calc.Distributions
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public class NormalGamma : IDistribution

The NormalGamma type exposes the following members.

Constructors
 NameDescription
Public methodNormalGamma(Double, Double, Double, Double) Initializes a new instance of the NormalGamma class.
Public methodNormalGamma(Double, Double, Double, Double, Random) Initializes a new instance of the NormalGamma class.
Top
Properties
 NameDescription
Public propertyMean Gets the mean of the distribution.
Public propertyMeanLocation Gets the location of the mean.
Public propertyMeanScale Gets the scale of the mean.
Public propertyPrecisionInverseScale Gets the inverse scale of the precision.
Public propertyPrecisionShape Gets the shape of the precision.
Public propertyRandomSource Gets or sets the random number generator which is used to draw random samples.
Public propertyVariance Gets the variance of the distribution.
Top
Methods
 NameDescription
Public methodDensity(MeanPrecisionPair) Evaluates the probability density function for a NormalGamma distribution.
Public methodDensity(Double, Double) Evaluates the probability density function for a NormalGamma distribution.
Public methodDensityLn(MeanPrecisionPair) Evaluates the log probability density function for a NormalGamma distribution.
Public methodDensityLn(Double, Double) Evaluates the log probability density function for a NormalGamma distribution.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodStatic memberIsValidParameterSet Tests whether the provided values are valid parameters for this distribution.
Public methodMeanMarginal Returns the marginal distribution for the mean of the NormalGamma distribution.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodPrecisionMarginal Returns the marginal distribution for the precision of the NormalGamma distribution.
Public methodSample Generates a sample from the NormalGamma distribution.
Public methodStatic memberSample(Random, Double, Double, Double, Double) Generates a sample from the NormalGamma distribution.
Public methodSamples Generates a sequence of samples from the NormalGamma distribution
Public methodStatic memberSamples(Random, Double, Double, Double, Double) Generates a sequence of samples from the NormalGamma distribution
Public methodToString A string representation of the distribution.
(Overrides ObjectToString)
Top
See Also