109 lines
2.7 KiB
Text
109 lines
2.7 KiB
Text
#import "@youwen/zen:0.1.0": *
|
|
#import "@preview/ctheorems:1.1.3": *
|
|
#import "@preview/mitex:0.2.5": *
|
|
|
|
#show: zen.with(
|
|
title: "Homework 2",
|
|
author: "Youwen Wu",
|
|
date: "Winter 2025",
|
|
)
|
|
|
|
#set enum(spacing: 2em)
|
|
|
|
#let correction = content => {
|
|
set text(fill: red)
|
|
box(stroke: 1pt, inset: 5pt, content)
|
|
}
|
|
|
|
#mitex(`
|
|
\textbf{Problem 1}
|
|
|
|
Let $P(A)$ denote the probability that a customer watches exactly one category of programs. From the problem:
|
|
\begin{itemize}
|
|
\item 70\% watch more than one category: $P(A^c) = 0.7 \Rightarrow P(A) = 0.3$.
|
|
\item 20\% watch sports: $P(S) = 0.2$.
|
|
\item Of those watching more than one category, 15\% watch sports: $P(S | A^c) = 0.15$.
|
|
\end{itemize}
|
|
|
|
We need $P(A \cap S^c)$, the probability a customer watches exactly one category and it is not sports:
|
|
\[
|
|
P(A \cap S^c) = P(A) - P(A \cap S).
|
|
\]
|
|
|
|
Since $P(A \cap S) = 0$ (sports watchers are counted under $P(A^c)$):
|
|
\[
|
|
P(A \cap S^c) = P(A) = 0.3.
|
|
\]
|
|
\textbf{Solution:} $P(A \cap S^c) = 0.3$.
|
|
|
|
\textbf{Problem 2}
|
|
|
|
We need $P(6|3,4)$, the probability the 6-sided die was chosen given rolls 3 and 4.
|
|
|
|
Using Bayes' Theorem:
|
|
\[
|
|
P(6|3,4) = \frac{P(3,4|6) P(6)}{P(3,4)}.
|
|
\]
|
|
Assuming equal probabilities of choosing any die ($P(4) = P(6) = P(12) = \frac{1}{3}$), and independent rolls:
|
|
\[
|
|
P(3,4|6) = P(3|6) P(4|6) = \frac{1}{6} \cdot \frac{1}{6} = \frac{1}{36}.
|
|
\]
|
|
\[
|
|
P(3,4) = \frac{1}{3}\left(\frac{1}{16} + \frac{1}{36} + \frac{1}{144}\right).
|
|
\]
|
|
Simplify and compute:
|
|
\[
|
|
P(6|3,4) = \frac{\frac{1}{36} \cdot \frac{1}{3}}{\frac{1}{3}\left(\frac{1}{16} + \frac{1}{36} + \frac{1}{144}\right)}.
|
|
\]
|
|
Numerical calculation gives $P(6|3,4) \approx 0.51$.
|
|
|
|
\textbf{Problem 3}
|
|
|
|
Probability a marble is blue after the second draw:
|
|
\[
|
|
P(\text{Blue on second draw}) = \frac{b}{n} \cdot \frac{b+k}{n+k} + \frac{g}{n} \cdot \frac{g+k}{n+k}.
|
|
\]
|
|
Simplify and substitute as needed.
|
|
|
|
\textbf{Problem 4}
|
|
|
|
(a) Probability of drawing two candies with the same flavor is:
|
|
\[
|
|
P(\text{same flavor}) = \sum_{pockets} P(\text{flavor from pocket})^2 \cdot P(\text{pocket})^2.
|
|
\]
|
|
|
|
(b) Bayesian calculations apply. Let heads/tails represent sequences, use Bayes' theorem.
|
|
|
|
(c) Set probabilities equal:
|
|
\[
|
|
\frac{2+x}{2+7+x} = \frac{5}{5+2}.
|
|
\]
|
|
Solve for $x$.
|
|
|
|
\textbf{Problem 5}
|
|
|
|
For independence: check $P(A \cap B) = P(A)P(B)$.
|
|
Repeat for other pairs.
|
|
|
|
\textbf{Problem 6}
|
|
|
|
Partition definition and law of total probability:
|
|
\[
|
|
P(A|B) = \sum P(A|B_i)P(B_i|B).
|
|
\]
|
|
Proof by substitution.
|
|
|
|
\textbf{Problem 7}
|
|
|
|
(a)-(c) Condition on defendant guilt and independence.
|
|
Use $P(\text{Guilty}) = 0.7$ and $P(\text{Innocent}) = 0.3$.
|
|
|
|
\textbf{Problem 8}
|
|
|
|
(a) Use total probability:
|
|
\[
|
|
P(A) = \sum P(A|word_i)P(word_i).
|
|
\]
|
|
|
|
(b) Enumerate possible word lengths.
|
|
`)
|