statistics
A library of statistical types, data, and functions
This library provides a number of common functions and types useful in
statistics. We focus on high performance, numerical robustness, and
use of good algorithms. Where possible, we provide references to the
statistical literature. . The library's facilities can be divided into
four broad categories: . * Working with widely used discrete and
continuous probability distributions. (There are dozens of exotic
distributions in use; we focus on the most common.) . * Computing with
sample data: quantile estimation, kernel density estimation,
histograms, bootstrap methods, significance testing, and regression
and autocorrelation analysis. . * Random variate generation under
several different distributions. . * Common statistical tests for
significant differences between samples.
Obtain statistics about a running supervisor.
Obtain statistics (from/to anywhere) about a mailbox.
Track the number of tests that were run and failures of a
TestTree or sub-tree.
Statistics gathered on a running expression builder. See
getStatistics.
This module provides a set of statistics over the execution of the
registry. This allows to get better insights over the execution or
test that the registry is well configured
This datatype records: - the created values - the applied functions -
the specializations used to create values
This module returns creation data about the values created when
created a value of a given type
Basic bounded statistics. In the following, a bound n is
given stating the number of periods over which to compute the
statistic (n == 1 computes it only over the current period).
Provides the main interface for retrieving statistics tabulated by a
histogram.
Useful statistical functions
Linear regression between two samples, based on the 'statistics' package.
Provides functions to perform a linear regression between 2 samples,
see the documentation of the linearRegression functions. This library
is based on the
statistics package.
- 0.3: you can now use all functions on any instance of the Vector
class (not just unboxed vectors).
- 0.2.4: added distribution estimations for standard regression
parameters.
- 0.2.3: added robust-fit support.
- 0.2.2: added the Total-Least-Squares version and made some
refactoring to eliminate code duplication
- 0.2.1: added the r-squared version and improved the
performances.
Code sample:
import qualified Data.Vector.Unboxed as U
test :: Int -> IO ()
test k = do
let n = 10000000
let a = k*n + 1
let b = (k+1)*n
let xs = U.fromList [a..b]
let ys = U.map (\x -> x*100 + 2000) xs
-- thus 100 and 2000 are the alpha and beta we want
putStrLn "linearRegression:"
print $ linearRegression xs ys
The r-squared and Total-Least-Squares versions work the same way.