Probability Basics

Statistical Simulation in Python

Tushar Shanker

Data Scientist

Sample Space

Sample Space $S$: Set of all possible outcomes

Dice Sample Space

Statistical Simulation in Python

Probability

Sample Space $S$: Set of all possible outcomes

Probability $P(A)$: Likelihood of event $A$

  • $0 \leq P(A) \leq 1$
  • $P(S) = 1$ eg. $P(H) + P(T)=1$
Statistical Simulation in Python

Probability

Sample Space $S$: Set of all possible outcomes

Probability $P(A)$: Likelihood of event $A$

  • $0 \leq P(A) \leq 1$
  • $P(S) = 1$ eg. $P(H) + P(T)=1$

Coin

Statistical Simulation in Python

Mutually Exclusive Events

Sample Space $S$: Set of all possible outcomes

Probability $P(A)$: Likelihood of event $A$

  • $0 \leq P(A) \leq 1$
  • $P(S) = 1$
    • $P(H) + P(T)=1$
  • For mutually exclusive events $A$ and $B$:
    • $P(A \cap B) = 0$
    • $P(A \cup B) = P(A) + P(B)$
Statistical Simulation in Python

Probability

$P(A \cup B) = P(A) + P(B) - P(A \cap B)$

A Intersection B

Statistical Simulation in Python

Using Simulation for Probability Estimation

Steps for Estimating Probability:

  1. Construct sample space or population.
  2. Determine how to simulate one outcome.
  3. Determine rule for success.
  4. Sample repeatedly and count successes.
  5. Calculate frequency of successes as an estimate of probability.
Statistical Simulation in Python

Let's practice!

Statistical Simulation in Python

Preparing Video For Download...