Skip to main content

stats library

Project description

pyez_stats

A python library that allows for easy statistical analysis.

This library has functionality for hypothesis testing, Bayesian statistical analysis, linear regression and multiple linear regression and principle component analysis. The distribution module allows the user to fit passed in data to multiple distributions and calculate mean, median and variance and other statistical values. It also allows for calculating probability density functions, cumulative distribution functions and percentiles of the data.

The main class in this library is the Data class that incorporates every other class into it allowing for easy statistical analysis in one array like data structure.

Installation

pip install pyez_stats

Get Started

Below is a simple array of data passed into our Data class. We set the model to be a Gaussian distribution, then calculate the mean and probabilty of a certain value.

import pyez_stats as ez



arr = [11, 11, 12, 11, 12, 13, 14, 16, 18, 16, 15]



data = ez.Data(arr)



data.set_model("gaus")



print(data.pdf(12))



print(data.mean())

Using the modules

Below we show how to use multiple of the modules in the pyez_stats library.

Hypothesis Test

hyp_test = data.hypothesis_test("gauss")



print(hyp_test(11, wald_test=True, left_tail=True))



print(hyp_test(11, z_test=True, right_tail=True, sigma=3))



print(hyp_test(11, t_test=True, left_tail=True))

Bayesian Statistics

bays = data.bayesian_statistic(likelihood="gaus", prior="gaus")



bays.set_theta_range([10, 18])



print(bays.plot_posteriors(var = 3))



print(bays.map(var = 3))

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyez_stats-0.1.1.tar.gz (24.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyez_stats-0.1.1-py3-none-any.whl (28.1 kB view details)

Uploaded Python 3

File details

Details for the file pyez_stats-0.1.1.tar.gz.

File metadata

  • Download URL: pyez_stats-0.1.1.tar.gz
  • Upload date:
  • Size: 24.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for pyez_stats-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a9b1a9b65047aa63c148b1975efe323619bfbeeae0931c1061bfd3bdbea309c1
MD5 1d85d2dfcf2e5eb67f2ce21efc99588b
BLAKE2b-256 5481da605211fa8fab7808eb103fd96f24b9b564d9feec5c13405993272d7cdc

See more details on using hashes here.

File details

Details for the file pyez_stats-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pyez_stats-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 28.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for pyez_stats-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 60153fdd31d02207be1e6a1db290cb82b2fcf332fa5b58139b291ae75ba527a3
MD5 323fd45a6c3925f566fdcbab9a705b40
BLAKE2b-256 ee8e5a74151a0736aeef8bd077e84467f0e56e25998d4ad8f31ba08675b7ecdf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page