Statistics (stats.py)
The Statistics module in NumLex offers a variety of functions for statistical analysis, including calculations for means, medians, modes, var, and standard deviation.
Functions
-
ungrp_mean(data)
: Calculates the mean for ungrouped data.mean = ungrp_mean([10, 20, 30, 40, 50]) -
grp_mean(data, frequencies)
: Calculates the mean for grouped data.mean = grp_mean([10, 20, 30], [2, 3, 5]) -
median(data)
: Finds the median of a dataset.med = median([10, 20, 30, 40, 50]) -
ungrp_mode(data, frequencies)
: Determines the mode for ungrouped data.mode = ungrp_mode([10, 20, 20, 30, 40],[2, 3, 5,9]) -
raw_mode(data)
: Determines the raw mode of data.mode = raw_mode([10, 20, 20, 30, 40]) -
var(data)
: Calculates the variance of data.variance = var([10, 20, 30, 40, 50]) -
std_dev(data)
: Calculates the standard deviation of data.std_deviation = std_dev([10, 20, 30, 40, 50])