Lite(3pm) | User Contributed Perl Documentation | Lite(3pm) |
Statistics::Lite - Small stats stuff.
use Statistics::Lite qw(:all); $min= min @data; $mean= mean @data; %data= statshash @data; print "sum= $data{sum} stddev= $data{stddev}\n"; print statsinfo(@data);
This module is a lightweight, functional alternative to larger, more complete, object-oriented statistics packages. As such, it is likely to be better suited, in general, to smaller data sets.
This is also a module for dilettantes.
When you just want something to give some very basic, high-school-level statistical values, without having to set up and populate an object first, this module may be useful.
This module implements standard deviation and variance calculated by both the unbiased and biased estimators.
"count(@data)" simply returns "scalar(@data)".
Please note that this module does not ignore undefined values in your data; instead, those are treated as zero.
The ":all" import tag imports all exportable functions from this module into the current namespace (use with caution). More specifically, these functions are the following: "min", "max", "range", "sum", "count", "mean", "median", "mode", "variance", "stddev", "variancep", "stddevp", "statshash", "statsinfo", and "frequencies".
To import the statistical functions, use the import tag ":funcs". This imports all of the above-mentioned functions, except for "statshash", "statsinfo", and "frequencies".
Use ":stats" to import "statshash(@data)" and "statsinfo(@data)".
<https://github.com/brianary/Statistics-Lite>
Brian Lalonde <brian@webcoder.info>, "stddev(@data)", "stddevp(@data)", "variance(@data)", "variancep(@data)", additional motivation by Nathan Haigh, with kind support from Alexander Zangerl.
The project lives at https://github.com/brianary/Statistics-Lite
Copyright 2000 Brian Lalonde <brian@webcoder.info>, Nathan Haigh, Alexander Zangerl, and Ton Voon.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
2021-01-07 | perl v5.32.0 |