---
title: Problem set 5
heading: "Problem set 5: Gaussians, functions and pairs of variables"
eyebrow: A11 · Problem set 5
type: problems
---

::: hook
These problems use lessons 16 to 26: the Gaussian and the central limit theorem, functions of a random variable, joint distributions, covariance and correlation, Gaussian random vectors, sums, and generating functions. Several of them are tolerance and noise budgets of the kind every hardware design review asks for.
:::

::: pool
pick: 12

::: check
kind: parts
given: m = 5 | 10; s = 0.1 | 0.2; k = 1.5 | 2.5; let L = m - k*s

## A regulator's output is Gaussian with mean {m} V and standard deviation {s} V.

::: part
answer: Q(k)
tolerance: 1%

### What fraction of units fall below {L} V?

::: misses
- [any] $Q\left(\frac{\mu - L}{\sigma}\right)$.
:::
:::

::: part
answer: 1 - 2*Q(2)
tolerance: 0.5%

### What fraction lie within ±2σ of the mean?

::: misses
- [any] $1 - 2Q(2)$.
:::
:::
:::

::: check
kind: parts
given: n = 12 | 48; s = 1 | 2

## {n} independent errors, each uniform over a width of {s} mV, are added.

::: part
answer: sqrt(n)*s/sqrt(12)
unit: mV
tolerance: 0.5%

### What is the standard deviation of the sum?

::: misses
- [any] $\sqrt n\frac{s}{\sqrt{12}}$.
:::
:::

::: part
answer: 2*Q(3)
tolerance: 1%

### By the central limit theorem, about what fraction of sums lie more than $3\sigma$ from the mean?

::: misses
- [any] Both tails: $2Q(3)$.
:::
:::
:::

::: check
kind: parts
given: m = 3 | 5; s = 0.5 | 1; R = 10 | 100

## A noisy voltage with mean {m} V and standard deviation {s} V drives {R} Ω.

::: part
answer: (m^2 + s^2)/R
unit: W
tolerance: 0.5%

### What is the average power?

::: misses
- [any] $\frac{\mu^2 + \sigma^2}{R}$.
:::
:::

::: part
answer: s^2/R
unit: W
tolerance: 0.5%

### How much of that power is in the fluctuations?

::: misses
- [any] $\sigma^2/R$.
:::
:::
:::

::: check
kind: parts
given: c = 1 | 2; l = 3 | 5

## A filter's corner is $f_c = \frac{1}{2\pi RC}$. The resistor's spread is {c}% and the capacitor's {l}%, independent.

::: part
answer: sqrt(c^2 + l^2)
tolerance: 0.5%

### What is the relative spread of $f_c$, in percent?

::: misses
- [c + l] Independent relative errors combine in quadrature.
- [any] $f_c \propto R^{-1}C^{-1}$, so add the squared percentages.
:::
:::

::: part
answer: 3*sqrt(c^2 + l^2)
tolerance: 0.5%

### What $\pm 3\sigma$ band, in percent, should the design tolerate?

::: misses
- [any] Three times the spread.
:::
:::
:::

::: check
kind: parts
given: s = 4 | 8; r = 0.9 | 0.99

## Both lines of a differential pair carry {s} mV RMS of interference, with correlation {r}.

::: part
answer: s*sqrt(2 - 2*r)
unit: mV
tolerance: 0.5%

### How much interference is in the difference?

::: misses
- [any] $\sigma\sqrt{2 - 2\rho}$.
:::
:::

::: part
answer: 20*log(sqrt(2)/sqrt(2 - 2*r))
tolerance: 0.5%

### By how many dB is that better than if the noises were uncorrelated?

::: misses
- [any] Compare with $\sigma\sqrt2$.
:::
:::
:::

::: check
kind: parts
given: l1 = 0.5 | 1; l2 = 1 | 2; t = 0.5 | 1

## Two parts fail at random with rates {l1} and {l2} per year, independently.

::: part
answer: exp(-(l1 + l2)*t)
tolerance: 0.5%

### In series, what is the chance the system survives {t} years?

::: misses
- [any] Both must survive.
:::
:::

::: part
answer: 1 - (1 - exp(-l1*t))*(1 - exp(-l2*t))
tolerance: 0.5%

### In parallel, what is that chance?

::: misses
- [any] It fails only if both fail.
:::
:::

