# FreeBSD Manual Pages

Lite(3) User Contributed Perl Documentation Lite(3)NAMEStatistics::Lite - Small stats stuff.SYNOPSISuse Statistics::Lite qw(:all); $min= min @data; $mean= mean @data; %data= statshash @data; print "sum= $data{sum} stddev= $data{stddev}\n"; print statsinfo(@data);DESCRIPTIONThis 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.NOTEThis module implements standard deviation and variance calculated by both the unbiased and biased estimators.FUNCTIONS"min(@data)", "max(@data)", "range(@data)", "sum(@data)", "count(@data)" Returns the minimum value, maximum value, range (max - min), sum, or count of values in @data. Undefined values are ignored. "count(@data)" simply returns "scalar(@data)".Pleasenotethat this module doesnotignore undefined values in your data; instead, those aretreatedaszero. "mean(@data)", "median(@data)", "mode(@data)" Calculates the mean, median, or mode average of the values in @data. Undefined values are ignored. (In the event of ties in the mode average, their mean is returned.) "variance(@data)", "stddev(@data)" Returns the standard deviation or variance of @data for a sample (same as Excel's STDEV). This is also called the Unbiased Sample Variance and involves dividing the sample's squared deviations by N-1 (the sample count minus 1). The standard deviation is just the square root of the variance. "variancep(@data)", "stddevp(@data)" Returns the standard deviation or variance of @data for the population (same as Excel's STDEVP). This involves dividing the squared deviations of the population by N (the population size). The standard deviation is just the square root of the variance. "statshash(@data)" Returns a hash whose keys are the names of all the functions listed above, with the corresponding values, calculated for the data set. "statsinfo(@data)" Returns a string describing the data set, using the values detailed above. "frequencies(@data)" Returns a hash. The keys are the distinct values in the data set, and the values are the number of times that value occurred in the data set.ImportTagsThe ":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)".REPOSITORY<https://github.com/brianary/Statistics-Lite>AUTHORBrian 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-LiteCOPYRIGHT AND LICENSECopyright 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.SEE ALSOperl(1). perl v5.24.1 2017-07-03 Lite(3)

NAME | SYNOPSIS | DESCRIPTION | FUNCTIONS | REPOSITORY | AUTHOR | COPYRIGHT AND LICENSE | SEE ALSO

Want to link to this manual page? Use this URL:

<https://www.freebsd.org/cgi/man.cgi?query=Statistics::Lite&sektion=3&manpath=FreeBSD+12.1-RELEASE+and+Ports>