Homework 3: Measurements as random variables

EE 520: Random Processes (Fall 2026). Due: October 30, 2026, 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: Shadowing [5 pts each]

In wireless propagation, the received power in decibels is well modeled as Gaussian, PdB∼𝒩(μ,σ2)P_{\mathrm{dB}} \sim {\mathcal N}(\mu, \sigma^2) (this is log-normal shadowing). The linear-scale power is P=10PdB/10P = 10^{P_{\mathrm{dB}}/10}.

  1. Derive the PDF of PP using the monotone change-of-variables formula. This distribution has a name: identify it. (Session 7 introduces this transform and leaves the derivation to you.)

  2. A receiver loses lock when the linear power drops below a threshold tt. Compute the outage probability ℙ(P<t)\mathbb{P}(P < t) two ways: directly from the PDF of PP, and by transforming the event into decibels and using Φ\Phi. Confirm that the two agree, and state which you would actually use.

  3. One sentence: why is there a derivative in the change-of-variables formula? (Hint: densities are not probabilities.)

Problem 2: Build your own sampler [5 pts each]

The envelope of a complex Gaussian channel gain is Rayleigh, with CDF F(r)=1−exp⁡(−r22σ2),r≥0.F(r) = 1 - \exp\!\left( -\frac{r^2}{2\sigma^2} \right), \qquad r \geq 0 .

  1. Derive the inverse-CDF sampler: given U∼Unif[0,1]U \sim \text{Unif}[0,1], give the explicit formula g(U)g(U) that produces a Rayleigh draw, and justify why F−1(U)F^{-1}(U) has CDF FF. (Session 7 derives the exponential sampler in class and leaves the Rayleigh case to you.)

  2. Implement it using uniform draws only (no np.random.rayleigh), and histogram 10510^5 samples against the PDF. Turn in your plot and your code. From now on you know what the library samplers are doing.

Problem 3: Heavy tails [5 pts each]

Two candidate noise models for a range sensor have the same variance: 𝒩(0,1){\mathcal N}(0, 1) and a Laplace distribution with matching variance.

  1. Compute ℙ(|Z|>3)\mathbb{P}(\left\lvert Z \right\rvert > 3) under each model. By what factor do they differ?

  2. You observe one reading 44 standard deviations away from the predicted range. Under which noise model is this reading more plausibly “just noise” rather than a faulty sensor? Answer with a computed ratio, then give one sentence on why tail behavior, not variance, is the modeling decision that matters here.

  3. Parts (a) and (b) suggest that the ratio of the two tail probabilities keeps growing. Prove it. First show that for every t>0t > 0, Q(t)≤φ(t)t,Q(t) \leq \frac{\varphi(t)}{t}, where Q(t)Q(t) is the upper-tail probability and φ\varphi is the standard normal density (see Session 6). Hint: in Q(t)=∫t∞φ(x)dxQ(t) = \int_t^\infty \varphi(x)\,dx, every xx in the range of integration satisfies x/t≥1x/t \geq 1. Then use this bound to show that ℙLaplace(|Z|>t)/ℙGauss(|Z|>t)→∞\mathbb{P}_{\text{Laplace}}(\left\lvert Z \right\rvert > t) \,/\, \mathbb{P}_{\text{Gauss}}(\left\lvert Z \right\rvert > t) \to \infty as t→∞t \to \infty.

Problem 4: Nearest return [5 pts]

An acoustic source at the origin insonifies K=5K = 5 scatterers whose ranges are iid Unif[0,Rmax]\text{Unif}[0, R_{\max}]. The first echo to arrive comes from the nearest scatterer. Find the PDF of the first-echo range using the CDF method, and compute its mean.

Problem 5: Is the measurement worth it? [5 pts each]

A target is present (θ=1\theta = 1) with prior 0.30.3. You must decide “present” or “absent.” A correct call is worth +10+10, a false alarm costs −20-20, a miss costs −50-50, and a correct rejection is worth 00.

  1. Compute the expected utility of each immediate action and the optimal act-now decision.

  2. Before deciding, you may buy (for 33 units) one sensor reading YY with ℙ(Y=1|θ=1)=0.8\mathbb{P}(Y=1 \,|\,\theta=1) = 0.8 and ℙ(Y=1|θ=0)=0.1\mathbb{P}(Y=1 \,|\,\theta=0) = 0.1. Compute the value of the measurement: the expected utility of acting optimally after YY, averaged over YY, minus the act-now value. Should you buy?

  3. Session 7 left a question open: how does the value of a measurement depend on the prior? Keep the utilities and the sensor of part (b), let p=ℙ(θ=1)p = \mathbb{P}(\theta = 1) be a general prior, and let VoM(p)\mathrm{VoM}(p) be the value of the measurement before its price is paid. Show that VoM(p)\mathrm{VoM}(p) is piecewise linear in pp and write it out explicitly. Hint: for each reading Y=yY = y, find the priors pp for which the best action after seeing yy is “present.” Then answer the following.

