statistics-0.16.2.0: A library of statistical types, data, and functions
Copyright(c) 2017 Gregory W. Schwartz
LicenseBSD3
Maintainergsch@mail.med.upenn.edu
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Statistics.Sample.Normalize

Description

Functions for normalizing samples.

Synopsis

Documentation

standardize :: Vector v Double => v Double -> Maybe (v Double) Source #

O(n) Normalize a sample using standard scores:

\[ z = \frac{x - \mu}{\sigma} \]

Where μ is sample mean and σ is standard deviation computed from unbiased variance estimation. If sample to small to compute σ or it's equal to 0 Nothing is returned.