statistics-0.16.3.0: A library of statistical types, data, and functions

Copyright | (c) 2009 Bryan O'Sullivan
License | BSD3
Maintainer | bos@serpentine.com
Stability | experimental
Portability | portable
Safe Haskell | None
Language | Haskell2010

Statistics.Distribution.Normal

Contents

- Constructors

Description

The normal distribution. This is a continuous probability distribution that describes data that cluster around a mean.

Synopsis

- data NormalDistribution
- normalDistr :: Double -> Double -> NormalDistribution
- normalDistrE :: Double -> Double -> Maybe NormalDistribution
- normalDistrErr :: Double -> Double -> Either String NormalDistribution
- standard :: NormalDistribution

# Documentation

data NormalDistribution #

The normal distribution.

#### Instances

Instances details

FromJSON NormalDistribution # |
Instance details Defined in Statistics.Distribution.Normal Methods parseJSON :: Value -> Parser NormalDistribution # parseJSONList :: Value -> Parser [NormalDistribution] # omittedField :: Maybe NormalDistribution #
ToJSON NormalDistribution # |
Instance details Defined in Statistics.Distribution.Normal Methods toJSON :: NormalDistribution -> Value # toEncoding :: NormalDistribution -> Encoding # toJSONList :: [NormalDistribution] -> Value # toEncodingList :: [NormalDistribution] -> Encoding # omitField :: NormalDistribution -> Bool #
Binary NormalDistribution # |
Instance details Defined in Statistics.Distribution.Normal Methods put :: NormalDistribution -> Put # get :: Get NormalDistribution # putList :: [NormalDistribution] -> Put #
Data NormalDistribution # |

Instance details

Defined in Statistics.Distribution.Normal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NormalDistribution -> c NormalDistribution #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c NormalDistribution #

toConstr :: NormalDistribution -> Constr #

dataTypeOf :: NormalDistribution -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c NormalDistribution) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NormalDistribution) #

gmapT :: (forall b. Data b => b -> b) -> NormalDistribution -> NormalDistribution #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NormalDistribution -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NormalDistribution -> r #

gmapQ :: (forall d. Data d => d -> u) -> NormalDistribution -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> NormalDistribution -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> NormalDistribution -> m NormalDistribution #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NormalDistribution -> m NormalDistribution #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NormalDistribution -> m NormalDistribution #

Generic NormalDistribution # |

Instance details

Defined in Statistics.Distribution.Normal

Associated Types

type Rep NormalDistribution |

Instance details

Defined in Statistics.Distribution.Normal

type Rep NormalDistribution = D1 ('MetaData "NormalDistribution" "Statistics.Distribution.Normal" "statistics-0.16.3.0-JhFVwN7Kv9y2XSvDlj54t" 'False) (C1 ('MetaCons "ND" 'PrefixI 'True) ((S1 ('MetaSel ('Just "mean") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Double) :*: S1 ('MetaSel ('Just "stdDev") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Double)) :*: (S1 ('MetaSel ('Just "ndPdfDenom") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Double) :*: S1 ('MetaSel ('Just "ndCdfDenom") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Double))))

Methods

from :: NormalDistribution -> Rep NormalDistribution x #

to :: Rep NormalDistribution x -> NormalDistribution #

Read NormalDistribution # |
Instance details Defined in Statistics.Distribution.Normal Methods readsPrec :: Int -> ReadS NormalDistribution # readList :: ReadS [NormalDistribution] # readPrec :: ReadPrec NormalDistribution # readListPrec :: ReadPrec [NormalDistribution] #
Show NormalDistribution # |
Instance details Defined in Statistics.Distribution.Normal Methods showsPrec :: Int -> NormalDistribution -> ShowS # show :: NormalDistribution -> String # showList :: [NormalDistribution] -> ShowS #
Eq NormalDistribution # |
Instance details Defined in Statistics.Distribution.Normal Methods (==) :: NormalDistribution -> NormalDistribution -> Bool # (/=) :: NormalDistribution -> NormalDistribution -> Bool #
ContDistr NormalDistribution # |
Instance details Defined in Statistics.Distribution.Normal Methods density :: NormalDistribution -> Double -> Double # logDensity :: NormalDistribution -> Double -> Double # quantile :: NormalDistribution -> Double -> Double # complQuantile :: NormalDistribution -> Double -> Double #
ContGen NormalDistribution # |
Instance details Defined in Statistics.Distribution.Normal Methods genContVar :: StatefulGen g m => NormalDistribution -> g -> m Double #
Distribution NormalDistribution # |
Instance details Defined in Statistics.Distribution.Normal Methods cumulative :: NormalDistribution -> Double -> Double # complCumulative :: NormalDistribution -> Double -> Double #
Entropy NormalDistribution # |
Instance details Defined in Statistics.Distribution.Normal Methods entropy :: NormalDistribution -> Double #
MaybeEntropy NormalDistribution # |
Instance details Defined in Statistics.Distribution.Normal Methods maybeEntropy :: NormalDistribution -> Maybe Double #
MaybeMean NormalDistribution # |
Instance details Defined in Statistics.Distribution.Normal Methods maybeMean :: NormalDistribution -> Maybe Double #
MaybeVariance NormalDistribution # |
Instance details Defined in Statistics.Distribution.Normal Methods maybeVariance :: NormalDistribution -> Maybe Double # maybeStdDev :: NormalDistribution -> Maybe Double #
Mean NormalDistribution # |
Instance details Defined in Statistics.Distribution.Normal Methods mean :: NormalDistribution -> Double #
Variance NormalDistribution # |
Instance details Defined in Statistics.Distribution.Normal Methods variance :: NormalDistribution -> Double # stdDev :: NormalDistribution -> Double #
FromSample NormalDistribution Double # | Variance is estimated using maximum likelihood method (biased estimation). Returns `Nothing` if sample contains less than one element or variance is zero (all elements are equal)
Instance details Defined in Statistics.Distribution.Normal Methods fromSample :: Vector v Double => v Double -> Maybe NormalDistribution #
type Rep NormalDistribution # |

Instance details

Defined in Statistics.Distribution.Normal

type Rep NormalDistribution = D1 ('MetaData "NormalDistribution" "Statistics.Distribution.Normal" "statistics-0.16.3.0-JhFVwN7Kv9y2XSvDlj54t" 'False) (C1 ('MetaCons "ND" 'PrefixI 'True) ((S1 ('MetaSel ('Just "mean") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Double) :*: S1 ('MetaSel ('Just "stdDev") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Double)) :*: (S1 ('MetaSel ('Just "ndPdfDenom") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Double) :*: S1 ('MetaSel ('Just "ndCdfDenom") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Double))))

# Constructors

normalDistr #

Arguments

:: Double | Mean of distribution
-> Double | Standard deviation of distribution
-> NormalDistribution |

Create normal distribution from parameters.

IMPORTANT: prior to 0.10 release second parameter was variance not standard deviation.

normalDistrE #

Arguments

:: Double | Mean of distribution
-> Double | Standard deviation of distribution
-> Maybe NormalDistribution |

Create normal distribution from parameters.

IMPORTANT: prior to 0.10 release second parameter was variance not standard deviation.

normalDistrErr #

Arguments

:: Double | Mean of distribution
-> Double | Standard deviation of distribution
-> Either String NormalDistribution |

Create normal distribution from parameters.

standard :: NormalDistribution #

Standard normal distribution with mean equal to 0 and variance equal to 1