---
title: Midterm exam
heading: "Midterm exam: probability and random variables"
eyebrow: A11 · Midterm exam
type: problems
---

::: hook
Twelve problems from the first half of the course: events and counting, conditional probability and Bayes' rule, reliability, the standard distributions, functions of random variables, and pairs and sums of variables. Give yourself two hours, work without the lessons open, and write out your reasoning before checking each answer. "Another set" deals a different exam.
:::

::: pool
pick: 12

::: check
kind: parts
given: n = 7 | 15; p = 0.01 | 0.03

## A Hamming code sends {n}-bit words and corrects any single error. Bits flip independently with probability {p}.

::: part
answer: (1 - p)^n + n*p*(1 - p)^(n - 1)
tolerance: 0.5%

### What is the chance a word is decoded correctly?

::: misses
- [any] No errors or exactly one.
:::
:::

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

### What is the chance of exactly two errors?

::: misses
- [any] $\binom{n}{2}p^2(1 - p)^{n - 2}$.
:::
:::
:::

::: check
kind: parts
given: N = 25 | 40; D = 2 | 3; k = 3 | 4

## A reel of {N} parts holds {D} bad ones. An inspector draws {k} without replacement.

::: part
answer: (N - D)!*(N - k)!/((N - D - k)!*N!)
tolerance: 0.1%

### What is the chance the sample is all good?

::: misses
- [any] $\binom{N - D}{k}/\binom{N}{k}$.
:::
:::

::: part
answer: D/N*(D - 1)/(N - 1)
tolerance: 0.5%

### What is the chance the first two drawn are both bad?

::: misses
- [any] Multiplication rule.
:::
:::
:::

::: check
kind: parts
given: q = 0.005 | 0.02; s = 0.97 | 0.99; f = 0.01 | 0.04

## A fraction {q} of units have a latent fault. A burn-in test catches {s} of faulty units and fails {f} of good ones.

::: part
answer: s*q + f*(1 - q)
tolerance: 0.5%

### What fraction of units fail burn-in?

::: misses
- [any] Total probability.
:::
:::

::: part
answer: s*q/(s*q + f*(1 - q))
tolerance: 0.5%

### Of the units that fail, what fraction really have the fault?

::: misses
- [any] Bayes' rule.
:::
:::

::: part
answer: (1 - s)*q/((1 - s)*q + (1 - f)*(1 - q))
tolerance: 0.5%

### Of the units that pass, what fraction still have the fault?

::: misses
- [any] Bayes' rule, conditioning on passing.
:::
:::
:::

::: check
kind: parts
given: r = 0.9 | 0.95; c = 0.99 | 0.999

## Two pumps, each {r} reliable, are in parallel, and both depend on a controller that is {c} reliable.

::: part
answer: c*(1 - (1 - r)^2)
tolerance: 0.1%

### How reliable is the system?

::: misses
- [any] Controller in series with the parallel pair.
:::
:::

::: part
answer: c*(1 - (1 - r)^3)
tolerance: 0.1%

### A third pump is added. How reliable is it now?

::: misses
- [any] Three in parallel, still behind the controller.
:::
:::
:::

::: check
kind: parts
given: p = 0.7 | 0.85; m = 3 | 4

## Each attempt to reach a server succeeds with probability {p}, independently.

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

### What is the mean number of attempts until success?

::: misses
- [any] Geometric.
:::
:::

::: part
answer: 1 - (1 - p)^m
tolerance: 0.1%

### A client gives up after {m} attempts. What is the chance it succeeds?

::: misses
- [any] One minus the chance all {m} fail.
:::
:::
:::

::: check
kind: parts
given: D = 0.1 | 0.4; A = 1.5 | 2.5

## A process has {D} defects per cm², and dies are {A} cm².

::: part
answer: exp(-D*A)
tolerance: 0.5%

### What is the yield?

::: misses
- [any] $e^{-DA}$.
:::
:::

::: part
answer: exp(-D*A/2)/exp(-D*A)
tolerance: 0.5%

### Halving the die area raises the yield by what factor?

::: misses
- [any] $e^{-DA/2}/e^{-DA}$.
:::
:::
:::

::: check
kind: parts
given: lam = 0.05 | 0.2; t = 3 | 5

## A board's failures are random at {lam} per year.

::: part
answer: exp(-lam*t)
tolerance: 0.5%

### What is the chance it runs {t} years?

::: misses
- [any] $e^{-\lambda t}$.
:::
:::