Problem 6: The relaxed switch [5 pts each]

Neural networks sometimes need a learnable on/off switch: whether to keep a unit when pruning a network, or a binary hidden variable in a generative model. The switch should be on with a probability set by a real parameter μ\mu, which training adjusts by following derivatives. The trouble is that a 0/10/1 switch is a step function of μ\mu: its derivative is zero everywhere except at a single jump, so derivatives carry no information about which way to move μ\mu. A fix used in practice, the binary Concrete (or Gumbel-sigmoid) relaxation, builds the switch from Gumbel noise.

Let G1G_1 and G2G_2 be independent standard Gumbel random variables (Session 6), and let L=G1−G2L = G_1 - G_2. Define the hard switch B=𝟙{μ+L>0}B = \mathbb{1}\left\{\mu + L > 0\right\} and, for a temperature τ>0\tau > 0, the relaxed switch Yτ=11+e−(μ+L)/τ.Y_\tau = \frac{1}{1 + e^{-(\mu + L)/\tau}} .

  1. Using Session 7’s representation G=−ln⁡EG = -\ln E with E∼Exp(1)E \sim \text{Exp}(1), write LL in terms of two independent Exp(1)\text{Exp}(1) random variables E1E_1 and E2E_2. Find ℙ(L≤z)\mathbb{P}(L \leq z) by integrating the joint density of (E1,E2)(E_1, E_2) over the appropriate region of the plane (sketch the region). You should obtain FL(z)=11+e−z,F_L(z) = \frac{1}{1 + e^{-z}}, the standard logistic CDF. Find the density of LL, show that it is symmetric about 00, and conclude that ℙ(B=1)=eμ/(1+eμ)\mathbb{P}(B = 1) = e^{\mu}/(1 + e^{\mu}).

  2. Derive the density of YτY_\tau on (0,1)(0, 1) using the monotone change-of-variables formula. Show that ℙ(Yτ>1/2)=ℙ(B=1)\mathbb{P}(Y_\tau > 1/2) = \mathbb{P}(B = 1) for every τ>0\tau > 0, so rounding the relaxed switch recovers the hard switch exactly. Then show that when τ=1\tau = 1 and μ=0\mu = 0, YτY_\tau is Unif(0,1)\text{Unif}(0, 1), and explain in one sentence why this had to happen, using an idea from Session 7.

  3. Before running: with μ=1\mu = 1, predict the shape of the histogram of YτY_\tau for a small temperature, τ=0.2\tau = 0.2, and for a large one, τ=3\tau = 3. Where does the probability pile up, and does the fraction of samples above 1/21/2 change with τ\tau?

    Implement the relaxed switch using uniform draws only, and draw 10510^5 samples of YτY_\tau for each of τ=0.2,1,3\tau = 0.2, 1, 3 with μ=1\mu = 1. Histogram each against your density from part (b). Finally, hold the noise LL fixed and show that ∂Yτ∂μ=Yτ(1−Yτ)τ.\frac{\partial Y_\tau}{\partial \mu} = \frac{Y_\tau (1 - Y_\tau)}{\tau} . In one or two sentences, explain the trade-off training faces when choosing τ\tau.

    Turn in: your prediction versus the outcome, the three plots, the fraction of samples above 1/21/2 for each τ\tau, and your code.

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

The assistant was asked: “X∼Exp(1)X \sim \text{Exp}(1) models a normalized interference power; a nonlinear stage outputs Y=X3Y = X^3. Find the PDF of YY.” It answered:

This solution contains exactly one error.

  1. Identify the first line that goes wrong.

  2. Name the violated principle in one sentence, citing the session.

  3. Fix the density, and give a one-line diagnostic (dimensional or normalization) that would have exposed the error without redoing the derivation.

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

Flagging a correct step as an error costs credit; certifying correctness is part of the skill.