From 391d9180b12ad6bf826bb3f9136bd6c7c985c8f9 Mon Sep 17 00:00:00 2001 From: andyeisenberg Date: Thu, 22 Jan 2026 08:40:40 -0500 Subject: [PATCH] Rearranging notes --- source/main.ptx | 3 +- source/notes/{week01.ptx => 1-13.ptx} | 294 +------------------------- source/notes/1-15.ptx | 286 +++++++++++++++++++++++++ source/notes/1-20.ptx | 41 ++++ source/notes/week02.ptx | 28 --- 5 files changed, 337 insertions(+), 315 deletions(-) rename source/notes/{week01.ptx => 1-13.ptx} (60%) create mode 100644 source/notes/1-15.ptx create mode 100644 source/notes/1-20.ptx delete mode 100644 source/notes/week02.ptx diff --git a/source/main.ptx b/source/main.ptx index 5081079..815c739 100644 --- a/source/main.ptx +++ b/source/main.ptx @@ -22,7 +22,8 @@ Class Notes - + + diff --git a/source/notes/week01.ptx b/source/notes/1-13.ptx similarity index 60% rename from source/notes/week01.ptx rename to source/notes/1-13.ptx index 4e66389..3c4b66a 100644 --- a/source/notes/week01.ptx +++ b/source/notes/1-13.ptx @@ -1,11 +1,11 @@ -
- Week 1 +
+ Tuesday, Jan 13

- This is an outline of the topics we covered in the first week of class. + 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. @@ -13,10 +13,7 @@ - - Tuesday 1/13 - - + Sec 1.1: Sets

@@ -223,9 +220,9 @@ - + - + Sec 1.2: Probability

@@ -516,280 +513,5 @@

- - - - - - Thursday 1/15 - - - Conditional Probability - -

- Question: How does evidence (e.g., knowledge of one event occurring) change our knowledge of probabilities for other events? -

- - - -

- Roll a fair D6 two times. - Let A = \{\text{sum } \geq 10\} and B = \{\text{first roll is } 6\}. - A feels more likely if we already know B has occurred. -

-
-
- - - -

- The conditional probability of A given B is: , - - \Pr(A \mid B) = \frac{\Pr(A\cap B)}{\Pr(B)} - -

- -
- \Pr(A \mid B) tells the proportion of B which is overlapped by A. - - -

- Two overlapping circles representing events A and B sit inside a rectangle representing the sample space \Omega. - The circle labeled B is shaded. - The portion of that circle which is overlapped by the A circle is also filled in with slanted lines. -

-
- - \begin{tikzpicture} - \def\firstcircle{(180:1.75cm) circle (2.5cm)} - \def\secondcircle{(0:1.75cm) circle (2.5cm)} - \fill [gray!30] \secondcircle; - \begin{scope} - \clip \firstcircle; - \clip \secondcircle; - \fill [pattern=north east lines] \firstcircle; - \end{scope} - \draw \firstcircle node[text=black] {$A$}; - \draw \secondcircle node[text=black] {$B$}; - \draw (-5, -3) rectangle (5, 3) node [text=black,right] {$\Omega$}; - \end{tikzpicture} - - -
-
-
- - - -

- Continuing from the previous example, |\Omega| = 36. - - A \amp = \{(4, 6), (5, 5), (5, 6), (6, 4), (6, 5), (6, 6)\} - B \amp = \{(6, 1), (6, 2), (6, 3), (6, 4), (6, 5), (6, 6)\} - A \cap B \amp = \{(6, 4), (6, 5), (6, 6)\} - - So \Pr(A) = \frac{6}{36}, \Pr(B) = \frac{6}{36}, \text{and } \Pr(A\cap B) = \frac{3}{36}. - Then: - - \Pr(A \mid B) = \frac{\Pr(A\cap B)}{\Pr(B)} = \frac{3/36}{6/36} = \frac{3}{6} = \frac{1}{2}. - - Notice that \Pr(A\mid B) is significantly larger than \Pr(A). -

-
-
-
- - - Diagnostic Testing - -

- Setup: A patient takes a diagnostic test. - Let P be the event that they test positive. - Let D be the event that they have the disease. -

- - - -

- The sensitivity of a diagnostic test is \Pr(P \mid D). - The specificity of a diagnostic test is \Pr(P^c \mid D^c). -

-
-
- -

- But, what the patient really wants to know is \Pr(D \mid P). -

- - - -

- A disease has a prevalence of 1%. - A test has sensitivity of 90% and specificity of 91%. - For a patient who gets a positive test result, what is the probability that they have the disease? -

- -

- - \text{A) } 9/10 \amp \amp \text{B) } 8/10 \amp \amp \text{C) } 1/10 \amp \amp \text{D) } 1/100 - -

-
- - -

- C! -

