Gaussian and Binomial distributions
Project description
distributions_bc package
Prerequisites
Python 3.7.4+ matplotlib package
Files
Contains 3 files:
- generaldistribution.py
- binomialdistribution.py
- gaussiandistribution.py
Description
-
generaldistribution.py contains a Distribution class
-
binomialdistribution.py creates a Binomial class that inherits from the Distribution class. This Binomial class has attributes typically associated with a Binomial Distribution (n, p, k, mean, stdev etc.) that can be either specified or determined from a file read in. The Binomial class also has methods that allow the computation of the probability distribution function and its plotting. A magic method that allows the addition of 2 Binomial Objects with the same p is also present
-
gaussiandistribution.py creates a Gaussian class that inherits from the Distribution class. This Gaussian class has attributes typically associated with a Gaussian Distribution (mean, stdev) that can be either specified or determined from a file read in. The Binomial class also has methods that allow the computation of the probability distribution function and its the plotting. A magic method that allows the addition of 2 Gaussian Objects is also present
Installation
pip install distributions_bc
Usage
from distributions_bc import Gaussian
g1 = Gaussian(mu = 23, sigma = 2)
g1.mean # 23
g1.stdev # 2
g1.pdf(x = 22) # 0.2787008074875851
g1.read_data_file('numbers.txt') # Reads file and updates attributes and parameters
Authors
Charles Gauthey
License
distributions_bc is offered under the MIT license
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 distributions_bc-0.4.tar.gz.
File metadata
- Download URL: distributions_bc-0.4.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
959b2ab15f183584836001278ffbc835163773ca29cdf23ec4e610728b470e74
|
|
| MD5 |
86422faec4e1d19a02ebbac0683ff6b3
|
|
| BLAKE2b-256 |
fc1c7aa8fed44220ae1cfb8057b435544e1b6e9ef42044b1db6fba5b709a91af
|