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

Stabilityexperimental
MaintainerPatrick Perry <patperry@gmail.com>

Data.Summary.Bool

Contents

Description

Summary statistics for Bools.

Synopsis

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.

Instances

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