Skip to main content

Section Tuesday, Jan 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.

Subsection HW 1 Q5

Write \(F\) for the event that there’s a fire and \(S\) for the event that there’s visible smoke. Then the information we’re given can be interpreted as:
\begin{align*} \Pr(F) \amp = 0.01 \\ \Pr(S) \amp = 0.1 \\ \Pr(S\mid F) \amp = 0.9 \end{align*}
In this case, we can use the simpler version of Bayes’ Theorem:
\begin{gather*} \Pr(F \mid S) = \frac{\Pr(S \mid F)\Pr(F)}{\Pr(S)} = \dotsb \end{gather*}
Unlike our usual diagnostic testing examples, we do have access to the denominator probability here.

Subsection Sec 2.1: Random Variables

Definition 34.

A random variable is a function \(X \colon \Omega \to \R\text{.}\)
The idea is that \(X\) is a variable representing a real number value which depends on the outcome of an experiment.

Example 35.

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\text{.}\) Let \(D\) be the number of seeds that didn’t sprout. Let
\begin{align*} A \amp = \text{avg height of all 50 plants} \\ \amp = \frac{H_1 + H_2 + \dotsb + H_{50}}{50} \end{align*}
A random variable has its own probability distribution.

Example 36.

Roll a fair D6 twice. Let \(S\) be the sum of the rolls. Then \(\Omega = \{(1, 1), (1, 2), \dotsc, (6, 6)\}\) has 36 elements. Since the die is fair, the distribution on \(\Omega\) is uniform, i.e., \(\Pr(\omega) = \frac{1}{36}\) for any \(\omega \in \Omega\text{.}\)
\(S\) takes on the values \(2, 3, 4, \dotsc, 12\text{,}\) with probabilities:
Table 37. Distribution for \(S\)
\(x\) \(\Pr(S = x)\)
2 1/36
3 2/36
4 3/36
\(\vdots\) \(\vdots\)
7 6/36
8 5/36
\(\vdots\)
12 1/36
Note that the distribution on \(\Omega\) is uniform, but the distribution on \(S\) is not.

Example 38.

Let \(\Omega\) be a sample space and \(A \subset \Omega\) an event. Let
\begin{align*} X = \begin{cases} 1 \amp x \in A \\ 0 \amp x \notin A \end{cases} \end{align*}
\(X\) is called an indicator random variable, and we say "\(X\) indicates \(A\)".
The distribution on \(X\) is:
\begin{align*} \Pr(X = 1) \amp = \Pr(\{ x \mid x \in A\}) = \Pr(A) \\ \Pr(X = 0) \amp = 1 - \Pr(A) \end{align*}

Example 39.

Suppose we flip a coin \(n\) times. Let \(H_i\) indicate heads on flip \(i\text{.}\) Let \(S\) be the total number of heads in all flips. Then:
\begin{gather*} S = H_1 + H_2 + \dotsb + H_{n} \end{gather*}
If \(p\) is the probability of the coin coming up heads on a flip, then \(S\) has the binomial distribution with parameters \(n, p\text{.}\) We’ll use the notation \(S \sim \Bin(n, p)\) and:
\begin{gather*} b(k) = b(k; n, p) = \Pr(S = k). \end{gather*}
Suppose the coin has \(p = 0.3\) and we flip it \(n = 4\) times. Find \(b(2) = b(2; 4, 0.3)\text{.}\)
The relevant flip sequences are:
\begin{gather*} THHT, HHTT, TTHH, THTH, HTHT, HTTH \end{gather*}
Each individual sequence has a probability of \((0.3)(0.3)(0.7)(0.7) = 0.0441\text{.}\) So the total probability is:
\begin{gather*} b(2; 4, 0.3) = (6)(0.0441) = 0.2646. \end{gather*}
That is, (number of flip sequences)(probability of each sequence).