scrapbook
  • "Unorganized" Notes
  • The Best Public Datasets for Machine Learning and Data Science
  • Practice Coding
  • plaid-API project
  • Biotech
    • Machine Learning vs. Deep Learning
  • Machine Learning for Computer Graphics
  • Books (on GitHub)
  • Ideas/Thoughts
  • Ziva for feature animation: Stylized simulation and machine learning-ready workflows
  • Tools
  • 🪶math
    • Papers
    • Math for ML (coursera)
      • Linear Algebra
        • Wk1
        • Wk2
        • Wk3
        • Wk4
        • Wk5
      • Multivariate Calculus
    • Improving your Algorithms & Data Structure Skills
    • Algorithms
    • Algorithms (MIT)
      • Lecture 1: Algorithmic Thinking, Peak Finding
    • Algorithms (khan academy)
      • Binary Search
      • Asymptotic notation
      • Sorting
      • Insertion sort
      • Recursion
      • Solve Hanoi recursively
      • Merge Sort
      • Representing graphs
      • The breadth-first search algorithm
      • Breadth First Search in JavaScript
      • Breadth-first vs Depth-first Tree Traversal in Javascript
    • Algorithms (udacity)
      • Social Network
    • Udacity
      • Linear Algebra Refresher /w Python
    • math-notes
      • functions
      • differential calculus
      • derivative
      • extras
      • Exponentials & logarithms
      • Trigonometry
    • Probability (MIT)
      • Unit 1
        • Probability Models and Axioms
        • Mathematical background: Sets; sequences, limits, and series; (un)countable sets.
    • Statistics and probability (khan academy)
      • Analyzing categorical data
      • Describing and comparing distributions
      • Outliers Definition
      • Mean Absolute Deviation (MAD)
      • Modeling data distribution
      • Exploring bivariate numerical data
      • Study Design
      • Probability
      • Counting, permutations, and combinations
      • Binomial variables
        • Binomial Distribution
        • Binomial mean and standard deviation formulas
        • Geometric random variable
      • Central Limit Theorem
      • Significance Tests (hypothesis testing)
    • Statistics (hackerrank)
      • Mean, Medium, Mode
      • Weighted Mean
      • Quartiles
      • Standard Deviation
      • Basic Probability
      • Conditional Probability
      • Permutations & Combinations
      • Binomial Distribution
      • Negative Binomial
      • Poisson Distribution
      • Normal Distribution
      • Central Limit Theorem
      • Important Concepts in Bayesian Statistics
  • 📽️PRODUCT
    • Product Strategy
    • Product Design
    • Product Development
    • Product Launch
  • 👨‍💻coding
    • of any interest
    • Maya API
      • Python API
    • Python
      • Understanding Class Inheritance in Python 3
      • 100+ Python challenging programming exercises
      • coding
      • Iterables vs. Iterators vs. Generators
      • Generator Expression
      • Stacks (LIFO) / Queues (FIFO)
      • What does -1 mean in numpy reshape?
      • Fold Left and Right in Python
      • Flatten a nested list of lists
      • Flatten a nested dictionary
      • Traverse A Tree
      • How to Implement Breadth-First Search
      • Breadth First Search
        • Level Order Tree Traversal
        • Breadth First Search or BFS for a Graph
        • BFS for Disconnected Graph
      • Trees and Tree Algorithms
      • Graph and its representations
      • Graph Data Structure Interview Questions
      • Graphs in Python
      • GitHub Repo's
    • Python in CG Production
    • GLSL/HLSL Shading programming
    • Deep Learning Specialization
      • Neural Networks and Deep Learning
      • Untitled
      • Untitled
      • Untitled
    • TensorFlow for AI, ML, and DL
      • Google ML Crash Course
      • TensorFlow C++ API
      • TensorFlow - coursera
      • Notes
      • An Introduction to different Types of Convolutions in Deep Learning
      • One by One [ 1 x 1 ] Convolution - counter-intuitively useful
      • SqueezeNet
      • Deep Compression
      • An Overview of ResNet and its Variants
      • Introducing capsule networks
      • What is a CapsNet or Capsule Network?
      • Xception
      • TensorFlow Eager
    • GitHub
      • Project README
    • Agile - User Stories
    • The Open-Source Data Science Masters
    • Coding Challenge Websites
    • Coding Interview
      • leetcode python
      • Data Structures
        • Arrays
        • Linked List
        • Hash Tables
        • Trees: Basic
        • Heaps, Stacks, Queues
        • Graphs
          • Shortest Path
      • Sorting & Searching
        • Depth-First Search & Breadth-First Search
        • Backtracking
        • Sorting
      • Dynamic Programming
        • Dynamic Programming: Basic
        • Dynamic Programming: Advanced
    • spaCy
    • Pandas
    • Python Packages
    • Julia
      • jupyter
    • macos
    • CPP
      • Debugging
      • Overview of memory management problems
      • What are lvalues and rvalues?
      • The Rule of Five
      • Concurrency
      • Avoiding Data Races
      • Mutex
      • The Monitor Object Pattern
      • Lambdas
      • Maya C++ API Programming Tips
      • How can I read and parse CSV files in C++?
      • Cpp NumPy
    • Advanced Machine Learning
      • Wk 1
      • Untitled
      • Untitled
      • Untitled
      • Untitled
  • data science
    • Resources
    • Tensorflow C++
    • Computerphile
      • Big Data
    • Google ML Crash Course
    • Kaggle
      • Data Versioning
      • The Basics of Rest APIs
      • How to Make an API
      • How to deploying your API
    • Jupiter Notebook Tips & Tricks
      • Jupyter
    • Image Datasets Notes
    • DS Cheatsheets
      • Websites & Blogs
      • Q&A
      • Strata
      • Data Visualisation
      • Matplotlib etc
      • Keras
      • Spark
      • Probability
      • Machine Learning
        • Fast Computation of AUC-ROC score
    • Data Visualisation
    • fast.ai
      • deep learning
      • How to work with Jupyter Notebook on a remote machine (Linux)
      • Up and Running With Fast.ai and Docker
      • AWS
    • Data Scientist
    • ML for Beginners (Video)
    • ML Mastery
      • Machine Learning Algorithms
      • Deep Learning With Python
    • Linear algebra cheat sheet for deep learning
    • DL_ML_Resources
    • Awesome Machine Learning
    • web scraping
    • SQL Style Guide
    • SQL - Tips & Tricks
  • 💡Ideas & Thoughts
    • Outdoors
    • Blog
      • markdown
      • How to survive your first day as an On-set VFX Supervisor
    • Book Recommendations by Demi Lee
  • career
    • Skills
    • learn.co
      • SQL
      • Distribution
      • Hypothesis Testing Glossary
      • Hypothesis Tests
      • Hypothesis & AB Testing
      • Combinatorics Continued and Maximum Likelihood Estimation
      • Bayesian Classification
      • Resampling and Monte Carlo Simulation
      • Extensions To Linear Models
      • Time Series
      • Distance Metrics
      • Graph Theory
      • Logistic Regression
      • MLE (Maximum Likelihood Estimation)
      • Gradient Descent
      • Decision Trees
      • Ensemble Methods
      • Spark
      • Machine Learning
      • Deep Learning
        • Backpropagation - math notation
        • PRACTICE DATASETS
        • Big Data
      • Deep Learning Resources
      • DL Datasets
      • DL Tutorials
      • Keras
      • Word2Vec
        • Word2Vec Tutorial Part 1 - The Skip-Gram Model
        • Word2Vec Tutorial Part 2 - Negative Sampling
        • An Intuitive Explanation of Convolutional Neural Networks
      • Mod 4 Project
        • Presentation
      • Mod 5 Project
      • Capstone Project Notes
        • Streaming large training and test files into Tensorflow's DNNClassifier
    • Carrier Prep
      • The Job Search
        • Building a Strong Job Search Foundation
        • Key Traits of Successful Job Seekers
        • Your Job Search Mindset
        • Confidence
        • Job Search Action Plan
        • CSC Weekly Activity
        • Managing Your Job Search
      • Your Online Presence
        • GitHub
      • Building Your Resume
        • Writing Your Resume Summary
        • Technical Experience
      • Effective Networking
        • 30 Second Elevator Pitch
        • Leveraging Your Network
        • Building an Online Network
        • Linkedin For Research And Networking
        • Building An In-Person Network
        • Opening The Line Of Communication
      • Applying to Jobs
        • Applying To Jobs Online
        • Cover Letters
      • Interviewing
        • Networking Coffees vs Formal Interviews
        • The Coffee Meeting/ Informational Interview
        • Communicating With Recruiters And HR Professional
        • Research Before an Interview
        • Preparing Questions for Interviews
        • Phone And Video/Virtual Interviews
        • Cultural/HR Interview Questions
        • The Salary Question
        • Talking About Apps/Projects You Built
        • Sending Thank You's After an Interview
      • Technical Interviewing
        • Technical Interviewing Formats
        • Code Challenge Best Practices
        • Technical Interviewing Resources
      • Communication
        • Following Up
        • When You Haven't Heard From an Employer
      • Job Offers
        • Approaching Salary Negotiations
      • Staying Current in the Tech Industry
      • Module 6 Post Work
      • Interview Prep
  • projects
    • Text Classification
    • TERRA-REF
    • saildrone
  • Computer Graphics
  • AI/ML
  • 3deeplearning
    • Fast and Deep Deformation Approximations
    • Compress and Denoise MoCap with Autoencoders
    • ‘Fast and Deep Deformation Approximations’ Implementation
    • Running a NeuralNet live in Maya in a Python DG Node
    • Implement a Substance like Normal Map Generator with a Convolutional Network
    • Deploying Neural Nets to the Maya C++ API
  • Tools/Plugins
  • AR/VR
  • Game Engine
  • Rigging
    • Deformer Ideas
    • Research
    • brave rabbit
    • Useful Rigging Links
  • Maya
    • Optimizing Node Graph for Parallel Evaluation
  • Houdini
    • Stuff
    • Popular Built-in VEX Attributes (Global Variables)