-
-
- - - Bayes' Theorem (v1) - - -

- For events A, B with nonzero probability: - - \Pr(B \mid A) = \frac{\Pr(A \mid B)\Pr(B)}{\Pr(A)} - -

-
-
- -

- For example, if a patient sees a positive diagnostic test result, they might try to calculate: - - \Pr(D \mid P) = \frac{\Pr(P \mid D)\Pr(D)}{\Pr(P)} - - \Pr(P \mid D) is the sensitivity. \Pr(D) could be the prevalence. We don't have direct access to \Pr(P). -

- -

- Observation: \Omega = D \cup D^c, so P = (P\cap D) \cup (P\cap D^c). -

- -
- - - -

-

-
- - \begin{tikzpicture} - \def\firstcircle{(0, 0) circle (2)} - \def\leftside{(-3, -3) rectangle (-0.5, 3)} - \def\rightside{(-0.5, -3) rectangle (4, 3)} - \begin{scope} - \clip\leftside; - \fill [gray!50] \firstcircle; - \end{scope} - \begin{scope} - \clip\rightside; - \fill [pattern=north east lines] \firstcircle; - \end{scope} - \draw (0, 0) circle (2); - \node at (2.5, 0) {$P$}; - \draw (-0.5, 3) to (-0.5, -3); - \node at (-1.5, -3.5) {$D$}; - \node at (1.5, -3.5) {$D^c$}; - \draw (-3, -3) rectangle (4, 3) node [text=black,right] {$\Omega$}; - \end{tikzpicture} - - -
- -

- Observation 2: - - \Pr(P \mid D) \amp \frac{\Pr(P\cap D)}{\Pr(D)} \amp \amp \Rightarrow \amp \Pr(P \cap D) \amp = \Pr(P\mid D)\Pr(D) - \Pr(P \mid D^c) \amp \frac{\Pr(P\cap D^c)}{\Pr(D^c)} \amp \amp \Rightarrow \amp \Pr(P \cap D^c) \amp = \Pr(P\mid D^c)\Pr(D^c) - - So: - - \Pr(P) = \Pr(P\mid D)\Pr(D) + \Pr(P\mid D^c)\Pr(D^c) - -

- - - Bayes' Theorem (v2) - - -

- - \Pr(B \mid A) = \frac{\Pr(A \mid B)\Pr(B)}{\Pr(A \mid B)\Pr(B) + \Pr(A \mid B^c)\Pr(B^c)} - -

-
-
- - - -

- Continuing from the previous example: - - \Pr(D\mid P) \amp = \frac{\Pr(P\mid D)\Pr(D)}{\Pr(P\mid D)\Pr(D) + \Pr(P\mid D^c)\Pr(D^c)} - \amp = \frac{(0.9)(0.01)}{(0.9)(0.01) + (1 - 0.91)(1 - 0.01)} - \amp \approx 0.092 - - What if the patient got a negative test result instead? In that case, what is the probaiblity they do not have the disease? - - \Pr(D^c\mid P^c) \amp = \frac{\Pr(P^c\mid D^c)\Pr(D^c)}{\Pr(P^c\mid D^c)\Pr(D^c) + \Pr(P^c\mid D)\Pr(D)} - \amp = \frac{(0.91)(1 - 0.01)}{(0.91)(1 - 0.01) + (1 - 0.9)(0.01)} - \amp \approx 0.999 - -

-
-
-
- - - Independent Events - -

- Question: \Pr(A \mid B) is supposed to capture how information about B affects the probability of A. - What if it doesn't? -

- - - -

- Events A, B are independent if \Pr(A \mid B) = \Pr(A). -

-
-
- -

- Observation: If A, B have nonzero probability and are independent, then: - - \Pr(A\mid B) \amp = \Pr(A) - \frac{\Pr(A\cap B)}{\Pr(B)} \amp = \Pr(A) - \Pr(A\cap B) \amp = \Pr(A)\Pr(B) - - We can take this last equation as a definition of independence. -

- - - -

- Continuing , recall A = \{\text{sum} \geq 10\} and B = \{\text{1st roll is } 6\}. - We found that \Pr(A \mid B) \neq \Pr(A), so A and B are not independent. -

- -

- Now consider the event C = \{\text{sum} = 7\}. - We have: - - C \amp = \{(1, 6), (2, 5), (3, 4), (4, 3), (5, 2), (6, 1)\} - \Pr(C) \amp = \frac{6}{36} = \frac{1}{6} - B\cap C \amp = \{(6, 1)\} - \Pr(B\cap C) \amp = \frac{1}{36} - \text{therefore: } \Pr(C\mid B) \amp = \frac{\Pr(C\cap B)}{\Pr(B)} = \frac{1/36}{1/6} = \frac{1}{6} = \Pr(C) - - Therefore events B, C are independent. -

