statistics-0.6.0.2: A library of statistical types, data, and functionsSource codeContentsIndex
Statistics.Distribution
Portabilityportable
Stabilityexperimental
Maintainerbos@serpentine.com
Description
Types and functions common to many probability distributions.
Synopsis
class Distribution d where
density :: d -> Double -> Double
cumulative :: d -> Double -> Double
quantile :: d -> Double -> Double
class Distribution d => Mean d where
mean :: d -> Double
class Mean d => Variance d where
variance :: d -> Double
findRoot :: Distribution d => d -> Double -> Double -> Double -> Double -> Double
Documentation
class Distribution d whereSource
The interface shared by all probability distributions.
Methods
density :: d -> Double -> DoubleSource
Probability density function. The probability that a the random variable X has the value x, i.e. P(X=x).
cumulative :: d -> Double -> DoubleSource
Cumulative distribution function. The probability that a random variable X is less than x, i.e. P(Xx).
quantile :: d -> Double -> DoubleSource
Inverse of the cumulative distribution function. The value x for which P(Xx).
show/hide Instances
class Distribution d => Mean d whereSource
Methods
mean :: d -> DoubleSource
show/hide Instances
class Mean d => Variance d whereSource
Methods
variance :: d -> DoubleSource
show/hide Instances
findRootSource
:: Distribution d
=> d
-> DoubleProbability p
-> DoubleInitial guess
-> DoubleLower bound on interval
-> DoubleUpper bound on interval
-> Double

Approximate the value of X for which P(x>X)=p.

This method uses a combination of Newton-Raphson iteration and bisection with the given guess as a starting point. The upper and lower bounds specify the interval in which the probability distribution reaches the value p.

Produced by Haddock version 2.4.2