{"id":15107142,"url":"https://github.com/0gregory0/probstatipy","last_synced_at":"2025-10-23T02:30:59.101Z","repository":{"id":195248713,"uuid":"692545468","full_name":"0gregory0/ProbStatipy","owner":"0gregory0","description":"A package of Python modules with functions useful to statisticians","archived":false,"fork":false,"pushed_at":"2024-04-25T14:32:32.000Z","size":77,"stargazers_count":4,"open_issues_count":4,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-25T15:35:56.222Z","etag":null,"topics":["github","learn","python","statistics","student-vscode"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0gregory0.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-09-16T20:11:41.000Z","updated_at":"2024-04-25T14:22:35.000Z","dependencies_parsed_at":"2024-02-24T20:39:04.434Z","dependency_job_id":"1c7f6255-fe97-42ca-82c5-92b28c0e4592","html_url":"https://github.com/0gregory0/ProbStatipy","commit_stats":null,"previous_names":["0gregory0/pystats","0gregory0/statspro","0gregory0/probstatipy"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0gregory0%2FProbStatipy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0gregory0%2FProbStatipy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0gregory0%2FProbStatipy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0gregory0%2FProbStatipy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0gregory0","download_url":"https://codeload.github.com/0gregory0/ProbStatipy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219868468,"owners_count":16555759,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github","learn","python","statistics","student-vscode"],"created_at":"2024-09-25T21:04:45.062Z","updated_at":"2025-10-23T02:30:58.778Z","avatar_url":"https://github.com/0gregory0.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ProbStatipy\n---\n\n## Intro\n[ProbStatipy](https://pypi.org/project/ProbStatipy/) is a package of Python modules equipped with functions that are used in Statistics.\n\nWhile the functions are extensively documented, you can check out my Jupyter Notebooks in the [Numerical Summary repo](https://github.com/0gregory0/Numerical-Summary) to fully understand my thought process while coming up with these functions.\n\n---\n\n## Modules\nAs of now, this package contains three modules in the `src` folder (`src \u003e ProbStatipy`):\n1. [central.py](https://github.com/0gregory0/ProbStatipy/blob/main/src/ProbStatipy/central.py): Contains functions to measure central tendency such as Mean, Median and Mode.\n2. [spread.py](https://github.com/0gregory0/ProbStatipy/blob/main/src/ProbStatipy/spread.py): Contains functions to measure dispersion/spread such as Variance (Mean Squared Deviation), Standard Deviation and Mean Absolute Deviation (MAD).\n3. [probability.py](https://github.com/0gregory0/ProbStatipy/blob/main/src/ProbStatipy/probability.py): Contains a function to compute probability and classes outlining the properties and methods of Sample Spaces and Events.\n\n---\n\n## How to install and use this package\nTo install the package, run:\n\n```bash\npip install ProbStatipy\n```\n\nTo upgrade it, run:\n\n```bash\npip install --upgrade ProbStatipy\n```\n\nTo use the modules in your Python Code, ensure to include the following import statements:\n\n```python\nfrom ProbStatipy import central\nfrom ProbStatipy import spread\nfrom ProbStatipy import probability\n```\n\nNow you can access the functions to conduct your statistical analysis:\n\n```python\nprint(central.mean([3,4,5]))\nprint(spread.variance([3,4,5]))\nprint(probability.probability(3, 10))\n```\n```powershell\n\u003e\u003e\u003e 4.0\n\u003e\u003e\u003e 0.6666666666666\n\u003e\u003e\u003e 0.3\n```\n\nYou can also import the modules using an alias as observed below:\n```python\nfrom ProbStatipy import central as ctr\nfrom ProbStatipy import spread as spr\nfrom ProbStatipy import probability as prb\n\nprint(ctr.mean([3,4,5]))\nprint(spr.variance([3,4,5]))\nprint(prb.probability(3, 10))\n```\n\n```powershell\n\u003e\u003e\u003e 4.0\n\u003e\u003e\u003e 0.6666666666666\n\u003e\u003e\u003e 0.3\n```\n\n---\n\n## Functions\nBelow is a catalogue of functions available in each module\n\u003e **`central.py`**\n\u003e  \u003e `mean()`\n\u003e  \u003e Calculates the population arithmetic mean\n\u003e\n\u003e  \u003e `median()`\n\u003e  \u003e Calculates the median value of the population\n\u003e\n\u003e  \u003e `mode()`\n\u003e  \u003e Calculates the mode\n\n\n\u003e **`spread.py`**\n\u003e  \u003e `variance()`\n\u003e  \u003e calculates the population variance\n\u003e\n\u003e  \u003e `stdeviation()`\n\u003e  \u003e computes the population standard deviation\n\u003e \n\u003e  \u003e `mad()`\n\u003e  \u003e Computes the population mean absolute deviation\n\u003e \n\u003e  \u003e `get_range`\n\u003e  \u003e gets the range of the dataset\n\u003e \n\u003e  \u003e `iqr()`\n\u003e  \u003e gets the interquartile range of the dataset\n\n\u003e **`probability.py`**\n\u003e \u003e`probability()`\n\u003e \u003eDerives the probability of a successful occurrence given the number of occurrences and successful observations.\n\n---\n\n## Classes\n\u003e **`probability.py`**\n\u003e \u003e`SampleSpace`\n\u003e \u003eSampleSpace is a class that represents the sample space of a random experiment.\n\u003e \u003e\n\u003e \u003e`Event`\n\u003e \u003eEvent is a Class designed to mimick a subset of a sample space.\n\n---\n\n## Dependencies\n\n| Module | Statistics Topic | Dependencies |\n| --- | --- | --- | \n| pystats_central | Central Tendancy | - |     \n| pystats_spread | Spread / Dispersion | [math](https://docs.python.org/3/library/math.html) |     \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0gregory0%2Fprobstatipy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0gregory0%2Fprobstatipy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0gregory0%2Fprobstatipy/lists"}