---
title: Problem set 6
heading: "Problem set 6: large numbers, simulation and noise"
eyebrow: A11 · Problem set 6
type: problems
---

::: hook
These problems use lessons 29 to 33: the law of large numbers, tail bounds from Markov's to Hoeffding's, Monte Carlo simulation, noise as a random signal with SNR, and averaging. They're the calculations behind planning a measurement: how much data, how much averaging, and how much noise to expect.
:::

::: pool
pick: 12

::: check
kind: parts
given: m = 3 | 5; s = 1 | 2; k = 2 | 3

## A sensor's reading is never negative, with mean {m} mV, standard deviation {s} mV, and an unknown distribution.

::: part
answer: 1/k^2
tolerance: 0.5%

### What is the most the chance of landing {k}σ or more from the mean can be?

::: misses
- [any] Chebyshev.
:::
:::

::: part
answer: m/(m + k*s)
tolerance: 0.5%

### By Markov, what is the most the chance of a reading above $m + k\sigma$ can be?

::: misses
- [any] $\frac{E[X]}{a}$ with $a = m + k\sigma$.
:::
:::
:::

::: check
kind: parts
given: s = 5 | 10; e = 1 | 2

## Readings have noise σ = {s} mV, and you need the mean to within ±{e} mV.

::: part
answer: (2*s/e)^2
tolerance: 0.5%

### About how many readings give that with 95% confidence (z = 2)?

::: misses
- [any] $(z\sigma/\varepsilon)^2$.
:::
:::

::: part
answer: s^2/(e^2*0.05)
tolerance: 0.5%

### How many does Chebyshev require to guarantee a miss rate of at most 5%?

::: misses
- [any] $\frac{\sigma^2}{\varepsilon^2\delta}$.
:::
:::
:::

::: check
kind: parts
given: b = 1e-6 | 1e-5; r = 0.1 | 0.2; R = 1e9 | 1e8

## A link's BER is near {b}. A tester runs at {R} bits per second.

::: part
answer: 1/(r^2*b)
tolerance: 0.5%

### How many bits are needed for a relative error of {r}?

::: misses
- [any] $\frac{1}{r^2b}$.
:::
:::

::: part
answer: 1/(r^2*b)/R
unit: s
tolerance: 0.5%

### How long does the test take?

::: misses
- [any] Bits over rate.
:::
:::
:::

::: check
kind: parts
given: n = 10000 | 40000; p = 0.02 | 0.1

## A Monte Carlo yield study runs {n} trials of a circuit whose failure probability is near {p}.

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

### What is the standard deviation of the estimated failure rate?

::: misses
- [any] $\sqrt{p(1 - p)/n}$.
:::
:::

::: part
answer: 4*n
tolerance: 0.5%

### How many trials would halve that?

::: misses
- [any] Four times as many.
:::
:::
:::

::: check
kind: parts
given: R = 1 | 10; B = 10 | 20

## A {R} kΩ resistor at 290 K is measured over a {B} kHz bandwidth.

::: part
answer: sqrt(4*1.38e-23*290*R*1000*B*1000)*1e6
unit: µV
tolerance: 1%

### What is its thermal noise, RMS?

::: misses
- [any] $\sqrt{4kTRB}$.
:::
:::

::: part
answer: 6.6*sqrt(4*1.38e-23*290*R*1000*B*1000)*1e6
unit: µV
tolerance: 1%

### About what peak-to-peak would a scope show?

::: misses
- [any] About 6.6 times the RMS.
:::
:::
:::

::: check
kind: parts
given: A = 1 | 2; s = 10 | 50

## A sine of amplitude {A} V sits in {s} mV RMS of noise.

::: part
answer: 20*log(A/sqrt(2)/(s/1000))
tolerance: 0.5%

### What is the SNR in dB?

::: misses
- [20*log(A/(s/1000))] Use the sine's RMS, $A/\sqrt2$.
- [any] $20\log_{10}\frac{V_s}{V_n}$, both RMS.
:::
:::

::: part
answer: 20*log(A/sqrt(2)/(s/1000)) + 10*log(16)
tolerance: 0.5%

### Averaging 16 synchronized records, what SNR results?

::: misses
- [any] Noise power falls by 16: add $10\log_{10}16$.
:::
:::
:::

::: check
kind: parts
given: v1 = 3 | 4; v2 = 4 | 6; v3 = 2 | 12

## An amplifier chain has three independent noise sources of {v1}, {v2} and {v3} µV RMS.

::: part
answer: sqrt(v1^2 + v2^2 + v3^2)
unit: µV
tolerance: 0.5%

### What is the total noise?

::: misses
- [any] Add powers.
:::
:::

::: part
answer: sqrt(v1^2 + v2^2)
unit: µV
tolerance: 0.5%

### What would it be if the third source were removed?

