probability-polynomial-1.0.0.0: Probability distributions via piecewise polynomials
CopyrightPredictable Network Solutions Ltd. 2020-2024
LicenseBSD-3-Clause
Safe HaskellSafe-Inferred
LanguageHaskell2010

Numeric.Probability.Moments

Description

 
Synopsis

Documentation

data Moments a Source #

The first four commonly used moments of a probability distribution.

Constructors

Moments 

Fields

  • mean :: a

    Mean or Expected Value \( \mu \). Defined as \( \mu = E[X] \).

  • variance :: a

    Variance \( \sigma^2 \). Defined as \( \sigma^2 = E[(X - \mu)^2] \). Equal to \( \sigma^2 = E[X^2] - \mu^2 \).

  • skewness :: a

    Skewness \( \gamma_1 \). Defined as \( \gamma_1 = E\left[\left(\frac{(X - \mu)}{\sigma}\right)^3 \right] \).

  • kurtosis :: a

    Kurtosis \( \kappa \). Defined as \( \kappa = E\left[\left(\frac{(X - \mu)}{\sigma}\right)^4 \right] \).

    The kurtosis is bounded below: \( \kappa \geq \gamma_1^2 + 1 \).

Instances

Instances details
Show a => Show (Moments a) Source # 
Instance details

Defined in Numeric.Probability.Moments

Methods

showsPrec :: Int -> Moments a -> ShowS #

show :: Moments a -> String #

showList :: [Moments a] -> ShowS #

Eq a => Eq (Moments a) Source # 
Instance details

Defined in Numeric.Probability.Moments

Methods

(==) :: Moments a -> Moments a -> Bool #

(/=) :: Moments a -> Moments a -> Bool #

fromExpectedPowers :: (Ord a, Num a, Fractional a) => (a, a, a, a) -> Moments a Source #

Compute the Moments of a probability distribution given the expectation values of the first four powers \( m_k = E[X^k] \).

fromExpectedPowers (m1,m2,m3,m4)