# 概率论与数理统计 (Spring 2023)/Problem Set 1

• 每道题目的解答都要有完整的解题过程，中英文不限。
• 我们推荐大家使用LaTeX, markdown等对作业进行排版。
• 每道题目的解答都要有完整的解题过程，中英文不限。
• 我们推荐大家使用LaTeX, markdown等对作业进行排版。

## Assumption throughout Problem Set 1

Without further notice, we are working on probability space $\displaystyle{ (\Omega,\mathcal{F},\mathbf{Pr}) }$.

## Problem 1 (Principle of Inclusion and Exclusion)

Let $\displaystyle{ n\ge 1 }$ be a positive integer and $\displaystyle{ A_1,A_2,\ldots,A_n }$ be $\displaystyle{ n }$ events.

• [Union bound] Prove $\displaystyle{ \mathbf{Pr}\left( \bigcup_{i=1}^{n} A_i \right) \le \sum_{i=1}^{n} \mathbf{Pr}\left(A_i\right) }$ using the definition of probability space.
• [Principle of Inclusion and Exclusion (PIE)] Prove that $\displaystyle{ \mathbf{Pr}\left( \bigcup_{i=1}^n A_i\right) = \sum_{\emptyset \neq S \subseteq [n]} (-1)^{|S|-1} \mathbf{Pr}\left( \bigcap_{i \in S} A_i \right) }$, where $\displaystyle{ [n]=\{1,2,\ldots,n\} }$.
• [Surjection] For positive integers $\displaystyle{ m\ge n }$, prove that the probability of a uniform random function $\displaystyle{ f:[m]\to[n] }$ to be surjective (满射) is $\displaystyle{ \sum_{k=1}^n(-1)^{n-k}{n\choose k}\left(\frac{k}{n}\right)^m }$.
• [Proper $\displaystyle{ q }$-coloring of $\displaystyle{ n }$-cycle] Given an arbitrary integer $\displaystyle{ q\ge 2 }$, calculate the probability of a uniform random $\displaystyle{ n }$-tuples $\displaystyle{ p = (p_1,p_2,\ldots,p_n)\in[q]^n }$ satisfying the following property: $\displaystyle{ p_{n} \neq p_1 }$ and $\displaystyle{ p_i \neq p_{i+1} }$ for all $\displaystyle{ 1 \le i \le n-1 }$. You are required to apply PIE to calculate this probability. Note that this is the probability of a uniform random $\displaystyle{ q }$-coloring of an $\displaystyle{ n }$-cycle to be proper.
• [Bonferroni's inequality and Kounias' inequality] Prove that $\displaystyle{ \sum_{i=1}^n \mathbf{Pr}(A_i) - \sum_{1 \le i\lt j \le n} \mathbf{Pr}(A_i \cap A_j)\le \mathbf{Pr}\left(\bigcup_{i=1}^n A_i\right) \le \sum_{i=1}^n \mathbf{Pr} \left( A_i\right) - \sum_{i=2}^n \mathbf{Pr}(A_1 \cap A_i). }$ (Hint: This is sometimes called Kounias' inequality which is weaker than the Bonferroni's inequality. You can try using Venn diagram to understand these inequalities.)

## Problem 2 (Symmetric 1D random walk)

A gambler plays a fair gambling game: At each round, he flips a fair coin, earns $\displaystyle{ 1 }$ point if it's HEADs, and loses $\displaystyle{ 1 }$ point if otherwise.