-
-
-
-
-
\ No newline at end of file + +
\ No newline at end of file diff --git a/source/notes/1-15.ptx b/source/notes/1-15.ptx new file mode 100644 index 0000000..e79e0cf --- /dev/null +++ b/source/notes/1-15.ptx @@ -0,0 +1,286 @@ + + +
+ Thursday 1/15 + + +

+ 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. +

+
+ + + + Sec 1.3: Conditional Probability + +

+ Question: How does evidence (e.g., knowledge of one event occurring) change our knowledge of probabilities for other events? +

+ + + +

+ Roll a fair D6 two times. + Let A = \{\text{sum } \geq 10\} and B = \{\text{first roll is } 6\}. + A feels more likely if we already know B has occurred. +

+
+
+ + + +

+ The conditional probability of A given B is: , + + \Pr(A \mid B) = \frac{\Pr(A\cap B)}{\Pr(B)} + +

+ +
+ \Pr(A \mid B) tells the proportion of B which is overlapped by A. + + +

+ Two overlapping circles representing events A and B sit inside a rectangle representing the sample space \Omega. + The circle labeled B is shaded. + The portion of that circle which is overlapped by the A circle is also filled in with slanted lines. +

+
+ + \begin{tikzpicture} + \def\firstcircle{(180:1.75cm) circle (2.5cm)} + \def\secondcircle{(0:1.75cm) circle (2.5cm)} + \fill [gray!30] \secondcircle; + \begin{scope} + \clip \firstcircle; + \clip \secondcircle; + \fill [pattern=north east lines] \firstcircle; + \end{scope} + \draw \firstcircle node[text=black] {$A$}; + \draw \secondcircle node[text=black] {$B$}; + \draw (-5, -3) rectangle (5, 3) node [text=black,right] {$\Omega$}; + \end{tikzpicture} + + +
+
+
+ + + +

+ Continuing from the previous example, |\Omega| = 36. + + A \amp = \{(4, 6), (5, 5), (5, 6), (6, 4), (6, 5), (6, 6)\} + B \amp = \{(6, 1), (6, 2), (6, 3), (6, 4), (6, 5), (6, 6)\} + A \cap B \amp = \{(6, 4), (6, 5), (6, 6)\} + + So \Pr(A) = \frac{6}{36}, \Pr(B) = \frac{6}{36}, \text{and } \Pr(A\cap B) = \frac{3}{36}. + Then: + + \Pr(A \mid B) = \frac{\Pr(A\cap B)}{\Pr(B)} = \frac{3/36}{6/36} = \frac{3}{6} = \frac{1}{2}. + + Notice that \Pr(A\mid B) is significantly larger than \Pr(A). +

+
+
+
+ + + + Diagnostic Testing + +

+ Setup: A patient takes a diagnostic test. + Let P be the event that they test positive. + Let D be the event that they have the disease. +

+ + + +

+ The sensitivity of a diagnostic test is \Pr(P \mid D). + The specificity of a diagnostic test is \Pr(P^c \mid D^c). +

+
+
+ +

+ But, what the patient really wants to know is \Pr(D \mid P). +

+ + + +

+ A disease has a prevalence of 1%. + A test has sensitivity of 90% and specificity of 91%. + For a patient who gets a positive test result, what is the probability that they have the disease? +

+ +

+ + \text{A) } 9/10 \amp \amp \text{B) } 8/10 \amp \amp \text{C) } 1/10 \amp \amp \text{D) } 1/100 + +

+
+ + +

+ C! +

+
+
+ + + Bayes' Theorem (v1) + + +

+ For events A, B with nonzero probability: + + \Pr(B \mid A) = \frac{\Pr(A \mid B)\Pr(B)}{\Pr(A)} + +

+
+
+ +

+ For example, if a patient sees a positive diagnostic test result, they might try to calculate: + + \Pr(D \mid P) = \frac{\Pr(P \mid D)\Pr(D)}{\Pr(P)} + + \Pr(P \mid D) is the sensitivity. \Pr(D) could be the prevalence. We don't have direct access to \Pr(P). +

+ +

+ Observation: \Omega = D \cup D^c, so P = (P\cap D) \cup (P\cap D^c). +

+ +
+ + + +

+

+
+ + \begin{tikzpicture} + \def\firstcircle{(0, 0) circle (2)} + \def\leftside{(-3, -3) rectangle (-0.5, 3)} + \def\rightside{(-0.5, -3) rectangle (4, 3)} + \begin{scope} + \clip\leftside; + \fill [gray!50] \firstcircle; + \end{scope} + \begin{scope} + \clip\rightside; + \fill [pattern=north east lines] \firstcircle; + \end{scope} + \draw (0, 0) circle (2); + \node at (2.5, 0) {$P$}; + \draw (-0.5, 3) to (-0.5, -3); + \node at (-1.5, -3.5) {$D$}; + \node at (1.5, -3.5) {$D^c$}; + \draw (-3, -3) rectangle (4, 3) node [text=black,right] {$\Omega$}; + \end{tikzpicture} + + +
+ +