::: part
answer: ln(2)/lam
unit: years
tolerance: 0.5%

### What is its median life?

::: misses
- [any] $\ln 2/\lambda$.
:::
:::
:::

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

## A noise voltage is Gaussian with mean {m} V and standard deviation {s} V.

::: part
answer: m^2 + s^2
unit: V²
tolerance: 0.5%

### What is its mean square, in V²?

::: misses
- [any] $\mu^2 + \sigma^2$.
:::
:::

::: part
answer: Q(m/s)
tolerance: 1%

### What is the chance it's negative?

::: misses
- [any] $Q(\mu/\sigma)$.
:::
:::
:::

::: check
kind: parts
given: N = 25 | 100 | 400 | 900 | 2500 | 10000

## A detector expects {N} photons per sample.

::: part
answer: sqrt(N)
tolerance: 0.5%

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

::: misses
- [any] Poisson: $\sqrt N$.
:::
:::

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

### By the Gaussian approximation, about what chance is there of counting more than $N + 2\sqrt N$?

::: misses
- [any] Two standard deviations above the mean.
:::
:::
:::

::: check
kind: parts
given: l1 = 0.1 | 0.2; l2 = 0.2 | 0.4

## A disk and its controller fail at random at {l1} and {l2} per year, independently. Either failure stops the server.

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

### What is the server's mean time to failure?

::: misses
- [any] Rates add in series.
:::
:::

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

### What is the chance the disk is what fails first?

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

::: check
kind: parts
given: s = 3 | 6; r = 0.5 | 0.8

## Two sensor channels each have {s} mV RMS of noise, with correlation {r}.

::: part
answer: s*sqrt((2 + 2*r)/4)
unit: mV
tolerance: 0.5%

### What is the noise of their average?

::: misses
- [s/sqrt(2)] That's for uncorrelated noise.
- [any] $\frac{1}{2}\sqrt{2\sigma^2 + 2\rho\sigma^2}$.
:::
:::

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

### What is the noise of their difference?

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

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

## {n} parts in a stack each have a thickness error uniform within ±{t} µm, independently.

::: part
answer: sqrt(n)*2*t/sqrt(12)
unit: µm
tolerance: 0.5%

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

::: misses
- [any] Each has $\sigma = \frac{2t}{\sqrt{12}}$.
:::
:::

::: part
answer: n*t
unit: µm
tolerance: 0.5%

### What is the worst case?

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

::: check
kind: parts
given: y = 0.04 | 0.09 | 0.16 | 0.25 | 0.36 | 0.49 | 0.64 | 0.81

## $U$ is uniform on $[0, 1]$.

::: part
answer: sqrt(y)
tolerance: 0.5%

### What is $P(U^2 \le \given{y})$?

::: misses
- [any] $P(U \le \sqrt y)$.
:::
:::

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

### What is $E[U^2]$?

::: misses
- [1/4] That's $(E[U])^2$.
- [any] $\int_0^1 u^2\,du$.
:::
:::
:::

::: check
kind: parts
given: a = 0.3 | 0.6; e1 = 0.02 | 0.05; e0 = 0.01 | 0.03

## A link sends 1 with probability {a}. A 1 is misread with probability {e1}, a 0 with probability {e0}.

::: part
answer: a*e1 + (1 - a)*e0
tolerance: 0.5%

### What is the bit error rate?

::: misses
- [any] Total probability.
:::
:::

::: part
answer: a*(1 - e1)/(a*(1 - e1) + (1 - a)*e0)
tolerance: 0.5%

### A 1 is received. What is the chance a 1 was sent?

::: misses
- [any] Bayes' rule.
:::
:::
:::

::: check
kind: parts
given: n = 5 | 10; x = 0.8 | 0.9

## {n} values are uniform on $[0, 1]$.

::: part
answer: x^n
tolerance: 0.5%

### What is the chance the largest is below {x}?

::: misses
- [x] That's for one.
- [any] $x^n$.
:::
:::
:::

::: check
kind: parts
given: s1 = 0.5 | 1; s2 = 2 | 3

## Two independent sensors have noise {s1} and {s2}.

::: part
answer: 1/sqrt(1/s1^2 + 1/s2^2)
tolerance: 0.5%

### What is the noise of their best combination?

::: misses
- [any] $\left(\sigma_1^{-2} + \sigma_2^{-2}\right)^{-1/2}$.
:::
:::
:::
:::
