Skip to content
salmoni edited this page Feb 9, 2013 · 3 revisions

CompStatsPython is a project to release some old statistics code into the wild. I've been developing this for fun for a few years and it's wasted here. It's also unit tested (check if a test exists to see if a routine's been tested) so the algorithms should be reliable. Finally, it forms the basis of code for a book I'm releasing about performing statistics with Python.

The list of planned tests is below, but many more (especially inferential tests) will be included.

  • VSort - sort a vector
  • MSort - sort a numpy.matrix
  • CalculateRanks - for calculating the ranks of a numpy.matrix
  • GetSSCP_M - calculates the sum of squares and cross-products numpy.matrix
  • GetVarsCovars_M - calculates the variances and covariances numpy.matrix
  • GetVariances - calculates the variances of a numpy.matrix of variables
  • GetStdDevs - calculates the standard deviations of a numpy.matrix of variables
  • GetCorrelationMatrix - calculates the correlation numpy.matrix
  • Count - returns the number of non-missing data
  • Sum - returns the sum of non-missing data
  • Minimum - returns the minimum of non-missing data
  • Maximum - returns the maximum of non-missing data
  • Range - maximum minus the minimum
  • Proportions - Proportions of values
  • relfreqmode - Relative frequency of the mode
  • CumSum - Cumulative sum
  • CumProduct - Cumulative product
  • CumPercent - Cumulative percentage
  • Frequencies - Frequencies of values
  • TrimmedData - Trims data
  • TrimmedMean - Trimmed mean
  • BiTrimmedMean - Trimmed mean with different trims each end
  • Mean - Arithmetic mean
  • Median - Median
  • Mode - Modal value(s)
  • Moment - Moments of the distribution
  • TukeyQuartiles - returns Tukey's hinges
  • MooreQuartiles - returns Moore & McCabe's hinges
  • SPQuantile - quantile used by S-Plus
  • TradQuantile - quantile used by SPSS
  • MidstepQuantile - mid-step qua
  • Q1 - Q1 quantile from Hyndnumpy.man & Fan
  • Q2 - Q2 quantile from Hyndnumpy.man & Fan
  • Q3 - Q3 quantile from Hyndnumpy.man & Fan
  • Q4 - Q4 quantile from Hyndnumpy.man & Fan
  • Q5 - Q5 quantile from Hyndnumpy.man & Fan
  • Q6 - Q6 quantile from Hyndnumpy.man & Fan
  • Q7 - Q7 quantile from Hyndnumpy.man & Fan
  • Q8 - Q8 quantile from Hyndnumpy.man & Fan
  • Q9 - Q9 quantile from Hyndnumpy.man & Fan
  • InterquartileRange -
  • SS - sum of squares
  • SSDevs - sum of squared deviations from the mean
  • SampVar - sample variance
  • PopVar - population variance
  • SampStdDev - sample standard deviation
  • PopStdDev - population standard deviation
  • StdErr - standard error
  • CoeffVar - coefficient of variation
  • ConfidenceIntervals - returns the confidence intervals
  • numpy.maD - Median absolute deviation
  • GeometricMean - the geometric mean
  • HarmonicMean - the harmonic mean
  • MSSD - mean of subsequent squared deviations
  • Skewness - returns the skewness
  • Kurtosis - returns the kurtosis
  • StandardScore - transforms a vector into a standard (ie, z-) score
  • EffectSizeControl - returns an effect size if a control condition is present
  • EffectSize - returns an effect size if no control is present
  • FiveNumber - Tukey's five number sumnumpy.mary (minimum, lower quartile, median, upper quartile, maximum)
  • OutliersSQR - returns two arrays, one of outliers defined by 1.5 * IQR, and the other without these outliers

Finally, there's also a small but under-development library for statistics with Prolog! This is a side project I'm doing for more numerical fun.

Have fun

Clone this wiki locally