{"id":21478379,"url":"https://github.com/mathworks-teaching-resources/probability-theory","last_synced_at":"2025-07-15T11:30:47.559Z","repository":{"id":65535617,"uuid":"414628965","full_name":"MathWorks-Teaching-Resources/Probability-Theory","owner":"MathWorks-Teaching-Resources","description":"A courseware module that covers the fundamental concepts in probability theory and their implications in data science. Topics include probability, random variables, and Bayes' Theorem. ","archived":false,"fork":false,"pushed_at":"2024-10-15T20:38:44.000Z","size":5057,"stargazers_count":6,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"release","last_synced_at":"2024-10-17T06:54:05.504Z","etag":null,"topics":["bayesian-statistics","courseware","cwm","data-science","mathematics","matlab","matlab-live-script","probability-theory","random-variables"],"latest_commit_sha":null,"homepage":"","language":"MATLAB","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MathWorks-Teaching-Resources.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-07T14:13:36.000Z","updated_at":"2024-10-15T20:38:48.000Z","dependencies_parsed_at":"2024-05-07T02:30:42.811Z","dependency_job_id":null,"html_url":"https://github.com/MathWorks-Teaching-Resources/Probability-Theory","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MathWorks-Teaching-Resources%2FProbability-Theory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MathWorks-Teaching-Resources%2FProbability-Theory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MathWorks-Teaching-Resources%2FProbability-Theory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MathWorks-Teaching-Resources%2FProbability-Theory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MathWorks-Teaching-Resources","download_url":"https://codeload.github.com/MathWorks-Teaching-Resources/Probability-Theory/tar.gz/refs/heads/release","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226033478,"owners_count":17563169,"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":["bayesian-statistics","courseware","cwm","data-science","mathematics","matlab","matlab-live-script","probability-theory","random-variables"],"created_at":"2024-11-23T11:17:56.509Z","updated_at":"2024-11-23T11:17:57.245Z","avatar_url":"https://github.com/MathWorks-Teaching-Resources.png","language":"MATLAB","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# \u003cspan style=\"color:rgb(213,80,0)\"\u003eFundamentals of Probability Theory\u003c/span\u003e\n\n\n[![View on File Exchange](https://www.mathworks.com/matlabcentral/images/matlab-file-exchange.svg)](https://www.mathworks.com/matlabcentral/fileexchange/100546-probability-theory) or [![Open in MATLAB Online](https://www.mathworks.com/images/responsive/global/open-in-matlab-online.svg)](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Probability-Theory\u0026project=Probability.prj\u0026file=README.mlx)\n\n[![MATLAB Versions Tested](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2FMathWorks-Teaching-Resources%2FProbability-Theory%2Frelease%2FImages%2FTestedWith.json)](https://MathWorks-Teaching-Resources.github.io/Probability-Theory)\n\n**Curriculum Module**\n\n_Created with R2024a. Compatible with R2024a and later releases._\n\n# Information\n\nThis curriculum module contains interactive [MATLAB® live scripts](https://www.mathworks.com/products/matlab/live-editor.html) and supporting files that teach fundamental concepts in probability theory and statistical inference.\n\n\n## Background\n\nYou can use these live scripts as demonstrations in lectures, class activities, or interactive assignments outside class. This module covers subjective, empirical, classical, and conditional probability, Bayes' theorem, concepts of discrete and continuous random variables, probability distributions, sampling, and the central limit theorem. It also includes examples of using Bayes' theorem to create an email spam filter.\n\n\nThe instructions inside the live scripts will guide you through the exercises and activities. Get started with each live script by running it one section at a time. To stop running the script or a section midway (for example, when an animation is in progress), use the \u003cimg src=\"Images/EndIcon.png\" width=\"19\" alt=\"EndIcon.png\"\u003e Stop button in the **RUN** section of the **Live Editor** tab in the MATLAB Toolstrip.\n\n## Contact Us\n\nSolutions are available upon instructor request. Contact the [MathWorks teaching resources team](mailto:onlineteaching@mathworks.com) if you would like to request solutions, provide feedback, or if you have a question.\n\n\n## Prerequisites\n\nThis module assumes a knowledge of basic concepts in set theory, such as ⋃ (union) and ⋂ (intersection). It also assumes basic fluency in mathematical notation for Σ (summation) and Π (product). Other notation relevant to probability theory is introduced within the module as needed. \n\n\nNo coding knowledge is expected. If you want to read the code, it would be helpful to have at least some familiarity with MATLAB, at the level of the [\u003cu\u003eMATLAB Onramp\u003c/u\u003e](https://matlabacademy.mathworks.com/details/matlab-onramp/gettingstarted), a free two\\-hour introductory course.\n\n\n## Getting Started\n### Accessing the Module\n### **On MATLAB Online:**\n\nUse the [\u003cimg src=\"Images/OpenInMO.png\" width=\"136\" alt=\"OpenInMO.png\"\u003e](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Probability-Theory\u0026project=Probability.prj) link to download the module. You will be prompted to log in or create a MathWorks account. The project will be loaded, and you will see an app with several navigation options to get you started.\n\n### **On Desktop:**\n\nDownload or clone this repository. Open MATLAB, navigate to the folder containing these scripts and double\\-click on [Probability.prj](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Probability-Theory\u0026project=Probability.prj\u0026file=README.mlx). It will add the appropriate files to your MATLAB path and open an app that asks you where you would like to start. \n\n\nEnsure you have all the required products (listed below) installed. If you need to include a product, add it using the Add\\-On Explorer. To install an add\\-on, go to the **Home** tab and select  \u003cimg src=\"Images/AddOnsIcon.png\" width=\"16\" alt=\"AddOnsIcon.png\"\u003e **Add-Ons** \u003e **Get Add-Ons**. \n\n\n## Products\n\nMATLAB® and the Statistics and Machine Learning Toolbox™ are used throughout. The Image Processing Toolbox™ is used in InferenceBayes.mlx.\n\n# Scripts\n## [**ProbabilityIntro.mlx**](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Probability-Theory\u0026project=Probability.prj\u0026file=Scripts/ProbabilityIntro.mlx) \n|      |      |\n| :-- | :-- |\n|  | **In this script, students will...** \u003cbr\u003e   |\n| \u003cimg src=\"Images/IntroProbIcon.png\" width=\"171\" alt=\"IntroProbIcon.png\"\u003e \u003cbr\u003e  | $\\bullet$ explain the commonly used terms in probability such as random experiment, random process, trial, event, outcome, countable, equally likely, sample space, mutual independence. \u003cbr\u003e $\\bullet$ define and compute the classical and empirical probability of events. \u003cbr\u003e $\\bullet$ explain the limitations and strengths of the subjective, classical, and empirical perspectives of probability. \u003cbr\u003e $\\bullet$ state and apply Kolmogorov's axioms of probability. \u003cbr\u003e   |\n|      |       |\n\n## [**RandomVariables.mlx**](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Probability-Theory\u0026project=Probability.prj\u0026file=Scripts/RandomVariables.mlx) \n|      |      |\n| :-- | :-- |\n|  | **In this script, students will...** \u003cbr\u003e   |\n| \u003cimg src=\"Images/centralLimitTheorem.gif\" width=\"171\" alt=\"centralLimitTheorem.gif\"\u003e \u003cbr\u003e  | $\\bullet$ define and create random variables to describe random processes. \u003cbr\u003e $\\bullet$ generate an empirical distribution of random variables through random sampling. \u003cbr\u003e $\\bullet$ explain the meaning of expectation and variance for random variables. \u003cbr\u003e $\\bullet$ explain the difference between continuous and discrete random variables. \u003cbr\u003e $\\bullet$ identify and use the discrete uniform and continuous normal probability distributions. \u003cbr\u003e $\\bullet$ define and apply the probability density function and cumulative density function to find the probability of a random variable's value falling within a given interval. \u003cbr\u003e $\\bullet$ state the Central Limit Theorem and explain its implications for statistical inference. \u003cbr\u003e   |\n|      |       |\n\n## [**InferenceBayes.mlx**](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Probability-Theory\u0026project=Probability.prj\u0026file=Scripts/InferenceBayes.mlx) \n|      |      |\n| :-- | :-- |\n|  | **In this script, students will...** \u003cbr\u003e   |\n| \u003cimg src=\"Images/bayesTheorem.png\" width=\"171\" alt=\"bayesTheorem.png\"\u003e \u003cbr\u003e  | $\\bullet$ define conditional probability, and explain how it affects the sample space. \u003cbr\u003e $\\bullet$ state Bayes' theorem mathematically, and explain its implications for statistical inference. \u003cbr\u003e $\\bullet$ apply Bayes' theorem to practical real\\-world problems. \u003cbr\u003e   |\n|      |       |\n\n# Related Courseware Modules\n|      |      |      |\n| :-- | :-- | :-- |\n| **Courseware Module** \u003cbr\u003e  | **Sample Content** \u003cbr\u003e  | **Available on:** \u003cbr\u003e   |\n| [**Descriptive Statistics and Probability Distributions**](https://www.mathworks.com/matlabcentral/fileexchange/95463-descriptive-statistics-and-probability-distributions) \u003cbr\u003e  | \u003cimg src=\"Images/image_6.png\" width=\"171\" alt=\"image_6.png\"\u003e \u003cbr\u003e  | [\u003cimg src=\"Images/OpenInFX.png\" width=\"91\" alt=\"OpenInFX.png\"\u003e](https://www.mathworks.com/matlabcentral/fileexchange/95463-descriptive-statistics-and-probability-distributions) \u003cbr\u003e [\u003cimg src=\"Images/OpenInMO.png\" width=\"136\" alt=\"OpenInMO.png\"\u003e](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Descriptive-Stats-and-Probability\u0026project=StatsAndProb.prj) \u003cbr\u003e [GitHub](https://github.com/MathWorks-Teaching-Resources/Descriptive-Stats-and-Probability) \u003cbr\u003e   |\n|      |      |       |\n\n\nOr feel free to explore our other [modular courseware content](https://www.mathworks.com/matlabcentral/fileexchange/?q=tag%3A%22courseware+module%22\u0026sort=downloads_desc_30d).\n\n# Educator Resources\n-  [Educator Page](https://www.mathworks.com/academia/educators.html) \n\n# Contribute \n\nLooking for more? Find an issue? Have a suggestion? Please contact the [MathWorks teaching resources team](mailto:%20onlineteaching@mathworks.com). If you want to contribute directly to this project, you can find information about how to do so in the [CONTRIBUTING.md](https://github.com/MathWorks-Teaching-Resources/Probability-Theory/blob/release/CONTRIBUTING.md) page on GitHub.\n\n# License\n\nYou can find the [license](https://github.com/MathWorks-Teaching-Resources/Probability-Theory/blob/release/LICENSE.md) for this module on GitHub.\n\n\n *©* Copyright 2023 The MathWorks™, Inc\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathworks-teaching-resources%2Fprobability-theory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmathworks-teaching-resources%2Fprobability-theory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathworks-teaching-resources%2Fprobability-theory/lists"}