::: part
answer: l2/(l1 + l2)
tolerance: 0.5%

### What is the chance the second part fails first?

::: misses
- [any] $\frac{\lambda_2}{\lambda_1 + \lambda_2}$.
:::
:::
:::

::: check
kind: parts
given: mx = 2 | 3; my = 3 | 4; sx = 1 | 2; sy = 2 | 3; r = 0.25 | -0.5; let exy = mx*my + r*sx*sy

## $E[XY]$ = {exy}, $E[X]$ = {mx}, $E[Y]$ = {my}, $\sigma_X$ = {sx} and $\sigma_Y$ = {sy}.

::: part
answer: exy - mx*my
tolerance: 0.5%

### What is the covariance?

::: misses
- [any] $E[XY] - \mu_X\mu_Y$.
:::
:::

::: part
answer: sqrt(sx^2 + sy^2 + 2*(exy - mx*my))
tolerance: 0.5%

### What is the standard deviation of $X + Y$?

::: misses
- [any] $\sqrt{\sigma_X^2 + \sigma_Y^2 + 2\,\text{Cov}}$.
:::
:::
:::

::: check
kind: parts
given: p00 = 0.46 | 0.48; p01 = 0.02 | 0.04; p10 = 0.01 | 0.03; let p11 = 1 - p00 - p01 - p10

## A channel has joint PMF $p(0,0)$ = {p00}, $p(0,1)$ = {p01}, $p(1,0)$ = {p10} and $p(1,1)$ the rest.

::: part
answer: p10 + p11
tolerance: 0.5%

### What is $P(X = 1)$, the share of 1s sent?

::: misses
- [any] The marginal: sum the row $X = 1$.
:::
:::

::: part
answer: p10/(p10 + p11)
tolerance: 0.5%

### What is the error rate on sent 1s, $P(Y = 0 \mid X = 1)$?

::: misses
- [any] Slice at $X = 1$ and rescale.
:::
:::
:::

::: check
kind: parts
given: s = 1..12 int

## Zero-mean Gaussian noise with RMS {s} mV is half-wave rectified: negative values become 0.

::: part
answer: s/sqrt(2*pi)
unit: mV
tolerance: 0.5%

### What is the average output?

::: misses
- [s*sqrt(2/pi)] That's full-wave; half the samples give zero.
- [any] Half of the full-wave average.
:::
:::

::: part
answer: s/sqrt(2)
unit: mV
tolerance: 0.5%

### What is the RMS of the output?

::: misses
- [any] Half the samples keep their square; $\sqrt{\sigma^2/2}$.
:::
:::
:::

::: check
kind: parts
given: a = 1 | 2; b = 2 | 3

## $X$ is uniform on $[0, \given{a}]$ and $Y$, independent, is uniform on $[0, \given{b}]$.

::: part
answer: (a + b)/2
tolerance: 0.5%

### What is the mean of $X + Y$?

::: misses
- [any] Means add.
:::
:::

::: part
answer: sqrt((a^2 + b^2)/12)
tolerance: 0.5%

### What is its standard deviation?

::: misses
- [any] Variances $\frac{a^2}{12}$ and $\frac{b^2}{12}$ add.
:::
:::

::: part
answer: 1/b
tolerance: 0.5%

### For $a < b$, the density of the sum is flat in the middle. How high is it there?

::: misses
- [any] The trapezoid's top: $\frac{1}{b}$.
:::
:::
:::

::: check
kind: parts
given: lam = 1 | 2; n = 2 | 3

## $U$ is uniform on $[0, 1)$ and $T = -\ln(1 - U)/\given{lam}$. {n} independent copies are added.

::: part
answer: n/lam
tolerance: 0.5%

### What is the mean of the sum?

::: misses
- [any] Each $T$ is exponential with mean $1/\lambda$.
:::
:::

::: part
answer: sqrt(n)/lam
tolerance: 0.5%

### What is its standard deviation?

::: misses
- [any] Each has variance $1/\lambda^2$.
:::
:::
:::

::: check
kind: parts
given: N = 1000 | 4000; p = 0.5 | 0.1

## A test of {N} independent trials counts successes, each with probability {p}.

::: part
answer: sqrt(N*p*(1 - p))
tolerance: 0.5%

### What is the standard deviation of the count?

::: misses
- [any] Binomial.
:::
:::

