https://github.com/joozef315/jgb_distributions
Python library dealing with Probability distributions.
https://github.com/joozef315/jgb_distributions
python statistics
Last synced: 22 days ago
JSON representation
Python library dealing with Probability distributions.
- Host: GitHub
- URL: https://github.com/joozef315/jgb_distributions
- Owner: JooZef315
- License: other
- Created: 2021-07-25T23:01:39.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-07-25T23:17:41.000Z (almost 5 years ago)
- Last Synced: 2025-03-06T19:44:13.435Z (over 1 year ago)
- Topics: python, statistics
- Language: Python
- Homepage: https://pypi.org/project/JGB-distributions/
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: License.txt
Awesome Lists containing this project
README
# JGB_distributions
## Description
JGB_distributions is a Python library for dealing with Gaussian (normal) and Binomial Probability distributions.
## Files
Generaldistribution.py: generic distribution class
Binomialdistribution.py: Binomial distribution class for calculating and
visualizing a Binomial distribution.
Gaussiandistribution.py: Gaussian distribution class for calculating and
visualizing a Gaussian distribution.
## Installation
Use the package manager [pip](https://pip.pypa.io/en/stable/) to install JGB_distributions.
```bash
pip install JGB_distributions
```
## Usage
```python
import JGB_distributions
# returns 'mean, standard deviation of a Gaussian distributions'
G = JGB_distributions.Gaussian(mean, stdev)
# returns 'mean, standard deviation, probability and size of a Binomial distributions'
B = JGB_distributions.Binomial(prop, n)
# returns 'mean, standard deviation of a Gaussian distributed data'
G.read_data_file(file_name)
# returns 'mean, standard deviation, probability and size of a Binomial distributed data'
B = JGB_distributions.Binomial()
B.read_data_file(file_name)
B.replace_stats_with_data()
# to calculate the mean for a dataset
G.calculate_mean()
B.calculate_mean()
# to calculate the standard deviation for the two distributions
G.calculate_stdev()
B.calculate_stdev()
# to plot the distributions
G.plot_histogram()
B.plot_bar()
# to calculate Probability density function for the two distributions
G.pdf(point)
B.pdf(point)
# to plot Probability density function for the two distributions
G.plot_histogram_pdf(number of data points)
B.plot_bar_pdf()
# to add two distributions of the same type
G_1 + G_2
B_1 + B_2
```
## License
This project is licensed under the [MIT](https://choosealicense.com/licenses/mit/) - see the License.txt file for details