• [Symmetric 1D random walk (I)] Let $\displaystyle{ A_i }$ be the event that the gambler earns $\displaystyle{ 0 }$ points after playing $\displaystyle{ i }$ rounds of the game, that is, the number of times the coin lands on heads is equal to the number of times it lands on tails. Compute $\displaystyle{ \sum_{i=1}^{+\infty} \mathbf{Pr}(A_i) }$. (Hint: You may use Stirling's approximation to estimate $\mathbf{Pr}(A_i)$ and derive that $\displaystyle{ \sum_{i=1}^{+\infty} \mathbf{Pr}(A_i) = +\infty }$.)

• [Symmetric 1D random walk (II)] Suppose that the game ends upon that the gambler loses all his $\displaystyle{ m }$ points. Let $\displaystyle{ B_i }$ be the event that the game ends within $\displaystyle{ i }$ rounds. Compute $\displaystyle{ \sum_{i=1}^{+\infty} \mathbf{Pr}(\overline{B_i}) }$. (Hint: You may first consider $\displaystyle{m = 1}$ case. Let $\displaystyle{C_i}$ be the event that the game ends at the $\displaystyle{i}$-th round. (i) Prove that $\displaystyle{ \sum_{i=1}^{+\infty} \mathbf{Pr}(\overline{B_i}) = \sum_{i=1}^{+\infty} (i-1) \mathbf{Pr}(C_i) }$. (ii) Compute $\displaystyle{ \mathbf{Pr}(C_i) }$, which is a special case of the ballot problem. (iii) Finally, use Stirling's approximation to derive that $\displaystyle{ \sum_{i=1}^{+\infty} \mathbf{Pr}(\overline{B_i}) = +\infty }$.)

• [Symmetric 1D random walk (III)] Suppose that the game ends upon that the gambler loses all his $\displaystyle{ m }$ points or earns another $\displaystyle{ m }$ points (i.e., the number of points he possesses reaches $\displaystyle{ 2m }$). Let $\displaystyle{ C }$ be the event that the game ends within $\displaystyle{ n }$ rounds. Compute $\displaystyle{ \mathbf{Pr}(C) }$. (Hint: A variant of the problem is sometimes called the ballot problem, and there is a famous trick known as André's reflection principle.)

## Problem 3 (Probability space)

• [Nonexistence of probability space] Prove that it is impossible to define a uniform probability law on natural numbers $\displaystyle{ \mathbb{N} }$. More precisely, prove that there does not exist a probability space $\displaystyle{ (\mathbb{N},2^{\mathbb{N}},\mathbf{Pr}) }$ such that $\displaystyle{ \mathbf{Pr}(\{i\}) = \mathbf{Pr}(\{j\}) }$ for all $\displaystyle{ i, j \in \mathbb{N} }$. Please explain why the same argument fails to prove that there is no uniform probability law on the real interval $\displaystyle{ [0,1] }$, that is, there is no such probability space $\displaystyle{ ([0,1],\mathcal{F},\mathbf{Pr}) }$ that for any interval $\displaystyle{ (l,r] \subseteq [0,1] }$, it holds that $\displaystyle{ (l,r] \in \mathcal{F} }$ and $\displaystyle{ \mathbf{Pr}( (l,r] ) = r-l }$. (Actually, such probability measure does exist and is called the Lebesgue measure on $\displaystyle{ [0,1] }$).

• [Smallest $\displaystyle{ \sigma }$-field] For any subset $\displaystyle{ S \subseteq 2^\Omega }$, prove that the smallest $\displaystyle{ \sigma }$-field containing $\displaystyle{ S }$ is given by $\displaystyle{ \bigcap_{\substack{S \subseteq \mathcal{F} \subseteq 2^\Omega\\ \mathcal{F} \text{ is a } \sigma\text{-field }} } \mathcal{F} }$. (Hint: You should show that it is indeed a $\displaystyle{ \sigma }$-field and also it is the smallest one containing $\displaystyle{ S }$.)

• [Limit of events] Let $\displaystyle{ (A_i)_{i \in \mathbb{N}} }$ be a sequence of events. Define $\displaystyle{ \limsup A_n = \bigcap_{n=1}^{+\infty} \bigcup_{k=n}^{+\infty} A_k }$ and $\displaystyle{ \liminf A_n = \bigcup_{n=1}^{+\infty} \bigcap_{k=n}^{+\infty} A_k }$. Prove that

• $\displaystyle{ \liminf A_n, \limsup A_n \in \mathcal{F} }$ and $\displaystyle{ \liminf A_n \subseteq \limsup A_n }$;
• $\displaystyle{ \liminf A_n = \{\omega \in \Omega \mid \omega \in A_n \text{ for all but finitely many values of } n\} }$;
• $\displaystyle{ \limsup A_n = \{\omega \in \Omega \mid \omega \in A_n \text{ for infinite many values of } n\} }$;
• If $\displaystyle{ A = \liminf A_n = \limsup A_n }$, then $\displaystyle{ \mathbf{Pr}(A_n) \rightarrow \mathbf{Pr}(A) }$ as $\displaystyle{ n\to\infty }$;
• Furthermore, if the limit $\displaystyle{ A = \liminf A_n = \limsup A_n }$ exists and for every $\displaystyle{ n }$, the two events $\displaystyle{ \bigcup_{k=n}^{+\infty} A_k }$ and $\displaystyle{ \bigcap_{k=n}^{+\infty} A_k }$ are independent, then $\displaystyle{ \mathbf{Pr}(A) }$ is either $\displaystyle{ 0 }$ or $\displaystyle{ 1 }$.

## Problem 4 (Conditional probability)

• [Conditional version of the total probability] Let $\displaystyle{ C_1,\cdots, C_n }$ be disjoint events that form a partition of the sample space. Let $\displaystyle{ A }$ and $\displaystyle{ B }$ be events such that $\displaystyle{ \textbf{Pr}(B\cap C_i)\gt 0 }$ for all $\displaystyle{ i }$. Show that $\displaystyle{ \textbf{Pr}(A|B) = \sum_{i = 1}^n \textbf{Pr}(C_i|B)\cdot \textbf{Pr}(A|B\cap C_i) }$

• [Balls in urns (I)] There are $\displaystyle{ n }$ urns of which the $\displaystyle{ r }$-th contains $\displaystyle{ r-1 }$ white balls and $\displaystyle{ n-r }$ black balls. You pick an urn uniformly at random (here, "uniformly" means that each urn has equal probability of being chosen) and remove two balls from that urn, uniformly at random without replacement (which means that each of the $\displaystyle{ {n-1\choose 2} }$ pairs of balls are chosen to be removed with equal probability). Find the following probabilities:

1. the second ball is black;
2. the second ball is black, given that the first is black.

• [Balls in urns (II)] Suppose that an urn contains $\displaystyle{ w }$ white balls and $\displaystyle{ b }$ black balls. The balls are drawn from the urn one by one, each time uniformly and independently at random, without replacement (which means we do not put the chosen ball back after each drawing). Find the probabilities of the events:

1. the first white ball drawn is the $\displaystyle{ (k+1) }$th ball;
2. the last ball drawn is white.

• [Balls in urns (III)] There are $\displaystyle{ n }$ urns filled with black and white balls. Let $\displaystyle{ f_i }$ be the fraction of white balls in the $\displaystyle{ i }$-th urn. In stage 1 an urn is chosen uniformly at random. In stage 2 a ball is drawn uniformly at random from the urn chosen in stage 1. Let $\displaystyle{ U_i }$ be the event that the $\displaystyle{ i }$-th urn was chosen at stage 1. Let $\displaystyle{ W }$ be the event that a white ball is drawn at stage 2, and $\displaystyle{ B }$ be the event that a black ball is drawn at stage 2.
1. Use Bayes's Law to express $\displaystyle{ \textbf{Pr}(U_i|W) }$ in terms of $\displaystyle{ f_1,\cdots, f_n }$.
2. Let's say there are three urns and urn 1 has 30 white and 10 black balls, urn 2 has 20 white and 20 black balls, and urn 3 has 10 white balls and 30 black balls. Compute $\displaystyle{ \textbf{Pr}(U_1|B) }$, $\displaystyle{ \textbf{Pr}(U_2|B) }$ and $\displaystyle{ \textbf{Pr}(U_3|B) }$.

## Problem 5 (Independence)

Let's consider a series of $\displaystyle{ n }$ outputs $\displaystyle{ (X_1, X_2, \cdots, X_n) \in \{0,1\}^n }$ of $\displaystyle{ n }$ independent Bernoulli trials, where each trial succeeds with the same probability $\displaystyle{ 0 \lt p \lt 1 }$.

• [Limited independence] Construct three events $\displaystyle{ A,B }$ and $\displaystyle{ C }$ out of $\displaystyle{ n }$ Bernoulli trials such that $\displaystyle{ A, B }$ and $\displaystyle{ C }$ are pairwise independent but are not (mutually) independent. You need to prove that the constructed events $\displaystyle{ A, B }$ and $\displaystyle{ C }$ satisfy this. (Hint: Consider the case where $\displaystyle{ n = 2 }$ and $\displaystyle{ p = 1/2 }$.)

• [Product distribution] Suppose someone has observed the output of the $\displaystyle{ n }$ trials, and she told you that precisely $\displaystyle{ k }$ out of $\displaystyle{ n }$ trials succeeded for some $\displaystyle{ 0\lt k\lt n }$. Now you want to predict the output of the $\displaystyle{ (n+1) }$-th trial while the parameter $\displaystyle{ p }$ of the Bernoulli trial is unknown. One way to estimate $\displaystyle{ p }$ is to find such $\displaystyle{ \hat{p} }$ that makes the observed outcomes most probable, namely you need to solve $\displaystyle{ \arg \max_{\hat{p}\in(0,1)} \mathbf{Pr}_{\hat{p}} [k \text{ out of } n\text{ trials succeed}]. }$

1. Estimate $\displaystyle{ p }$ by solving the above optimization problem.
2. If someone tells you exactly which $\displaystyle{ k }$ trials succeed (in addition to just telling you the number of successful trials, which is $\displaystyle{ k }$), would it help you to estimate $\displaystyle{ p }$ more accurately? Why?

## Problem 6 (Probabilistic method)

A CNF formula合取范式$\displaystyle{ \Phi }$ over $\displaystyle{ n }$ Boolean variables $\displaystyle{ x_1,\cdots, x_n }$ is a conjunction ($\displaystyle{ \land }$) of clauses (子句) $\displaystyle{ \Phi=C_1\land C_2\land\cdots\land C_m }$, where each clause $\displaystyle{ C_j=\ell_{j_1}\lor\ell_{j_2}\cdots\lor\ell_{j_k} }$ is a disjunction ($\displaystyle{ \lor }$) of literals (文字), where a literal $\displaystyle{ \ell_r }$ is either a variable $\displaystyle{ x_i }$ or the negation $\displaystyle{ \bar{x}_i }$ of a variable. A CNF formula is satisfiable (可满足) if there is a truth assignment $\displaystyle{ x=(x_1,\cdots, x_n)\in \{\mathtt{true},\mathtt{false}\}^n }$ to the variables such that $\displaystyle{ \Phi(x)=\mathtt{true} }$. A $\displaystyle{ k }$-CNF formula is a CNF formula in which each clause contains exactly $\displaystyle{ k }$ literals (without repetition).

• [Satisfiability (I)] Let $\displaystyle{ \Phi }$ be a $\displaystyle{ k }$-CNF with less than $\displaystyle{ 2^k }$ clauses. Use the probabilistic method to show that $\displaystyle{ \Phi }$ must be satisfiable. You should be explicit about the probability space that is used.
• [Satisfiability (II)] Give a constructive proof of the same problem above. That is, prove that $\displaystyle{ \Phi }$ is satisfiable by showing how to construct a truth assignment $\displaystyle{ x=(x_1,\cdots, x_n)\in \{\mathtt{true},\mathtt{false}\}^n }$ such that $\displaystyle{ \Phi(x)=\mathtt{true} }$. Your construction does NOT have to be efficient. Please explain the difference between this constructive proof and the proof by the probabilistic method.
• [Satisfiability (III)] Let $\displaystyle{ \Phi }$ be a $\displaystyle{ k }$-CNF with $\displaystyle{ m\geq 2^k }$ clauses. Use the probabilistic method to show that there exists a truth assignment $\displaystyle{ x=(x_1,\cdots, x_n)\in \{\mathtt{true},\mathtt{false}\}^n }$ satisfying at least $\displaystyle{ \lfloor m(1-1/2^k) \rfloor }$ clauses in $\displaystyle{ \Phi }$. (Hint: Consider overlaps of events in Venn diagram.) You should be explicit about the probability space that is used.