StatsFunctions module

Created on Mon Sep 18 09:48:14 2023

This class relates to statistical tests etc.

@author: jbeckwith

class StatsFunctions.Statistics_Functions

Bases: object

bincalculator(data)

bincalculator function reads in data and generates bins according to Freedman-Diaconis rule

Parameters:

histogrammed (data is data to be)

Returns:

bins (np.1darray) – array of bins

gamma_pdf(x, k, theta)

gamma_pdf function takes x, alpha beta and outputs gamma pdf

Parameters:
  • x (np.1darray) – x values to evaluate function at

  • k (float) – shape parameter

  • theta (float) – scale parameter

Returns:

f (np.1darray) – f(x, k, theta)

rejectoutliers(data)

rejectoutliers function rejects outliers from data, does iqr method (i.e. anything below lower quartile (25 percent) or above upper quartile (75 percent) is rejected)

Parameters:

data (np.1darray) – data matrix

Returns:

newdata (np.1darray) – data matrix