Powered by GitBook
On this page
  • Sample Space
  • Describe possible outcomes
  • Discrete/finite example
  • Probability axioms
  • Simple properties of probabilities
  • More properties of probabilities
  • A discrete example
  • A continuous example
  • Countable additivity
  • Interpretations and uses of probabilities
  1. math
  2. Probability (MIT)
  3. Unit 1

Probability Models and Axioms

  • Sample Space

  • Probability laws

    • Axioms

    • Properties that follow from the axioms

  • Examples

    • Discrete

    • Continuous

  • Discussion

    • Countable Additivity

    • Mathematical Subtleties

  • Interpretations of Probabilities

Sample Space

  • Two steps:

    • Describe possible outcomes

    • Describe beliefs about likelihood of outcomes

Describe possible outcomes

  • List (set) of possible outcomes ==> Ω\OmegaΩ

  • List must be:

    • Mutually exclusive

    • Collectively exhaustive

    • At the "right" granularity

Exercise: Sample space

For the experiment of flipping a coin, and for each one of the following choices, determine whether we have a legitimate sample space:

  1. Ω={Heads and it is raining, Heads and it is not raining, Tails}

  2. Ω={Heads and it is raining, Tails and it is not raining, Tails}

Solution:

In the first case, the elements of Ω are mutually exclusive and collectively exhaustive, and therefore Ω is a legitimate sample space.