::: misses
- [any] Root-sum-square of the rest.
:::
:::
:::

::: check
kind: parts
given: s = 50 | 200; n = 64 | 256

## A repetitive signal is buried in {s} µV RMS of noise. You average {n} records.

::: part
answer: s/sqrt(n)
unit: µV
tolerance: 0.5%

### What noise remains?

::: misses
- [any] $\sigma/\sqrt n$.
:::
:::

::: part
answer: 10*log(n)
tolerance: 0.5%

### By how many dB does the SNR improve?

::: misses
- [20*log(n)] Noise RMS falls as $\sqrt n$: $10\log_{10}n$ dB.
- [any] $20\log_{10}\sqrt n$.
:::
:::
:::

::: check
kind: parts
given: g = 6 | 10 | 20

## You need {g} dB more SNR, and averaging is your only tool.

::: part
answer: 10^(g/10)
tolerance: 0.5%

### By what factor must the number of averages grow?

::: misses
- [10^(g/20)] Averaging improves SNR by $10\log_{10}n$, not $20\log_{10}n$.
- [any] $n = 10^{g/10}$.
:::
:::

::: part
answer: 10^(g/20)
tolerance: 0.5%

### By what factor does the noise RMS fall?

::: misses
- [any] $\sqrt n$.
:::
:::
:::

::: check
kind: parts
given: t = 1 | 2; n = 2 | 4

## A sum of {n} resistors, each 10 kΩ with an error uniform within ±{t}%, independent.

::: part
answer: sqrt(n)*10000*2*t/100/sqrt(12)
unit: Ω
tolerance: 0.5%

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

::: misses
- [any] $\sqrt n$ times one resistor's $\sigma$.
:::
:::

::: part
answer: n*10000*t/100
unit: Ω
tolerance: 0.5%

### What is the worst-case error?

::: misses
- [any] Add the limits.
:::
:::
:::

::: check
kind: parts
given: k = 400 | 900; n = 1e6 | 1e7

## A simulation of {n} bits counts {k} errors.

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

### What BER does it estimate?

::: misses
- [any] $k/n$.
:::
:::

::: part
answer: 1/sqrt(k)
tolerance: 0.5%

### What is the relative uncertainty of that estimate?

::: misses
- [any] $1/\sqrt k$.
:::
:::
:::

::: check
kind: parts
given: s = 0.5 | 2; d = 1 | 3

## A meter has noise {s} mV RMS and an unknown calibration offset of {d} mV.

::: part
answer: sqrt(s^2/100 + d^2)
unit: mV
tolerance: 0.5%

### Averaging 100 readings, what total RMS error remains?

::: misses
- [s/10] Averaging doesn't remove the offset.
- [any] The averaged noise and the offset combine in quadrature.
:::
:::

::: part
answer: d
unit: mV
tolerance: 0.5%

### What error remains however many readings you average?

::: misses
- [any] The systematic part.
:::
:::
:::

::: check
kind: parts
given: N = 16 | 64; s = 2 | 5

## Readings with {s} mV of noise are averaged in groups of {N}.

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

### What noise remains?

::: misses
- [s/N] Divide by $\sqrt N$.
- [any] $\sigma/\sqrt N$.
:::
:::
:::

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

## Independent noises of {a} and {b} µV RMS add.

::: part
answer: sqrt(a^2 + b^2)
unit: µV
tolerance: 0.5%

### What is the total?

::: misses
- [a + b] They add in power.
- [any] $\sqrt{a^2 + b^2}$.
:::
:::
:::

::: check
kind: parts
given: p = 0.00001 | 0.0001 | 0.0005 | 0.001 | 0.01 | 0.05

## A Monte Carlo estimate of a probability near {p} must have 10% relative error.

::: part
answer: (1 - p)/(p*0.01)
tolerance: 1%

### How many trials does it need?

::: misses
- [any] $N = \frac{1 - p}{p\varepsilon^2}$ with $\varepsilon = 0.1$.
:::
:::
:::

::: check
kind: parts
given: m = 4 | 10; s = 1 | 3; a = 20 | 40

## A buffer's occupancy has mean {m} packets and standard deviation {s}.

::: part
answer: m/a
tolerance: 0.5%

### What does Markov's inequality say about the chance it reaches {a}?

::: misses
- [a/m] That's upside down: Markov's bound is the mean over the threshold.
- [any] Not yet. $P(X \ge a) \le E[X]/a$.
:::
:::

::: part
answer: (s/(a - m))^2
tolerance: 0.5%

### What does Chebyshev's inequality say?

::: misses
- [s/(a - m)] Chebyshev's bound is $1/k^2$: square it.
- [any] Not yet. $k = (a - \mu)/\sigma$, and the bound is $1/k^2$.
:::
:::

::: right
Right. The variance makes the bound much tighter, and neither needed the shape of the distribution.
:::
:::
:::