::: part
answer: 2*Q(2)
tolerance: 1%

### Using the Gaussian approximation, about what chance is there of landing more than 2σ from $Np$?

::: misses
- [any] $2Q(2)$.
:::
:::
:::

::: check
kind: parts
given: n = 4 | 9; s = 10 | 20

## {n} resistors in series each vary independently with σ = {s} Ω.

::: part
answer: s*sqrt(n)
unit: Ω
tolerance: 0.5%

### What is the spread of the total?

::: misses
- [s*n] That's worst-case stacking.
- [any] $\sigma\sqrt n$.
:::
:::
:::

::: check
kind: parts
given: s = 0.1 | 0.3; r = 0.4 | 0.8

## Two sensors each have noise {s} with correlation {r}.

::: part
answer: s*sqrt(2*(1 - r))
tolerance: 0.5%

### What is the noise of their difference?

::: misses
- [s*sqrt(2)] Correlated noise partly cancels in a difference.
- [any] $\sigma\sqrt{2(1 - \rho)}$.
:::
:::
:::

::: check
kind: parts
given: sx = 1 | 2; sn = 0.5 | 1.5

## $Y = X + N$ with $X$ of spread {sx} and independent noise of spread {sn}.

::: part
answer: sx^2/(sx^2 + sn^2)
tolerance: 0.5%

### What gain makes $gY$ the best estimate of $X$?

::: misses
- [1] Shrink toward the mean when there's noise.
- [any] $\frac{\sigma_x^2}{\sigma_x^2 + \sigma_n^2}$.
:::
:::
:::

::: check
kind: parts
given: s1 = 1 | 2; s2 = 2 | 3; r = 0.3 | 0.8

## Two microphones pick up noise with standard deviations {s1} mPa and {s2} mPa, correlated with $\rho$ = {r} because they hear the same room.

::: part
answer: sqrt(s1^2 + s2^2 + 2*r*s1*s2)
unit: mPa
tolerance: 0.5%

### What is the standard deviation of their sum, in mPa?

::: misses
- [sqrt(s1^2 + s2^2)] That treats them as independent. Add the cross term $2\rho\sigma_1\sigma_2$.
- [s1 + s2] Standard deviations don't add unless $\rho = 1$.
- [any] Not yet. Use $\text{Var}(X + Y) = \sigma_1^2 + \sigma_2^2 + 2\rho\sigma_1\sigma_2$.
:::
:::

::: part
answer: sqrt(s1^2 + s2^2 - 2*r*s1*s2)
tolerance: 0.5%

### And of their difference?

::: misses
- [sqrt(s1^2 + s2^2)] The correlated part cancels in a difference: subtract $2\rho\sigma_1\sigma_2$.
- [any] Not yet. Use $\sigma_1^2 + \sigma_2^2 - 2\rho\sigma_1\sigma_2$.
:::
:::

::: right
Right. Shared noise grows in a sum and shrinks in a difference, the reason noise-canceling microphones subtract.
:::
:::

::: check
kind: parts
given: m = 1 | 3; n = 2 | 4; t = 8 | 15

## A request passes {n} independent stages, each taking an exponential time with mean {m} ms.

::: part
answer: n*m
unit: ms
tolerance: 0.5%

### What is the total's mean?

::: misses
- [m] That's one stage. Means add.
- [any] Not yet. Add the stages' means.
:::
:::

::: part
answer: sqrt(n)*m
unit: ms
tolerance: 0.5%

### What is its standard deviation?

::: misses
- [n*m] Variances add, so the standard deviation grows as $\sqrt n$.
- [any] Not yet. Each stage's variance is $m^2$; add {n} of them and take the square root.
:::
:::

::: part
answer: exp(-t/m)*(1 + t/m + (t/m)^2/2*step(n - 2.5) + (t/m)^3/6*step(n - 3.5))
tolerance: 0.5%

### What's the chance the total exceeds {t} ms?

::: misses
- [exp(-t/(n*m))] The total isn't exponential; it's Erlang, with tail $e^{-\lambda t}\sum_{k<n}(\lambda t)^k/k!$.
- [any] Not yet. Use the Erlang tail with $\lambda = 1/m$.
:::
:::

::: right
Right. Multiplying the stages' generating functions gives the Erlang distribution, whose relative spread, $1/\sqrt n$, narrows as stages add.
:::
:::
:::