For the second case, if the outcome is “Tails and it is not raining," then the outcome “Tails" will have also occurred. Therefore the elements of Ωare not mutually exclusive, and Ω is not a legitimate sample space.

Discrete/finite example

Probability axioms

A∩B⟶read as "A intersection B"A \cap B \longrightarrow \text{read as "A intersection B"} A∩B⟶read as "A intersection B"

A∪B⟶read as "A union B"A \cup B \longrightarrow \text{read as "A union B"}A∪B⟶read as "A union B"

Exercise: Axioms

Let A and B be events on the same sample space, with P(A)=0.6 and P(B)=0.7. Can these two events be disjoint? Solution:

If the two events were disjoint, the additivity axiom would imply that P(A∪B)=P(A)+P(B)=1.3>1, which would contradict the normalization axiom.

Simple properties of probabilities

Exercise: Simple properties

Let A, B, and C be disjoint subsets of the sample space. For each one of the following statements, determine whether it is true or false. Note:"False" means "not guaranteed to be true."

a) P(A)+P(Ac)+P(B)=P(A∪Ac∪B)

b) P(A)+P(B)≤1

c) P(Ac)+P(B)≤1

d) P(A∪B∪C)≥P(A∪B)

Solution:

a) False. For a counterexample, let A=∅, B=Ω, and C=∅. In that case, the left-hand side of the equation equals 2, whereas the right-hand side equals 1.

