Statistics.Distribution.Gamma

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

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

Statistics.Distribution.Gamma

Contents

- Constructors
- Accessors

Description

The gamma distribution. This is a continuous probability distribution with two parameters, k and ϑ. If k is integral, the distribution represents the sum of k independent exponentially distributed random variables, each of which has a mean of ϑ.

Synopsis

- data GammaDistribution
- gammaDistr :: Double -> Double -> GammaDistribution
- improperGammaDistr :: Double -> Double -> GammaDistribution
- gdShape :: GammaDistribution -> Double
- gdScale :: GammaDistribution -> Double

# Documentation

data GammaDistribution #

The gamma distribution.

Instances

Eq GammaDistribution # |
Methods (==) :: GammaDistribution -> GammaDistribution -> Bool # (/=) :: GammaDistribution -> GammaDistribution -> Bool #
Data GammaDistribution # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GammaDistribution -> c GammaDistribution # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c GammaDistribution # toConstr :: GammaDistribution -> Constr # dataTypeOf :: GammaDistribution -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c GammaDistribution) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c GammaDistribution) # gmapT :: (forall b. Data b => b -> b) -> GammaDistribution -> GammaDistribution # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GammaDistribution -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GammaDistribution -> r # gmapQ :: (forall d. Data d => d -> u) -> GammaDistribution -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> GammaDistribution -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> GammaDistribution -> m GammaDistribution # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GammaDistribution -> m GammaDistribution # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GammaDistribution -> m GammaDistribution #
Read GammaDistribution # |
Methods readsPrec :: Int -> ReadS GammaDistribution # readList :: ReadS [GammaDistribution] # readPrec :: ReadPrec GammaDistribution # readListPrec :: ReadPrec [GammaDistribution] #
Show GammaDistribution # |
Methods showsPrec :: Int -> GammaDistribution -> ShowS # show :: GammaDistribution -> String # showList :: [GammaDistribution] -> ShowS #
Generic GammaDistribution # |
Associated Types type Rep GammaDistribution :: * -> * # Methods from :: GammaDistribution -> Rep GammaDistribution x # to :: Rep GammaDistribution x -> GammaDistribution #
FromJSON GammaDistribution # |
Methods parseJSON :: Value -> Parser GammaDistribution # parseJSONList :: Value -> Parser [GammaDistribution] #
ToJSON GammaDistribution # |
Methods toJSON :: GammaDistribution -> Value # toEncoding :: GammaDistribution -> Encoding # toJSONList :: [GammaDistribution] -> Value # toEncodingList :: [GammaDistribution] -> Encoding #
Binary GammaDistribution # |
Methods put :: GammaDistribution -> Put # get :: Get GammaDistribution # putList :: [GammaDistribution] -> Put #
ContGen GammaDistribution # |
Methods genContVar :: PrimMonad m => GammaDistribution -> Gen (PrimState m) -> m Double #
MaybeEntropy GammaDistribution # |
Methods maybeEntropy :: GammaDistribution -> Maybe Double #
Variance GammaDistribution # |
Methods variance :: GammaDistribution -> Double # stdDev :: GammaDistribution -> Double #
MaybeVariance GammaDistribution # |
Methods maybeVariance :: GammaDistribution -> Maybe Double # maybeStdDev :: GammaDistribution -> Maybe Double #
Mean GammaDistribution # |
Methods mean :: GammaDistribution -> Double #
MaybeMean GammaDistribution # |
Methods maybeMean :: GammaDistribution -> Maybe Double #
ContDistr GammaDistribution # |
Methods density :: GammaDistribution -> Double -> Double # quantile :: GammaDistribution -> Double -> Double # logDensity :: GammaDistribution -> Double -> Double #
Distribution GammaDistribution # |
Methods cumulative :: GammaDistribution -> Double -> Double # complCumulative :: GammaDistribution -> Double -> Double #
type Rep GammaDistribution # |
type Rep GammaDistribution = D1 (MetaData "GammaDistribution" "Statistics.Distribution.Gamma" "statistics-0.13.3.0-A6M5lvDj6Zg1bzI7OU7tSj" False) (C1 (MetaCons "GD" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "gdShape") SourceUnpack SourceStrict DecidedUnpack) (Rec0 Double)) (S1 (MetaSel (Just Symbol "gdScale") SourceUnpack SourceStrict DecidedUnpack) (Rec0 Double))))

# Constructors

gammaDistr #

Arguments

:: Double | Shape parameter. k
-> Double | Scale parameter, ϑ.
-> GammaDistribution |

Create gamma distribution. Both shape and scale parameters must be positive.

improperGammaDistr #

Arguments

:: Double | Shape parameter. k
-> Double | Scale parameter, ϑ.
-> GammaDistribution |

Create gamma distribution. This constructor do not check whether parameters are valid

# Accessors

gdShape :: GammaDistribution -> Double #

Shape parameter, k.

gdScale :: GammaDistribution -> Double #

Scale parameter, ϑ.