# KamiStats
KamiStats is a Python module designed to provide implementations of various statistical distributions, including but not limited to Binomial, Hypergeometric, and Poisson distributions. This library allows users to create instances of these distributions, calculate their probability mass functions (PMF), cumulative distribution functions (CDF), and other statistical properties such as mean, variance, and standard deviation.
## Table of Contents
- [Installation](#installation)
- [Usage](#usage)
- [Binomial Distribution](#binomial-distribution)
- [Hypergeometric Distribution](#hypergeometric-distribution)
- [Poisson Distribution](#poisson-distribution)
- [Examples](#examples)
- [Dependencies](#dependencies)
- [License](#license)
## Installation
Instructions on how to install the necessary packages and set up the environment.
```sh
# Clone the repository
git clone https://github.com/kishimita/KamiStats.git
# Navigate to the project directory
cd KamiStats
# Install the required dependencies
pip install -r requirements.txt
```
## Usage
Below are 3 examples of how to use the distributions of this module to calculate the probability mass function, cumulative probability function, mean, varience and standard deviation. For the rest of the distributions the code is self explanatory and has similar implementation as the ones in the example below.
### Binomial Distribution
The BinomialDist class represents a binomial distribution.
Example
```python
from KamiStats import distributions as dist
# Create a Binomial distribution instance
binom_dist = dist.BinomialDist(n=10, p=0.5, q=0.5, k=5)
# Calculate the probability mass function
print(binom_dist.pmf())
# Calculate the cumulative distribution function
print(binom_dist.cdf())
# Get the mean
print(binom_dist.mean)
# Get the variance
print(binom_dist.variance)
# Get the standard deviation
print(binom_dist.std_dev)
```
### Hypergeometric Distribution
The HypergeometricDist class represents a hypergeometric distribution.
Example
```python
from KamiStats import distributions as dist
# Create a Hypergeometric distribution instance
hypergeom_dist = dist.HypergeometricDist(N=20, n=10, K=5, k=3)
# Calculate the probability mass function
print(hypergeom_dist.pmf())
# Calculate the cumulative distribution function
print(hypergeom_dist.cdf())
# Get the mean
print(hypergeom_dist.mean)
# Get the variance
print(hypergeom_dist.variance)
# Get the standard deviation
print(hypergeom_dist.std_dev)
```
### Poisson Distribution
The PoissonDist class represents a Poisson distribution.
Example
```python
from KamiStats import distributions as dist
# Create a Poisson distribution instance
poisson_dist = dist.PoissonDist(λ=4, k=2)
# Calculate the probability mass function
print(poisson_dist.pmf())
# Calculate the cumulative distribution function
print(poisson_dist.cdf())
# Get the mean
print(poisson_dist.mean)
# Get the variance
print(poisson_dist.variance)
# Get the standard deviation
print(poisson_dist.std_dev)
```
## Not for Use!
Any file in the test_scripts, and tests. This was used for unittest and due to files and folder struectures the code does not work.
## Dependencies
List of dependencies required for the project are listed here and in the ***requirements.txt*** file.
Package Version
------- -------
mpmath 1.3.0
numpy 2.0.1
pip 24.2
scipy 1.14.0
sympy 1.13.2
## License
Copyright 2024 Kishimita
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files
(the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify,
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Raw data
{
"_id": null,
"home_page": null,
"name": "KamiStats",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "statistics distributions, probability, random variables, pdf, cdf, mean, variance, \u00dfstandard deviation",
"author": null,
"author_email": "Kishimita <kishimita7@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/6f/3b/da68e44f288a9cd810757870e00a630b5f6349b698def747f3ef779a2136/kamistats-0.1.2.tar.gz",
"platform": null,
"description": "# KamiStats\n\nKamiStats is a Python module designed to provide implementations of various statistical distributions, including but not limited to Binomial, Hypergeometric, and Poisson distributions. This library allows users to create instances of these distributions, calculate their probability mass functions (PMF), cumulative distribution functions (CDF), and other statistical properties such as mean, variance, and standard deviation.\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n - [Binomial Distribution](#binomial-distribution)\n - [Hypergeometric Distribution](#hypergeometric-distribution)\n - [Poisson Distribution](#poisson-distribution)\n- [Examples](#examples)\n- [Dependencies](#dependencies)\n- [License](#license)\n\n## Installation\n\nInstructions on how to install the necessary packages and set up the environment.\n\n```sh\n# Clone the repository\ngit clone https://github.com/kishimita/KamiStats.git\n\n# Navigate to the project directory\ncd KamiStats\n\n# Install the required dependencies\npip install -r requirements.txt\n```\n## Usage\nBelow are 3 examples of how to use the distributions of this module to calculate the probability mass function, cumulative probability function, mean, varience and standard deviation. For the rest of the distributions the code is self explanatory and has similar implementation as the ones in the example below. \n\n### Binomial Distribution\nThe BinomialDist class represents a binomial distribution.\n\nExample\n```python \nfrom KamiStats import distributions as dist\n\n# Create a Binomial distribution instance\nbinom_dist = dist.BinomialDist(n=10, p=0.5, q=0.5, k=5)\n\n# Calculate the probability mass function\nprint(binom_dist.pmf())\n\n# Calculate the cumulative distribution function\nprint(binom_dist.cdf())\n\n# Get the mean\nprint(binom_dist.mean)\n\n# Get the variance\nprint(binom_dist.variance)\n\n# Get the standard deviation\nprint(binom_dist.std_dev)\n```\n\n### Hypergeometric Distribution\nThe HypergeometricDist class represents a hypergeometric distribution.\n\nExample\n```python\nfrom KamiStats import distributions as dist \n\n# Create a Hypergeometric distribution instance\nhypergeom_dist = dist.HypergeometricDist(N=20, n=10, K=5, k=3)\n\n# Calculate the probability mass function\nprint(hypergeom_dist.pmf())\n\n# Calculate the cumulative distribution function\nprint(hypergeom_dist.cdf())\n\n# Get the mean\nprint(hypergeom_dist.mean)\n\n# Get the variance\nprint(hypergeom_dist.variance)\n\n# Get the standard deviation\nprint(hypergeom_dist.std_dev)\n```\n\n### Poisson Distribution\nThe PoissonDist class represents a Poisson distribution.\n\nExample\n```python\nfrom KamiStats import distributions as dist \n\n# Create a Poisson distribution instance\npoisson_dist = dist.PoissonDist(\u03bb=4, k=2)\n\n# Calculate the probability mass function\nprint(poisson_dist.pmf())\n\n# Calculate the cumulative distribution function\nprint(poisson_dist.cdf())\n\n# Get the mean\nprint(poisson_dist.mean)\n\n# Get the variance\nprint(poisson_dist.variance)\n\n# Get the standard deviation\nprint(poisson_dist.std_dev)\n```\n## Not for Use!\nAny file in the test_scripts, and tests. This was used for unittest and due to files and folder struectures the code does not work.\n\n## Dependencies\nList of dependencies required for the project are listed here and in the ***requirements.txt*** file.\n\n Package Version\n ------- -------\n mpmath 1.3.0\n numpy 2.0.1\n pip 24.2\n scipy 1.14.0\n sympy 1.13.2\n\n## License\nCopyright 2024 Kishimita\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files \n(the \u201cSoftware\u201d), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, \nmerge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is \nfurnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included \nin all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \u201cAS IS\u201d, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. \nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF \nCONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A statistics library project",
"version": "0.1.2",
"project_urls": {
"Homepage": "https://www.github.com/kishimita/kamistats",
"Issues": "https://www.github.com/kishimita/kamistats/issues"
},
"split_keywords": [
"statistics distributions",
" probability",
" random variables",
" pdf",
" cdf",
" mean",
" variance",
" \u00dfstandard deviation"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "383246c99d5d4583cd788cda4ec410f122585ed61cc247b82ea7000b91ebcd2c",
"md5": "61efd12a67c8d25bc3c7dc598e7aa6be",
"sha256": "65c79f508adb929caab0a0a51c6a573b58861e92ef70ed4f2080b0d491a9c40e"
},
"downloads": -1,
"filename": "KamiStats-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "61efd12a67c8d25bc3c7dc598e7aa6be",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 11341,
"upload_time": "2024-09-23T15:58:20",
"upload_time_iso_8601": "2024-09-23T15:58:20.345965Z",
"url": "https://files.pythonhosted.org/packages/38/32/46c99d5d4583cd788cda4ec410f122585ed61cc247b82ea7000b91ebcd2c/KamiStats-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "6f3bda68e44f288a9cd810757870e00a630b5f6349b698def747f3ef779a2136",
"md5": "097cf0f9f79300d2ed0e3861f27f44ff",
"sha256": "7cd178f2a41ee579ff7533e1eea788c6efe2ae1682cc3f78429e4acae20035e3"
},
"downloads": -1,
"filename": "kamistats-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "097cf0f9f79300d2ed0e3861f27f44ff",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 13856,
"upload_time": "2024-09-23T15:58:21",
"upload_time_iso_8601": "2024-09-23T15:58:21.469107Z",
"url": "https://files.pythonhosted.org/packages/6f/3b/da68e44f288a9cd810757870e00a630b5f6349b698def747f3ef779a2136/kamistats-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-23 15:58:21",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "kishimita",
"github_project": "kamistats",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "kamistats"
}