Skip to main content

A package for evaluating distributions in python

Project description

Documentation Status codecov ci-cd

pystats_norm

App Platform

pystats is a lightweight statistical package that performs normal distributions calculations. Inspired by the simplicity and functionality of statistical tools in base R, pystats provides a focused set of functions for generating random samples, calculating cumulative probabilities, determining quantiles, and evaluating probability density functions. This package hopes to serve statisticians, data scientists, and researchers looking to derive meaningful insights from their data.

It features the following core functions:

  1. rnorm: Generate random samples from a normal distribution
  2. pnorm: Compute probabilities for a given quantile (cumulative distribution function)
  3. qnorm: Calculate the quantile (inverse of cumulative distribution function) for a given probability
  4. dnorm: Evaluate the probability density function.

Contributors

The members of the pystats team are:

  • Sarah Eshafi
  • Jason Lee
  • Abdul Safdar
  • Rong Wan

Installation

To use pystats, please follow these instructions:

1. Clone the repository

Navigate to the green "Code" button at the top of this repository. Copy the SSH link (if you have SSH configured on your machine) or the HTTPS link. In terminal, navigate to the folder you would like to clone this repository and type:

$ git clone <LINK>

2. Create the virtual environment

Still in the terminal, navigate to the root of the newly cloned repository and type:

$ conda env create environment.yml

3. Install the package

Install pystats with the following command:

$ poetry install

4. Open a Python Interpreter and import the functions

In the terminal, input:

$ python

This opens a Python interpreter. Input the following commands to import the functions:

>>> from pystats.pnorm import pnorm
>>> from pystats.dnorm import dnorm
>>> from pystats.qnorm import qnorm
>>> from pystats.rnorm import rnorm

You can now use the functions in your terminal Python interpreter!

Functions

rnorm(n, mean=0, sd=1):

Generates a NumPy array of length n containing normally distributed random variables with mean equal to mean and sd equal to sd.

pnorm(q, mean=0, sd=1, lower_tail=True):

Computes the cumulative distribution function (CDF) for a given quantile.

qnorm(p, mean=0, sd=1, lower_tail=True):

Computes the quantile (inverse CDF) for a given probability.

dnorm(x, mean=0, sd=1):

Calculates the Probability Density of the normal distribution for a given value

Python Ecosystem Integration

pystats is designed as a lightweight and intuitive package for normal distribution calculations. While similar functionality exists in libraries such as SciPy and NumPy, pystats focuses exclusively on normal distributions, offering simplified functions with user-friendly syntax designed for statistical analysis. By providing well-documented and focused functionality, it serves as a niche yet essential tool in the Python ecosystem.

Related Packages:

Usage

Work in progress. To be updated in a future release.

Contributing

Interested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms. For more details refer to our Contributing.md file.

License

pystats was created by Sarah Eshafi, Jason Lee, Abdul Safdar, Rong Wan. It is licensed under the terms of the MIT license.

Credits

pystats was created with cookiecutter and the py-pkgs-cookiecutter template.

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

pystats_norm-0.1.0.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

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

pystats_norm-0.1.0-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file pystats_norm-0.1.0.tar.gz.

File metadata

  • Download URL: pystats_norm-0.1.0.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for pystats_norm-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e67c54931ac92e2bf85b64c5b23a320921daeab9d292ee76ce1cb3afaa9eaadc
MD5 49a020cadda1b63e3625b94371d92528
BLAKE2b-256 8509e9937aac25906e2023be5fce91ade55e0115a057d0ee16eb7185ec2ce442

See more details on using hashes here.

File details

Details for the file pystats_norm-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pystats_norm-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for pystats_norm-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e8e565cb6b65ac21052c2f584b4c29ca7fdba173e6477935f12999774e1b264d
MD5 3bd4e9e656ea9eda63c82d52fe4a97e5
BLAKE2b-256 beb6b9e0e7e049dc441fec5c57ade2c72e5ea39cc6c3640f1be8195d8b934add

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