+ Observation 2: + + \Pr(P \mid D) \amp \frac{\Pr(P\cap D)}{\Pr(D)} \amp \amp \Rightarrow \amp \Pr(P \cap D) \amp = \Pr(P\mid D)\Pr(D) + \Pr(P \mid D^c) \amp \frac{\Pr(P\cap D^c)}{\Pr(D^c)} \amp \amp \Rightarrow \amp \Pr(P \cap D^c) \amp = \Pr(P\mid D^c)\Pr(D^c) + + So: + + \Pr(P) = \Pr(P\mid D)\Pr(D) + \Pr(P\mid D^c)\Pr(D^c) + +

+ + + Bayes' Theorem (v2) + + +

+ + \Pr(B \mid A) = \frac{\Pr(A \mid B)\Pr(B)}{\Pr(A \mid B)\Pr(B) + \Pr(A \mid B^c)\Pr(B^c)} + +

+
+
+ + + +

+ Continuing from the previous example: + + \Pr(D\mid P) \amp = \frac{\Pr(P\mid D)\Pr(D)}{\Pr(P\mid D)\Pr(D) + \Pr(P\mid D^c)\Pr(D^c)} + \amp = \frac{(0.9)(0.01)}{(0.9)(0.01) + (1 - 0.91)(1 - 0.01)} + \amp \approx 0.092 + + What if the patient got a negative test result instead? In that case, what is the probaiblity they do not have the disease? + + \Pr(D^c\mid P^c) \amp = \frac{\Pr(P^c\mid D^c)\Pr(D^c)}{\Pr(P^c\mid D^c)\Pr(D^c) + \Pr(P^c\mid D)\Pr(D)} + \amp = \frac{(0.91)(1 - 0.01)}{(0.91)(1 - 0.01) + (1 - 0.9)(0.01)} + \amp \approx 0.999 + +

+
+
+
+ + + + Sec 1.4: Independent Events + +

+ Question: \Pr(A \mid B) is supposed to capture how information about B affects the probability of A. + What if it doesn't? +

+ + + +

+ Events A, B are independent if \Pr(A \mid B) = \Pr(A). +

+
+
+ +

+ Observation: If A, B have nonzero probability and are independent, then: + + \Pr(A\mid B) \amp = \Pr(A) + \frac{\Pr(A\cap B)}{\Pr(B)} \amp = \Pr(A) + \Pr(A\cap B) \amp = \Pr(A)\Pr(B) + + We can take this last equation as a definition of independence. +

+ + + +

+ Continuing , recall A = \{\text{sum} \geq 10\} and B = \{\text{1st roll is } 6\}. + We found that \Pr(A \mid B) \neq \Pr(A), so A and B are not independent. +

+ +

+ Now consider the event C = \{\text{sum} = 7\}. + We have: + + C \amp = \{(1, 6), (2, 5), (3, 4), (4, 3), (5, 2), (6, 1)\} + \Pr(C) \amp = \frac{6}{36} = \frac{1}{6} + B\cap C \amp = \{(6, 1)\} + \Pr(B\cap C) \amp = \frac{1}{36} + \text{therefore: } \Pr(C\mid B) \amp = \frac{\Pr(C\cap B)}{\Pr(B)} = \frac{1/36}{1/6} = \frac{1}{6} = \Pr(C) + + Therefore events B, C are independent. +

+
+
+
+
\ No newline at end of file diff --git a/source/notes/1-20.ptx b/source/notes/1-20.ptx new file mode 100644 index 0000000..aec8516 --- /dev/null +++ b/source/notes/1-20.ptx @@ -0,0 +1,41 @@ + + +
+ Tuesday 1/20 + + +

+ 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. +

+
+ + + + Sec 2.1: Random Variables + + + +

+ A random variable is a function X \colon \Omega \to \R. +

+
+
+ +

+ The idea is that X is a variable representing a real number value which depends on the outcome of an experiment. +

+ + + +

+ An experiment consists of planting 50 seeds in a garden, then growing them for 3 months. + Let H_i be the height of plant i. + +

+
+
+
+
\ No newline at end of file diff --git a/source/notes/week02.ptx b/source/notes/week02.ptx deleted file mode 100644 index 1d09192..0000000 --- a/source/notes/week02.ptx +++ /dev/null @@ -1,28 +0,0 @@ - - -
- Week 2 - - - Monday - -

-

-
- - - - Wednesday - -

-

-
- - - - Friday - -

-

-
-