Ethan P. Marzban
2023-06-12
Experiment: A procedure we can repeat and infinite number of times, where each time we repeat the procedure the same fixed set of things (i.e. outcomes) can occur.
Different ways to express an outcome space: as a set, using a table (for two-stage experiments), or using a tree.
Event: A subset of \(\Omega\)
Toss a fair coin twice, and record the outcome of each toss
Outcome Space:
H | T | |
H | (H, H) | (H, T) |
T | (T, H) | (T, T) |
Toss a fair coin twice, and record the outcome of each toss
Outcome Space:
Toss a fair coin twice, and record the outcome of each toss
Some events:
\(A^\complement\)
(complement)
\(A \cap B\)
(intersection)
\(A \cup B\)
(union)
\((E \cap F)^\complement = (E^\complement) \cup (F^\complement)\)
\((E \cup F)^\complement = (E^\complement) \cap (F^\complement)\)
Two main ways of defining the probability of an event \(E\).
Classical Approach: \(\displaystyle \mathbb{P}(E) = \frac{\#(E)}{\#(\Omega)}\)
Can be used only when we have equally likely outcomes.
Keywords to look out for: at random, randomly, uniformly, etc.
Long-Run Relative Frequency Approach: Define \(\mathbb{P}(E)\) to be the relative frequency of the times we observe \(E\), after an infinite number of repetitions of our experiment.
Suppose we toss a coin and record whether the outcome lands heads
or tails
, and further suppose we observe the following tosses:
H
, T
, T
, H
, T
, H
, H
, H
, T
, T
heads
after each toss, we count the number of times we observed heads
and divide by the total number of tosses observed.Toss | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
---|---|---|---|---|---|---|---|---|---|---|
Outcome | H |
T |
T |
H |
T |
H |
H |
H |
T |
T |
Raw freq. of H |
1 | 1 | 1 | 2 | 2 | 3 | 4 | 5 | 5 | 5 |
Rel. freq of H |
1/1 | 1/2 | 1/3 | 2/4 | 2/5 | 3/6 | 4/7 | 5/8 | 5/9 | 5/10 |
\(\mathbb{P}(E \mid F)\): represents our updated beliefs on \(E\), in the presence of the information contained in \(F\).
Only defined when \(\mathbb{P}(F) \neq 0\)
Computed as \(\displaystyle \mathbb{P}(E \mid F) = \frac{\mathbb{P}(E \cap F)}{\mathbb{P}(F)}\)
Multiplication Rule: \(\mathbb{P}(E \cap F) = \mathbb{P}(E \mid F) \cdot \mathbb{P}(F) = \mathbb{P}(F \mid E) \cdot \mathbb{P}(E)\)
Bayes’ Rule: \(\displaystyle \mathbb{P}(E \mid F) = \frac{\mathbb{P}(F \mid E) \cdot \mathbb{P}(E)}{\mathbb{P}(F)}\)
Law of Total Probability: \(\displaystyle \mathbb{P}(E) = \mathbb{P}(E \mid F) \cdot \mathbb{P}(F) + \mathbb{P}(E \mid F^\complement) \cdot \mathbb{P}(F^\complement)\)
Two events \(E\) and \(F\) are independent if any of the following are true:
Fundamental Principle of Counting
If an experiment consists of \(k\) stages, where the \(i\)th stage has \(n_i\) possible configurations, then the total number of elements in the outcome space is \[ n_1 \times n_2 \times \cdots \times n_k \]
n factorial: \(n! = n \times (n - 1) \times \cdots \times (3) \times (2) \times (1)\)
n order k: \(\displaystyle (n)_k = \frac{n!}{(n - k)!}\)
n choose k: \(\displaystyle \binom{n}{k} = \frac{n!}{k! \cdot (n - k)!}\)
Chalkboard Exercise 1
An observational study tracked whether or not a group of individuals were taking a particular drug, along with whether or not they had high blood pressure.
Blood.Pressure
Drug High Low
Not Taking 10 10
Taking 10 20
A participant is selected at random.
Chalkboard Exercise 2
A recent survey at Ralph’s grocery store revealed that 25% of people buy soda and 40% of people by fruit. Additionally, 40% of people who buy soda also buy fruit. If a customer at Ralph’s is selected at random….
A random variable, loosely speaking, is a variable that tracks some sort of outcome of an experiment.
Every random variable has a state space, which is the set of values the random variable can attain. We use the notation \(S_X\) to denote the state space of the random variable \(X\).
Discrete random variables are characterized by a probability mass function (p.m.f.), which expresses not only the values the random variable can take but also the probability with which it attains those values.
Expected Value: \(\displaystyle \mathbb{E}[X] = \sum_{\text{all $k$}} k \cdot \mathbb{P}(X = k)\)
Variance:
\(\displaystyle \mathrm{Var}(X) = \sum_{\text{all $k$}}(k - \mathbb{E}[X])^2 \cdot \mathbb{P}(X = k)\)
\(\displaystyle \mathrm{Var}(X) = \left( \sum_{\text{all $k$}} k^2 \cdot \mathbb{P}(X = k) \right) - (\mathbb{E}[X])^2\)
Continuous random variables are characterized by a probability density function (p.d.f.), which is a function \(f_X(x)\) satisfying:
The term density curve refers to the graph of the p.d.f.
Cumulative Distribution Function: $F_X(x) = (X )
\(\mathbb{P}(X = k) = 0\) if \(X\) is continuous.
Binomial: \(X \sim \mathrm{Bin}(n, \ p)\)
Uniform: \(X \sim \mathrm{Unif}(a, \ b)\)
Normal: \(X \sim \mathcal{N}(\mu, \ \sigma)\)