Homework 2: How long until we find it?

EE 520: Random Processes (Fall 2026). Due: Session 6, 11:59 PM PT. Instructor: John Lipor.

Instructions

Submit your work as a PDF through the course submission system. If you need an accommodation or an alternate format, contact the instructor.

Note: For all questions asked in this course, unless the question is simply asking about definitions, please justify all answers. Stating the correct answer without justification will earn no credit. For example, if you write down a string of equations, each successive equation should be accompanied by some justification such as “by the additivity axiom” or “because the outcomes are equally likely” or “by the distributive property of set operations.” You do not need to justify algebra.

Problem 1: Time to detection [5 pts each]

A target sits in a known cell; each sonar pass independently detects it with probability q=1−αq = 1 - \alpha, where α\alpha is the overlook probability. Let XX be the number of passes until (and including) the first detection.

  1. Identify the distribution of XX; compute 𝔼[X]\mathbb{E}[X] and ℙ(X>k)\mathbb{P}(X > k).

  2. Prove the tail-sum formula 𝔼[X]=∑k≥1ℙ(X≥k)\mathbb{E}[X] = \sum_{k \geq 1} \mathbb{P}(X \geq k) for any nonnegative integer-valued random variable XX, and use it to re-derive 𝔼[X]\mathbb{E}[X] for the distribution of part (a).

  3. Two autonomous vehicles search the same cell independently: on each pass, each vehicle independently detects the target with probability qq. Let TT be the time of first detection (by either vehicle). Find the distribution of TT and 𝔼[T]\mathbb{E}[T]. Then generalize to mm vehicles.

Problem 2: The sweep [5 pts each]

A sweep covers n=40n = 40 cells; each cell independently contains a mine with probability 0.10.1, and the sensor overlooks a present mine with probability 0.250.25. Let XX be the number of mines detected in one sweep.

  1. Using indicator variables, find 𝔼[X]\mathbb{E}[X] and Var⁡(X)\operatorname{Var}(X).

  2. A second, independent sweep is performed over the same field. Let YY be the number of mines detected for the first time in sweep 2. Find 𝔼[Y]\mathbb{E}[Y].

Problem 3: The lying oracle [5 pts each]

A number θ\theta is equally likely to be any element of {1,…,16}\left\{1, \dots, 16\right\}. You ask “is θ>8\theta > 8?” and the answer is correct with probability 0.80.8 and wrong with probability 0.20.2. The answer comes back “yes.”

  1. Compute the posterior PMF of θ\theta (it takes two values; find both and check normalization).

  2. You ask a second question and may pick any threshold. Show that the threshold splitting the posterior mass most evenly is not the midpoint 88, and find it.

  3. Now suppose you keep asking threshold questions “is θ>τ\theta > \tau?”, choosing each threshold however you like, and that given θ\theta, each answer is correct with probability 0.80.8 independently of all earlier answers. Show that after kk answers, ℙ(θ=j|answers)∝4cj,\mathbb{P}(\theta = j \,|\,\text{answers}) \propto 4^{c_j}, where cjc_j is the number of the kk answers that are consistent with θ=j\theta = j. Then suppose your second question, “is θ>11\theta > 11?”, comes back “no.” Write down the posterior PMF and find the threshold that splits the posterior mass most evenly for a third question.

Problem 4: Every cell at least once [5 pts each]

A search region has 1010 cells. A prior map says that, if a target is present, it lies in each of five likely cells with probability 0.160.16 and in each of five unlikely cells with probability 0.040.04. Drones are dispatched one at a time; each inspects a single cell, chosen at random according to a fixed probability vector p=(p1,…,p10)p = (p_1, \dots, p_{10}), independently of all other drones. Two dispatch policies are proposed: (i) follow the map, where pjp_j is the prior probability of cell jj, and (ii) uniform, where pj=1/10p_j = 1/10 for every cell.

The region may be declared clear only after every cell has been inspected at least once. Suppose the region is in fact empty, so drones keep coming until that happens. Let UkU_k be the number of cells not yet inspected after kk drones, and let TT be the number of drones needed until every cell has been inspected.

  1. Using indicator variables, find 𝔼[Uk]\mathbb{E}[U_k] for a general pp. Write it out for both policies and evaluate both at k=30k = 30.

  2. Show that 𝟙{Uk≥1}≤Uk\mathbb{1}\left\{U_k \geq 1\right\} \leq U_k for every outcome, and conclude that ℙ(T>k)≤𝔼[Uk]\mathbb{P}(T > k) \leq \mathbb{E}[U_k]. Use this bound to find, for each policy, the smallest number of drones kk for which it guarantees ℙ(T≤k)≥0.99\mathbb{P}(T \leq k) \geq 0.99. Which cells control the answer for the follow-the-map policy, and why?

  3. For the uniform policy, write T=G1+G2+…+G10T = G_1 + G_2 + \dots + G_{10}, where GiG_i counts the drones dispatched while exactly i−1i - 1 distinct cells have been inspected (so G1=1G_1 = 1). Identify the distribution of each GiG_i and compute 𝔼[T]\mathbb{E}[T]. Hint: condition on everything that happened up to the moment the (i−1)(i-1)st distinct cell is inspected. Explain why, for every m≥0m \geq 0, ℙ(Gi>m|that history)=(i−110)m,\mathbb{P}(G_i > m \,|\,\text{that history}) = \left(\frac{i-1}{10}\right)^{m}, and what it tells you that the right side does not depend on the history. Then explain in one or two sentences why the same decomposition does not give 𝔼[T]\mathbb{E}[T] directly for the follow-the-map policy, even though the indicator argument of part (a) worked for both policies.

Problem 5: Race of the strategies [10 pts]

On the 10×1010 \times 10 grid from Homework 1 Problem 5, compare two search strategies over 500500 random trials: (i) a fixed grid sweep, and (ii) greedy posterior maximization. Report the mean and median number of looks to detection.

Before running: predict which strategy wins and whether the gap grows or shrinks as α\alpha increases from 0.10.1 to 0.50.5.

Turn in: a plot of mean detection time versus α\alpha for both strategies, your prediction versus the outcome, and your code.

Problem 6: Audit the TA-bot [5 pts]

The assistant was asked: “A cell either contains a target (probability 0.50.5) or is empty. Each pass over the cell detects a present target with probability q=0.35q = 0.35, independently across passes. After 66 failed passes: what should we believe, and how many more passes should we expect to need if we keep searching?” It answered:

This solution contains exactly one error, and note that not every clause is wrong.

  1. Identify the first line that goes wrong.

  2. Name the violated principle.

  3. Give the corrected belief.

  4. One sentence: why is this a mistake a language model plausibly makes?