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

MaintainerPatrick Perry <>




Summary statistics for Bools.


The Summary data type

data Summary Source

A type for storing summary statistics for a data set of booleans. Specifically, this just keeps track of the number of True events and gives estimates for the success probability. True is interpreted as a one, and False is interpreted as a zero.


summary :: [Bool] -> SummarySource

Get a summary of a list of values.

update :: Summary -> Bool -> SummarySource

Update the summary with a data point.

Summary properties

sampleSize :: Summary -> IntSource

Get the sample size.

count :: Summary -> IntSource

Get the number of True values

sampleMean :: Summary -> DoubleSource

Get the proportion of True events.

sampleSE :: Summary -> DoubleSource

Get the standard error for the sample proportion.

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