Click or drag to resize
Accord.NET (logo) GeneralizedNormalDistribution Class
Generalized Normal distribution (also known as Exponential Power distribution).
Inheritance Hierarchy
SystemObject
  Accord.Statistics.DistributionsDistributionBase
    Accord.Statistics.Distributions.UnivariateUnivariateContinuousDistribution
      Accord.Statistics.Distributions.UnivariateGeneralizedNormalDistribution

Namespace:  Accord.Statistics.Distributions.Univariate
Assembly:  Accord.Statistics (in Accord.Statistics.dll) Version: 3.4.0
Syntax
[SerializableAttribute]
public class GeneralizedNormalDistribution : UnivariateContinuousDistribution
Request Example View Source

The GeneralizedNormalDistribution type exposes the following members.

Constructors
  NameDescription
Public methodGeneralizedNormalDistribution
Constructs a Generalized Normal distribution with the given parameters.
Top
Properties
  NameDescription
Public propertyEntropy
Gets the Entropy for this Normal distribution.
(Overrides UnivariateContinuousDistributionEntropy.)
Public propertyMean
Gets the location value μ (mu) for the distribution.
(Overrides UnivariateContinuousDistributionMean.)
Public propertyMedian
Gets the median for this distribution.
(Overrides UnivariateContinuousDistributionMedian.)
Public propertyMode
Gets the mode for this distribution.
(Overrides UnivariateContinuousDistributionMode.)
Public propertyQuartiles
Gets the Quartiles for this distribution.
(Inherited from UnivariateContinuousDistribution.)
Public propertyStandardDeviation
Gets the Standard Deviation (the square root of the variance) for the current distribution.
(Inherited from UnivariateContinuousDistribution.)
Public propertySupport
Gets the support interval for this distribution.
(Overrides UnivariateContinuousDistributionSupport.)
Public propertyVariance
Gets the variance for this distribution.
(Overrides UnivariateContinuousDistributionVariance.)
Top
Methods
  NameDescription
