Statistical Probability Distributions Package
Project description
spd_stats: Statistical Probability Distributions Package
Description:
spd_stats is a Python package designed for statistical analysis, calculation, and visualization of various probability distributions. It provides classes for representing and manipulating Gaussian and Binomial distributions, along with generic distribution functionalities.
Installation:
To install spd_stats, simply use pip:
pip install spd_stats
Usage
# Import Gaussian and Binomial distributions from spd_stats
from spd_stats import Gaussian, Binomial
# Create a Gaussian distribution with mean 0 and standard deviation 1
gaussian = Gaussian(0, 1)
# Create a Binomial distribution with probability 0.5 and size 20
binomial = Binomial(0.5, 20)
# Read data from a file into a distribution
gaussian.read_data_file("gaussian_data.txt")
binomial.read_data_file("binomial_data.txt")
# Calculate and print mean and standard deviation of distributions
print("Gaussian Mean:", gaussian.mean)
print("Gaussian Standard Deviation:", gaussian.stdev)
print("Binomial Mean:", binomial.mean)
print("Binomial Standard Deviation:", binomial.stdev)
# Plot histograms and probability density functions
gaussian.plot_histogram()
gaussian.plot_histogram_pdf()
binomial.plot_bar()
binomial.plot_bar_pdf()
# Add two distributions together
sum_distribution = gaussian + gaussian
# Output characteristics of the sum distribution
print("Sum Distribution:", sum_distribution)
Classes:
Gaussian:
Represents a Gaussian (normal) distribution. Attributes: mean, standard deviation, data. Methods: calculate_mean, calculate_stdev, plot_histogram, pdf, plot_histogram_pdf, add, repr.
Binomial:
Represents a Binomial distribution. Attributes: mean, standard deviation, data, p (probability of success), n (number of trials). Methods: calculate_mean, calculate_stdev, replace_stats_with_data, plot_bar, pdf, plot_bar_pdf, add, repr.
Distribution:
Generic distribution class. Attributes: mean, standard deviation, data. Methods: read_data_file.
Contributing:
Thank you for your interest in contributing to spd_stats! At the moment, there is no specific content outlined for contributing guidelines. However, we welcome your input and contributions once we establish the guidelines.
License:
This package is licensed under the MIT License.
Author:
Pradeep Sahani
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file spd_stats-0.1.0.tar.gz.
File metadata
- Download URL: spd_stats-0.1.0.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.10.0 readme-renderer/34.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.18 tqdm/4.64.1 importlib-metadata/3.7.0 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
26c9da7f5a7f2f368b1341f202232dc5f676579ec6c9308c72b4d8ccf34f4959
|
|
| MD5 |
390245fce2916cd603f6a35d32af238c
|
|
| BLAKE2b-256 |
ee0132afa634a5d713bf44ff5e127b865b5aa4cf385cc111a3038c83c071f863
|