From e8a8b2c750559dbdf99b9c70c4f9c3628447050a Mon Sep 17 00:00:00 2001
From: andyeisenberg
Date: Tue, 27 Jan 2026 10:04:06 -0500
Subject: [PATCH] 1-22 notes
---
source/main.ptx | 1 +
source/notes/1-22.ptx | 322 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 323 insertions(+)
create mode 100644 source/notes/1-22.ptx
diff --git a/source/main.ptx b/source/main.ptx
index d4e6d06..5037111 100644
--- a/source/main.ptx
+++ b/source/main.ptx
@@ -25,6 +25,7 @@
+
diff --git a/source/notes/1-22.ptx b/source/notes/1-22.ptx
new file mode 100644
index 0000000..e7358d2
--- /dev/null
+++ b/source/notes/1-22.ptx
@@ -0,0 +1,322 @@
+
+
+
+ Thursday, Jan 22
+
+
+
+ This is an outline of the topics we covered in class.
+ These notes are not a substitute for your own note-taking.
+ I highly recommend that you take your own notes during class.
+ If you ever miss a class for any reason, reach out to another student in class to get a copy of their notes.
+
+
+
+
+
+ Discrete Distributions
+
+
+
+
+ Suppose we expand (x + y)^n.
+ We'll get a polynomial with some coefficients:
+
+ (x+y)^n = {n\choose 0} x^n + {n\choose 1} x^{n-1}y + \dotsb + {n\choose n-1} xy^{n-1} + {n\choose n} y^n,
+
+ where {n \choose k}, read "n choose k", is the coefficient of x^{n-k}y^k.
+
+
+
+ Alternatively: {n\choose k} is the number of ways to pick k things out of a set of n things.
+ Then:
+
+ {n \choose k} = \frac{n!}{k!(n-k)!},
+
+ where n!, read "n factorial", refers to the product:
+
+ n! = n(n-1)(n-2)\dotsm (3)(2)(1).
+
+
+
+
+
+
+
+
+ 0! = 1.
+
+
+
+
+
+
+
+
+ {n\choose 0} \amp = \frac{n!}{0!(n - 0)!} = \frac{n!}{0!}{n!} = \frac{1}{0!} = 1
+ {10 \choose 3} \amp = \frac{10!}{3!7!} = \frac{10 \times 9 \times 8 \times 7!}{3\times 2 \times 1 \times 7!} = 10 \times 3 \times 4 = 120.
+
+
+
+
+
+
+ So now we get a general probability formula for the binomial distribution:
+
+ b(k; n, p) = {n \choose k} p^k (1-p)^{n-k}.
+
+
+
+
+ Let's see some more important distribution types:
+
+
+
+
+
+ Suppose we have a coin with bias p, i.e., probability p of coming up heads.
+ (Note: this is not a common term, but it will be convenient for us to have some terminology for it since we'll refer to this parameter often.) We flip the coin repeatedly until we see heads.
+ Let N be the number of flips.
+
+
+
+
+
+
+
+ N has the geometric distribution with parameter p. We'll write N \sim \Geom(p), and we'll write:
+
+ g(k) = g(k; p) = \Pr(N = k).
+
+ The geometric distribution is given by:
+
+
+
+ Geometrid Distribution
+
+
+
+ | k |
+ flip sequences |
+ g(k) |
+
+
+
+ | 1 |
+ H |
+ p |
+
+
+
+ | 2 |
+ TH |
+ (1-p)p |
+
+
+
+ | 3 |
+ TTH |
+ (1-p)^2p |
+
+
+
+ | 4 |
+ TTTH |
+ (1-p)^3p |
+
+
+
+
+
+ In general:
+
+ g(k; p) = (1-p)^{k-1}p.
+
+
+
+
+
+
+
+
+ Suppose a toxin molecule inside a cell has a 0.2 chance of leaving during each minute.
+ Let T be the number of minutes until the molecule leaves.
+ Find \Pr(T \leq 3).
+
+
+
+ If T \leq 3, then T is either 1, 2, or 3.
+
+ \Pr(T = 1) \amp = g(1; 0.2) = 0.2
+ \Pr(T = 2) \amp = g(2; 0.2) = 0.8 \times 0.2 = 0.16
+ \Pr(T = 3) \amp = g(3; 0.2) = 0.8^2 \times 0.2 = 0.128
+ \Pr(T \leq 3) \amp = 0.2 + 0.16 + 0.128 = 0.488.
+
+
+
+
+
+
+
+
+ A Poisson process is a process in which some event occurs at a constant probabilistic rate \lambda.
+ Suppose we observe a Poisson process for t time.
+ Let N be the number of occurrences of the event during that observation time.
+ Then N has the Poisson distribution with parameters \lambda, t.
+ We'll write N \times \Poiss(\lambda, t), and:
+
+ p(k) = p(k; \lambda, t) = \Pr(N = k) = \frac{(\lambda t)^k}{k!} e^{-\lambda t}.
+
+
+
+
+
+
+
+
+ Consider the following examples:
+
+ -
+
+ A radioactive material emmitting particles as it decays.
+
+
+
+ -
+
+ A call center receiving calls.
+
+
+
+ -
+
+ A stretch of highways seeing cars pass by.
+
+
+
+
+
+
+
+
+
+
+ Suppose a highway typically has 200 cars per hour.
+ Let N be the number of cars in a 30-minute observation period.
+ Then \lambda = 200, t = \frac{1}{2}, so \lambda t = 100 .
+ Then:
+
+ \Pr(N = k) \amp = \frac{100^k}{k!} e^{-100}
+ \text{e.g., } \Pr(N = 110) \amp = \frac{100^{110}}{110!} e^{-100} \approx 0.023.
+
+
+
+
+
+
+
+
+ Continuous Distributions
+
+
+
+
+ Suppose we pick a real number X \in [0, 4] uniformly.
+ Intuitively, we can say things like \Pr(X \leq 1) = \frac{1}{4} and \Pr(1 \leq X \leq 3) = \frac{1}{2}.
+ What aobut \Pr(X = 2)?
+
+
+
+ Assigning probabilities to individual outcomes isn't useful here.
+ Instead, we assign probabilities to intervals of the form a \leq X \leq b.
+
+
+
+
+
+
+
+ Let X be a random variable.
+ If X takes an interval's worth of values, then it's called continuous.
+ Otherwise, it's called discrete.
+
+
+
+
+
+
+
+
+ -
+
+ Indicator, Bin, Geom, Poiss are all discrete.
+
+
+
+ -
+
+ Pick X \in [0, 4] is continuous.
+
+
+
+ -
+
+ Height of a plant is continuous.
+
+
+
+ -
+
+ Time is often (but not always) treated as continuous.
+
+
+
+
+
+
+
+
+
+
+ Let X be a continuous random variable.
+ A probability density function (pdf) for X is a function f(x) such that:
+
+ -
+
+ f(x) \geq 0 for all x, and,
+
+
+
+ -
+
+ \int_{\Omega} f(x)\ dx = 1, where \int_{\Omega} indicates that we should integrate over the entire range of possible values of X.
+
+
+
+ Given a pdf f(x) for X:
+
+ \Pr(a \leq X \leq b) = \int_a^b f(x)\ dx.
+
+
+
+
+
+
+
+
+ Pick X\in [0, 4] uniformly.
+ Because of the uniform assumption, f(x) must be a constant function f(x) = k for some k.
+ To find k:
+
+ 1 = \int_0^4 f(x)\ dx \amp = \int_0^4 k\ dx = kx \bigg|_0^4 = 4k - 0
+ \Rightarrow \quad k \amp = \frac{1}{4}
+
+ More generally, if X \in [a, b] is chosen uniformly, then the pdf would be:
+
+ f(x) = \frac{1}{b - a}, \quad a \leq x \leq b
+
+
+
+
+
+
\ No newline at end of file