b) True. Since A and B are disjoint, we have P(A)+P(B)=P(A∪B)≤1.

c) False. For a counterexample, let A=∅, B=Ω, and C=∅. In that case, P(Ac)+P(B)=2.

d) True. Since A, B, and C are disjoint, we have P(A∪B∪C)=P(A)+P(B)+P(C)≥P(A)+P(B)=P(A∪B).

More properties of probabilities

Exercise: More properties

Let A, B, and C be subsets of the sample space, not necessarily disjoint. For each one of the following statements, determine whether it is true or false. Note: “False" means “not guaranteed to be true."

  1. P((A∩B)∪(C∩Ac))≤P(A∪B∪C)

  2. P(A∪B∪C)=P(A∩Cc)+P(C)+P(B∩Ac∩Cc)

Solution:

  1. True. This is because the set (A∩B)∪(C∩Ac) is a subset of A∪B∪C.

  2. True. This is the same property shown in the last segment, with the three sets appearing in a different order.

A discrete example

Exercise: Discrete probability calculations

Consider the same model of two rolls of a tetrahedral die, with all 16 outcomes equally likely. Find the probability of the following events:

a) The value in the first roll is strictly larger than the value in the second roll.

b) The sum of the values obtained in the two rolls is an even number.

Solution:

a) The event of interest is {(2,1), (3,1), (4,1), (3,2), (4,2), (4,3)}. It consists of 6 elements (outcomes), each of which has probability 1/16, for an overall probability of 6/16=3/8 ==> 0.375.

b) The event of interest is {(1,1), (2,2), (3,3), (4,4), (1,3), (3,1), (2,4), (4,2)}. It consists of 8 elements (outcomes), each of which has probability 1/16, for an overall probability of 8/16=1/2 ==> 0.5.

A continuous example

Probability calculation steps:

  • Specify the sample space

  • Specify a probability law

  • Identify an event of interest

  • Calculate...

Exercise: Continuous probability calculations

Consider a sample space that is the rectangular region [0,1]×[0,2][0,1]×[0,2][0,1]×[0,2], i.e., the set of all pairs (x,y) that satisfy 0≤x≤10≤x≤10≤x≤1 and 0≤y≤20≤y≤20≤y≤2. Consider a “uniform" probability law, under which the probability of an event is half of the area of the event. Find the probability of the following events:

a) The two components x and y have the same values.

b) The value, x, of the first component is larger than or equal to the value, y, of the second component.

c) The value of x2 is larger than or equal to the value of y.

Solution:

a) This event is a line, and since a line has zero area, the probability is zero.

b) This event is a triangle with vertices at (0,0), (1,0), (1,1). Its area is 1/2, and therefore the probability is 1/4.

c) This event corresponds to the region below the curve y=x2, where x ranges from 0 to 1. The area of this region is

∫01x2dx=x33∣01=13\int_0^1 x^2 dx = \frac{x^3}{3}\vert {_0^1}=\frac{1}{3}∫01​x2dx=3x3​∣01​=31​,

and therefore the corresponding probability is 1/6.

Note:

[0,1]×[0,2][0,1]×[0,2][0,1]×[0,2] is notation for the set (x,y):x∈[0,1],y∈[0,2]{(x,y):x∈[0,1],y∈[0,2]}(x,y):x∈[0,1],y∈[0,2].

Countable additivity

Exercise: Using countable additivity

Let the sample space be the set of positive integers and suppose that P(n)=1/2n, for n=1,2,…. Find the probability of the set {3,6,9,…}, that is, of the set of of positive integers that are multiples of 3.

Using countable additivity, and with α=2−3=1/8α=2−3=1/8α=2−3=1/8, the desired probability is

123+126+129+⋯=α+α2+α3+⋯=α1−α=1/81−(1/8)=17\frac{1}{2^3}+\frac{1}{2^6}+\frac{1}{2^9}+⋯=α+α^2+α^3+⋯=\frac{α}{1−α}=\frac{1/8}{1−(1/8)}=\frac{1}{7}231​+261​+291​+⋯=α+α2+α3+⋯=1−αα​=1−(1/8)1/8​=71​.

Exercise: Uniform probabilities on the integers

