{"id":18259991,"url":"https://github.com/hungrybluedev/root-from-parameters","last_synced_at":"2026-05-17T00:40:28.157Z","repository":{"id":109592476,"uuid":"281973586","full_name":"hungrybluedev/root-from-parameters","owner":"hungrybluedev","description":"Companion repository for the paper: On the Probability of Real Roots in a Quadratic Equation when its Coefficients are i.i.d. Uniform Variates. (pending publication). It contains the Jupyter notebooks used to perform the simulations and obtain the figures and data included in the paper.","archived":false,"fork":false,"pushed_at":"2020-08-14T09:16:39.000Z","size":225,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-08T23:44:28.766Z","etag":null,"topics":["jupyter-notebook","monte-carlo-simulation","python","statistics"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hungrybluedev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2020-07-23T14:26:27.000Z","updated_at":"2020-08-14T08:12:27.000Z","dependencies_parsed_at":"2023-03-16T20:45:37.547Z","dependency_job_id":null,"html_url":"https://github.com/hungrybluedev/root-from-parameters","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/hungrybluedev/root-from-parameters","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hungrybluedev%2Froot-from-parameters","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hungrybluedev%2Froot-from-parameters/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hungrybluedev%2Froot-from-parameters/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hungrybluedev%2Froot-from-parameters/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hungrybluedev","download_url":"https://codeload.github.com/hungrybluedev/root-from-parameters/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hungrybluedev%2Froot-from-parameters/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274799418,"owners_count":25352171,"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","status":"online","status_checked_at":"2025-09-12T02:00:09.324Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["jupyter-notebook","monte-carlo-simulation","python","statistics"],"created_at":"2024-11-05T10:41:24.959Z","updated_at":"2026-05-17T00:40:23.113Z","avatar_url":"https://github.com/hungrybluedev.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jupyter Python notebooks for Empirical Evidence\n\n![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/hungrybluedev/root-from-parameters?sort=semver)\n![GitHub](https://img.shields.io/github/license/hungrybluedev/root-from-parameters)\n\n## Introduction\n\nThis repository contains Jupyter notebooks (with the extension `.ipynb`) which contain the code and results bundled together into portable documents. You can view these notebooks on GitHub. They will be in read-only mode.\n\nIn order to validate the results on a local machine, refer to the [setting up](#setting-up) section.\n\n## Description of Individual Experiments\n\n### Comparison of theoretical and empirical PDF and CDF\n\n[Link to the notebook](Comparison%20of%20theoretical%20and%20empirical%20PDF%20and%20CDF.ipynb)\n\nA simulation is performed to sample values for the distribution \u003cem\u003eB\u003csup\u003e2\u003c/sup\u003e\u003c/em\u003e when _B_ is a uniform variate **U(0,1)**. The data obtained from the simulation is used to plot a regular frequency histogram and a cumulative frequency histogram. It is then compared against the plots of theoretical values of \u003cem\u003ef\u003csub\u003eX\u003c/sub\u003e(x)\u003c/em\u003e and \u003cem\u003eF\u003csub\u003eX\u003c/sub\u003e(x)\u003c/em\u003e that are calculated in the paper.\n\n### Empirical probability of obtaining a real root\n\n[Link to the notebook](Empirical%20Probability%20of%20obtaining%20a%20real%20root.ipynb)\n\nA Monte Carlo simulation is performed for a range of values of the upper bound _theta_. For each _theta_, a fixed number of trials are performed. A trial is marked a success if the sampled values of _A_, _B_, and _C_ satisfy the inequality: _B\u003csup\u003e2\u003c/sup\u003e-4AC\u0026geq;0_. The empirical probability of success is calculated for each _theta_ and compared against the theoretical value of approximately 25.4%.\n\n## Setting up\n\nThe following instructions need to be followed to obtain a favourable development environment to be able to reproduce the results.\n\n### Ensure Python, Pip, and Git are installed\n\n[Python 3](https://www.python.org/downloads/) is used. Recommend version is `3.8` or higher.\n\nProceed to ensure that pip - the package manager for Python is installed by default.\n\nEnsure that [Git](https://git-scm.com/) is installed.\n\n\u003e Subhomoy (@hungrybluedev) recommends using Windows Powershell and [Scoop](https://scoop.sh/) to install python and git on Windows:\n\u003e\n\u003e ```bash\n\u003e scoop install python git\n\u003e ```\n\nOn MacOS and Linux, use of the default package manager is recommend.\n\nPip comes preinstalled with Python (3.4 or higher).\n\n### Setup a virtual environment for python\n\n1. We navigate to the directory we want to store our work in.\n\nIn order to obtain the source code in this repository here are the commands necessary:\n\n```bash\ngit clone https://github.com/hungrybluedev/root-from-parameters.git\n```\n\nThen `cd` into the repository:\n\n```bash\ncd root-from-parameters\n```\n\n2. We initialize a virtual environment with the command:\n\n```bash\nvirtualenv statsenv\n```\n\n3. The environment is activated:\n\n```bash\n./statsenv/Scripts/activate\n```\n\n### Install required packages\n\n```bash\npip install jupyter pandas seaborn statsmodels scipy numpy\n```\n\nThis command will install the packages in the virtual environment only. It prevents interference with external projects. Packages can be updated independently without breaking the dependencies in the other projects.\n\n### Start the Jupyter web interface\n\n```bash\njupyter notebook\n```\n\nA web page will open in the default browser. Clicking on the required notebook will open it in a new tab where the code can be run and the results can be verified.\n\n## License\n\nThis work is licensed under the MIT License. Check [LICENSE](/LICENSE) for more information.\n\n## Contact\n\nMy contact email is available in the paper. If you do not have access to that, use your preferred way of communication from the many available at my [Contact Page](https://hungrybluedev.in/contact/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhungrybluedev%2Froot-from-parameters","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhungrybluedev%2Froot-from-parameters","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhungrybluedev%2Froot-from-parameters/lists"}