monte-carlo-0.4.1: A monad and transformer for Monte Carlo calculations.

Stabilityexperimental
MaintainerPatrick Perry <patperry@gmail.com>

Data.Summary.Double

Contents

Description

Summary statistics for Doubles.

Synopsis

The Summary data type

data Summary Source

A type for storing summary statistics for a data set including sample size, min and max values, and first and second moments.

Instances

summary :: [Double] -> SummarySource

Get a summary of a list of values.

update :: Summary -> Double -> SummarySource

Update the summary with a data point. Running mean and variance computed as in Knuth, Vol 2, page 232, 3rd edition, see http:www.johndcook.com/standard_deviation.html for a description.

Summary properties

sampleSize :: Summary -> IntSource

Get the sample size.

sampleMin :: Summary -> DoubleSource

Get the minimum of the sample.

sampleMax :: Summary -> DoubleSource

Get the maximum of the sample.

sampleMean :: Summary -> DoubleSource

Get the sample mean.

sampleSE :: Summary -> DoubleSource

Get the sample standard error.

sampleVar :: Summary -> DoubleSource

Get the sample variance.

sampleSD :: Summary -> DoubleSource

Get the sample standard deviation.

sampleCI :: Double -> Summary -> (Double, Double)Source

Get a Central Limit Theorem-based confidence interval for the mean with the specified coverage level. The level must be in the range (0,1).