Let the sample space be the set of all positive integers. Is it possible to have a “uniform" probability law, that is, a probability law that assigns the same probability c to each positive integer?

Answer: No

Solution:

Suppose that c=0. Then, by countable additivity,

1=P(Ω)=P(1∪2∪3⋯)=P(1)+P(2)+P(3)+⋯=0+0+0+⋯=0,1=P(Ω)=P({1}∪{2}∪{3}⋯)=P({1})+P({2})+P({3})+⋯=0+0+0+⋯=0,1=P(Ω)=P(1∪2∪3⋯)=P(1)+P(2)+P(3)+⋯=0+0+0+⋯=0,

which is a contradiction.

Suppose that c>0. Then, there exists an integer k such that kc>1. By additivity,

P(1,2,…,k)=kc>1,P({1,2,…,k})=kc>1,P(1,2,…,k)=kc>1,

which contradicts the normalization axiom.

Exercise: On countable additivity

Let the sample space be the two-dimensional plane. For any real number x, let Ax be the subset of the plane that consists of all points of the vertical line through the point (x,0), i.e., Ax={(x,y):y∈Re}.

a) Do the axioms of probability theory imply that the probability of the union of the sets Ax (which is the whole plane) is equal to the sum of the probabilities P(Ax)? b) Do the axioms of probability theory imply that

P(A1∪A2∪⋯)=∑x=1∞P(Ax)?P(A1∪A2∪⋯)=∑x=1∞P(Ax)?P(A1∪A2∪⋯)=∑x=1∞P(Ax)?

(In other words, we consider only those lines for which the x coordinate is a positive integer.)

Solution:

a) No. The collection of sets Ax is not countable because the set of real numbers is not countable (i.e., cannot be arranged in a sequence), and so the additivity axiom does not apply.

b) Yes. The countable additivity axiom applies because we are dealing with a sequence (in particular, a countable collection) of disjoint events.

Interpretations and uses of probabilities

We end this lecture sequence by stepping back to discuss what probability theory really is and what exactly is the meaning of the word probability. In the most narrow view, probability theory is just a branch of mathematics. We start with some axioms. We consider models that satisfy these axioms, and we establish some consequences, which are the theorems of this theory. You could do all that without ever asking the question of what the word "probability" really means. Yet, one of the theorems of probability theory, that we will see later in this class, is that probabilities can be interpreted as frequencies, very loosely speaking. If I have a fair coin, and I toss it infinitely many times, then the fraction of heads that I will observe will be one half. In this sense, the probability of an event, A, can be interpreted as the frequency with which event A will occur in an infinite number of repetitions of the experiment. But is this all there is? If we're dealing with coin tosses, it makes sense to think of probabilities as frequencies. But consider a statement such as the "current president of my country will be reelected in the next election with probability 0.7". It's hard to think of this number, 0.7, as a frequency. It does not make sense to think of infinitely many repetitions of the next election. In cases like this, and in many others, it is better to think of probabilities as just some way of describing our beliefs. And if you're a betting person, probabilities can be thought of as some numerical guidance into what kinds of bets you might be willing to make. But now if we think of probabilities as beliefs, you can run into the argument that, well, beliefs are subjective. Isn't probability theory supposed to be an objective part of math and science? Is probability theory just an exercise in subjectivity? Well, not quite. There's more to it. Probability, at the minimum, gives us some rules for thinking systematically about uncertain situations. And if it happens that our probability model, our subjective beliefs, have some relation with the real world, then probability theory can be a very useful tool for making predictions and decisions that apply to the real world. Now, whether your predictions and decisions will be any good will depend on whether you have chosen a good model. Have you chosen a model that's provides a good enough representation of the real world? How do you make sure that this is the case? There's a whole field, the field of statistics, whose purpose is to complement probability theory by using data to come up with good models. And so we have the following diagram that summarizes the relation between the real world, statistics, and probability. The real world generates data. The field of statistics and inference uses these data to come up with probabilistic models. Once we have a probabilistic model, we use probability theory and the analysis tools that it provides to us. And the results that we get from this analysis lead to predictions and decisions about the real world.

PreviousUnit 1NextMathematical background: Sets; sequences, limits, and series; (un)countable sets.

Last updated 6 years ago

🪶
The lower point stands for the probability of a finite set.