BaseDistribution#
- class BaseDistribution[source]#
Bases:
objectBare-bones class for statistical distributions to provide consistent methods.
This class serves as a template for other distribution classes, defining the common interface for probability density function (PDF), cumulative distribution function (CDF), and statistics.
- Attributes:
Methods
cdf(x)Compute the cumulative density function (CDF) for the distribution.
pdf(x)Compute the probability density function (PDF) for the distribution.
stats()Computes and returns the statistical properties of the distribution, including,
- cdf(x: ndarray) ndarray[source]#
Compute the cumulative density function (CDF) for the distribution.
- Parameters:
x – Input array at which to evaluate the CDF.
- property mean#
The mean of the distribution.
- property median#
The median of the distribution.
- property mode#
The mode of the distribution.
- pdf(x: ndarray) ndarray[source]#
Compute the probability density function (PDF) for the distribution.
- Parameters:
x – Input array at which to evaluate the PDF.
- stats() Dict[str, float][source]#
Computes and returns the statistical properties of the distribution, including,
mean,
median,
variance, and
standard deviation.
- Returns:
A dictionary containing statistical properties such as mean, variance, etc.
- Return type:
Notes
If any of the parameter is not computable for a distribution, this method returns None.
- property stddev#
The standard deviation of the distribution.
- property variance#
The variance of the distribution.