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

MaintainerPatrick Perry <>




Summary statistics for Doubles.


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.


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 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).