-
Notifications
You must be signed in to change notification settings - Fork 0
Calculations
The Calculations
module provides a set of static methods for performing various statistical analyses on datasets. The Describe
class within this module offers methods to calculate essential descriptive statistics, such as mean, variance, standard deviation, skewness, kurtosis, and median.
The Describe
class contains the following static methods:
@staticmethod
def mean(dataset)
Calculates the arithmetic mean of a given dataset.
Parameters:
-
dataset
: A list of numeric values.
Returns:
- The mean of the dataset as a float.
@staticmethod
def variance(dataset, mean)
Calculates the variance of a given dataset.
Parameters:
-
dataset
: A list of numeric values. -
mean
: The mean of the dataset.
Returns:
- The variance of the dataset as a float.
@staticmethod
def standard_deviation(variance)
Calculates the standard deviation from the variance.
Parameters:
-
variance
: The variance of the dataset.
Returns:
- The standard deviation as a float.
@staticmethod
def skewness(dataset, mean, deviation)
Calculates the skewness of a given dataset, which measures the asymmetry of the distribution.
Parameters:
-
dataset
: A list of numeric values. -
mean
: The mean of the dataset. -
deviation
: The standard deviation of the dataset.
Returns:
- The skewness as a float.
@staticmethod
def kurtosis(dataset, mean, deviation)
Calculates the kurtosis of a given dataset, which measures the "tailedness" of the distribution.
Parameters:
-
dataset
: A list of numeric values. -
mean
: The mean of the dataset. -
deviation
: The standard deviation of the dataset.
Returns:
- The kurtosis as a float.
@staticmethod
def median(dataset)
Calculates the median value of a given dataset.
Parameters:
-
dataset
: A list of numeric values.
Returns:
- The median of the dataset as a float.
This module is designed for easy integration into data analysis workflows, allowing users to obtain critical statistical insights with minimal effort. Simply import the Describe
class and utilize the static methods to analyze your datasets effectively.