statistical-modeling

build Maintainability codecov MIT license

EO principles respected here Managed By Self XDSD

statistical-modeling is a Python package that provides two main features:

  • Statistical analysis of samples
  • Working with distributions

Example

import statistical_modeling as sm

from matplotlib import pyplot as plt

print(sm.RandomInt(sm.geometric.Distribution(0.1)))

s = sm.RandomSample(
    100,
    sm.binomial.Distribution(10, 0.5),
    sm.binomial.CumulativeAlgorithm()
)

print(
    f"Mean = {sm.Mean(s)},\n"
    f"Variance = {sm.Variance(s)}"
)

fig, ax = plt.subplots()
sm.plot_pdf(s, ax)
fig.show()