{"id":23065582,"url":"https://github.com/asuquoaa/understanding_distribution_through_sampling","last_synced_at":"2025-08-05T12:13:24.116Z","repository":{"id":264233965,"uuid":"889658134","full_name":"AsuquoAA/Understanding_Distribution_Through_Sampling","owner":"AsuquoAA","description":"This project demonstrates the concept of distribution through sampling using animations in Python.","archived":false,"fork":false,"pushed_at":"2024-11-28T20:51:18.000Z","size":141,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-08T22:24:17.057Z","etag":null,"topics":["animation","data-visualization"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AsuquoAA.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"publiccode":null,"codemeta":null}},"created_at":"2024-11-16T22:05:21.000Z","updated_at":"2024-11-28T20:51:20.000Z","dependencies_parsed_at":"2024-11-28T21:39:48.425Z","dependency_job_id":null,"html_url":"https://github.com/AsuquoAA/Understanding_Distribution_Through_Sampling","commit_stats":null,"previous_names":["lazycodes/animated_visualization_of_various_distributions","asuquoaa/understanding_distribution_through_sampling"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsuquoAA%2FUnderstanding_Distribution_Through_Sampling","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsuquoAA%2FUnderstanding_Distribution_Through_Sampling/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsuquoAA%2FUnderstanding_Distribution_Through_Sampling/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsuquoAA%2FUnderstanding_Distribution_Through_Sampling/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AsuquoAA","download_url":"https://codeload.github.com/AsuquoAA/Understanding_Distribution_Through_Sampling/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246970340,"owners_count":20862508,"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":["animation","data-visualization"],"created_at":"2024-12-16T05:09:12.980Z","updated_at":"2025-04-03T08:48:34.741Z","avatar_url":"https://github.com/AsuquoAA.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Understanding Distribution Through Sampling\n\n## Overview\n\nThis project demonstrates the concept of distribution through sampling using animations in Python. We explore various random distributions and their characteristics by incrementally sampling from them and visualizing the results dynamically.\nThis project:\n\n---\n\n## Project Description\n\n1. Utilizes four common distributions:\n - Normal Distribution\n - Gamma Distribution\n - Exponential Distribution\n - Uniform Distribution\n2. Creates a dynamic animation where samples (between 100 and 1000) are drawn iteratively from each distribution.\n3. Visualizes the sampled distributions in a 2x2 subplot layout with their respective density histograms.\n4. Features enhancements like fixed axis limits, clean visuals without axis clutter, and annotations to show sample counts.\nBonus: Uses Matplotlib's animation module to save the animation as an MP4 file.\n\n--\n\n## Features\n1. Dynamic Animation: Animates sampling from four random distributions.\n2. Clean Visualization: Subplots share styling, with removed axis ticks and spines for a cleaner look.\n3. Parameter Adjustment: The project is easily extensible to add widgets for parameterizing the distributions.\n4. Export to Video: Saves the animation as an MP4 file using the ffmpeg writer.\n\n---\n\n## Setup and Installation\n\nEnsure the following libraries are installed:\n1. matplotlib\n2. numpy\n3. ipywidgets\n4. ffmpeg\n- code: pip install matplotlib numpy ipywidgets  \nFor ffmpeg, install it via your package manager or from the official FFmpeg website.\n\n---\n\n## How to run this project\n\n1. Clone the Repository:\n- code: git clone https://github.com/AsuquoAA/Understanding-Distribution-Sampling.git\n \n2. Navigating to directory\n- code: cd Understanding-Distribution-Sampling\n\n---\n\n## Results and Observations\nThe animations reveal how increasing the sample size leads to the histograms better approximating the theoretical density curves for each distribution:\n  - Normal Distribution: Symmetrical, bell-shaped curve emerges.\n  - Gamma Distribution: Positive skew becomes apparent.\n  - Exponential Distribution: High initial probability, tapering off gradually.\n  - Uniform Distribution: Flat density curve across the range.\n---\n### Example of final output\n![Example_image](https://github.com/AsuquoAA/Understanding_Distribution_Through_Sampling/blob/main/Screenshot%202024-11-22%20at%2020.26.07.png)\n\n---\n\n## Acknowledgments\n1. The inspiration for this project comes from the Python Data Visualization course.\n2. Thanks to the creators of Matplotlib and NumPy for their robust libraries.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasuquoaa%2Funderstanding_distribution_through_sampling","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasuquoaa%2Funderstanding_distribution_through_sampling","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasuquoaa%2Funderstanding_distribution_through_sampling/lists"}