StatisticsUtil
use StatisticsUtil;
use Statistics qw(:all);
StatisticsUtil module provides the following functions:
Average, AverageDeviation, Correlation, Covariance, Euclidean, Factorial, FactorialDivison, Frequency, GeometricMean, HarmonicMean, KLargest, KSmallest, Kurtosis, Maximum, Mean, Median, Minimum, Mode, PearsonCorrelation, Permutations, Product, RSquare, Range, Skewness, StandardDeviation, StandardDeviationN, StandardError, StandardScores, StandardScoresN, Standardize, Sum, SumOfSquares, TrimMean, Variance, VarianceN
Computes the mean of an array of numbers: SUM( x[i] ) / n
Computes the average of the absolute deviation of an array of numbers: SUM( ABS(x[i] - Xmean) ) / n
Computes the Pearson correlation coefficient between two arrays of numbers: SUM( (x[i] - Xmean)(y[i] - Ymean) ) / SQRT( SUM( (x[i] - Xmean)^2 )(SUM( (y[i] - Ymean)^2 )) )
Computes the euclidean distance of an array of numbers: SQRT( SUM( x[i] ** 2) )
Computes the covariance between two arrays of numbers: SUM( (x[i] - Xmean) (y[i] - Ymean) ) / n
Computes the factorial of a positive integer.
Compute the factorial divison of two positive integers.
A hash array is returned with keys and values representing range and frequency values, respectively. The frequency value for a specific key corresponds to all the values which are greater than the previous key and less than or equal to the current key. A key value representing maximum value is added for generating frequency distribution for specific number of bins, and whenever the maximum array value is greater than the maximum specified in bin range, it is also added to bin range.
Computes the geometric mean of an array of numbers: NthROOT( PRODUCT(x[i]) )
Computes the harmonic mean of an array of numbers: 1 / ( SUM(1/x[i]) / n )
Returns the k-largest value from an array of numbers.
Returns the k-smallest value from an array of numbers.
Computes the kurtosis of an array of numbers: [ {n(n + 1)/(n - 1)(n - 2)(n - 3)} SUM{ ((x[i] - Xmean)/STDDEV)^4 } ] - {3((n - 1)^2)}/{(n - 2)(n-3)}
Returns the largest value from an array of numbers.
Returns the smallest value from an array of numbers.
Computes the mean of an array of numbers: SUM( x[i] ) / n
Computes the median value of an array of numbers. For an even number array, it's the average of two middle values.
For even values of n: Xsorted[(n - 1)/2 + 1] For odd values of n: (Xsorted[n/2] + Xsorted[n/2 + 1])/2
Returns the most frequently occuring value in an array of numbers.
Computes the Pearson correlation coefficient between two arrays of numbers: SUM( (x[i] - Xmean)(y[i] - Ymean) ) / SQRT( SUM( (x[i] - Xmean)^2 )(SUM( (y[i] - Ymean)^2 )) )
Generate all possible permuations or a specific permutations of items in an array and return a reference to an array containing array references to generated permuations.
This alogrithm is based on the example provided by Mark Jason-Dominus, and is available at CPAN as mjd_permute standalone script.
Compute the product of an array of numbers.
Return the smallest and largest values from an array of numbers.
Computes square of the Pearson correlation coefficient between two arrays of numbers.
Computes the skewness of an array of numbers: {n/(n - 1)(n - 2)} SUM{ ((x[i] - Xmean)/STDDEV)^3 }
Computes the standard deviation of an array of numbers. SQRT ( SUM( (x[i] - mean)^2 ) / (n - 1) )
Computes the standard deviation of an array of numbers representing entire population: SQRT ( SUM( (x[i] - mean)^2 ) / n )
Computes the standard error using standard deviation and sample size.
Standardizes the value using mean and standard deviation.
Computes the standard deviation above the mean for an array of numbers: (x[i] - mean) / (n - 1)
Computes the standard deviation above the mean for an array of numbers representing entire population: (x[i] - mean) / n
Compute the sum of an array of numbers.
Computes the sum of an array of numbers.
Computes the mean of an array of numbers by excluding a fraction of numbers from the top and bottom of the data set.
Computes the variance of an array of numbers: SUM( (x[i] - Xmean)^2 / (n - 1) )
Compute the variance of an array of numbers representing entire population: SUM( (x[i] - Xmean)^2 / n )
Constants.pm, ConversionsUtil.pm, MathUtil.pm
Copyright (C) 2024 Manish Sud. All rights reserved.
This file is part of MayaChemTools.
MayaChemTools is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.