Public methodClone
Creates a new object that is a copy of the current instance.
(Overrides DistributionBaseClone.)
Public methodComplementaryDistributionFunction
Gets the complementary cumulative distribution function (ccdf) for this distribution evaluated at point x. This function is also known as the Survival function.
(Inherited from UnivariateContinuousDistribution.)
Public methodCumulativeHazardFunction
Gets the cumulative hazard function for this distribution evaluated at point x.
(Inherited from UnivariateContinuousDistribution.)
Public methodCode exampleDistributionFunction(Double)
Gets the cumulative distribution function (cdf) for the Generalized Normal distribution evaluated at point x.
(Overrides UnivariateContinuousDistributionDistributionFunction(Double).)
Public methodDistributionFunction(Double, Double)
Gets the cumulative distribution function (cdf) for this distribution in the semi-closed interval (a; b] given as P(a < X ≤ b).
(Inherited from UnivariateContinuousDistribution.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodFit(Double)
Fits the underlying distribution to a given set of observations.
(Inherited from UnivariateContinuousDistribution.)
Public methodFit(Double, IFittingOptions)
Fits the underlying distribution to a given set of observations.
(Inherited from UnivariateContinuousDistribution.)
Public methodFit(Double, Double)
Fits the underlying distribution to a given set of observations.
(Inherited from UnivariateContinuousDistribution.)
Public methodFit(Double, Int32)
Fits the underlying distribution to a given set of observations.
(Inherited from UnivariateContinuousDistribution.)
Public methodFit(Double, Double, IFittingOptions)
Fits the underlying distribution to a given set of observations.
(Inherited from UnivariateContinuousDistribution.)
Public methodFit(Double, Int32, IFittingOptions)
Fits the underlying distribution to a given set of observations.
(Inherited from UnivariateContinuousDistribution.)
Public methodGenerate
Generates a random observation from the current distribution.
(Inherited from UnivariateContinuousDistribution.)
Public methodGenerate(Int32)
Generates a random vector of observations from the current distribution.
(Inherited from UnivariateContinuousDistribution.)
Public methodGenerate(Int32, Double)
Generates a random vector of observations from the current distribution.
(Inherited from UnivariateContinuousDistribution.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetRange
Gets the distribution range within a given percentile.
(Inherited from UnivariateContinuousDistribution.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodHazardFunction
Gets the hazard function, also known as the failure rate or the conditional failure density function for this distribution evaluated at point x.
(Inherited from UnivariateContinuousDistribution.)
Public methodInverseDistributionFunction
Gets the inverse of the cumulative distribution function (icdf) for this distribution evaluated at probability p. This function is also known as the Quantile function.
(Inherited from UnivariateContinuousDistribution.)
Public methodStatic memberLaplace
Create an LaplaceDistribution distribution using a GeneralizedNormalDistribution specialization.
Public methodLogCumulativeHazardFunction
Gets the log of the cumulative hazard function for this distribution evaluated at point x.
(Inherited from UnivariateContinuousDistribution.)
Public methodLogProbabilityDensityFunction
Gets the log-probability density function (pdf) for this distribution evaluated at point x.
(Inherited from UnivariateContinuousDistribution.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodStatic memberNormal
Create an NormalDistribution distribution using a GeneralizedNormalDistribution specialization.
Public methodCode exampleProbabilityDensityFunction
Gets the probability density function (pdf) for the Normal distribution evaluated at point x.
(Overrides UnivariateContinuousDistributionProbabilityDensityFunction(Double).)
Public methodQuantileDensityFunction
Gets the first derivative of the inverse distribution function (icdf) for this distribution evaluated at probability p.
(Inherited from UnivariateContinuousDistribution.)
Public methodToString
Returns a String that represents this instance.
(Inherited from DistributionBase.)
Public methodToString(IFormatProvider)
Returns a String that represents this instance.
(Inherited from DistributionBase.)
Public methodToString(String)
Returns a String that represents this instance.
(Inherited from DistributionBase.)
Public methodToString(String, IFormatProvider)
Returns a String that represents this instance.
(Overrides DistributionBaseToString(String, IFormatProvider).)
Top
Extension Methods
  NameDescription
Public Extension MethodHasMethod
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.)
Public Extension MethodToTOverloaded.
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)
Public Extension MethodToTOverloaded.
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by Matrix.)
Top
Remarks

The generalized normal distribution or generalized Gaussian distribution (GGD) is either of two families of parametric continuous probability distributions on the real line. Both families add a shape parameter to the normal distribution. To distinguish the two families, they are referred to below as "version 1" and "version 2". However this is not a standard nomenclature.

Known also as the exponential power distribution, or the generalized error distribution, this is a parametric family of symmetric distributions. It includes all normal and Laplace distributions, and as limiting cases it includes all continuous uniform distributions on bounded intervals of the real line.

References:

Examples

This examples shows how to create a Generalized normal distribution and compute some of its properties.

// Creates a new generalized normal distribution with the given parameters
var normal = new GeneralizedNormalDistribution(location: 1, scale: 5, shape: 0.42);

double mean = normal.Mean;     // 1
double median = normal.Median; // 1
double mode = normal.Mode;     // 1
double var = normal.Variance;  // 19200.781700666659

double cdf = normal.DistributionFunction(x: 1.4); // 0.51076148867681703
double pdf = normal.ProbabilityDensityFunction(x: 1.4); // 0.024215092283124507
double lpdf = normal.LogProbabilityDensityFunction(x: 1.4); // -3.7207791921441378

double ccdf = normal.ComplementaryDistributionFunction(x: 1.4); // 0.48923851132318297
double icdf = normal.InverseDistributionFunction(p: cdf); // 1.4000000149740108

double hf = normal.HazardFunction(x: 1.4); // 0.049495474543966168
double chf = normal.CumulativeHazardFunction(x: 1.4); // 0.7149051552030572

string str = normal.ToString(CultureInfo.InvariantCulture); // GGD(x; μ = 1, α = 5, β = 0.42)
See Also