---
title: Problem set 2
heading: "Problem set 2: expectation and discrete distributions"
eyebrow: A11 · Problem set 2
type: problems
---

::: hook
These problems use lessons 9 and 10: means, variances and standard deviations, and the binomial and geometric distributions. Variances of independent quantities add; standard deviations don't.
:::

::: pool
pick: 12

::: check
kind: parts
given: p = 0.6 | 0.8; A = 1 | 2

## A bit is $+\given{A}$ V with probability {p} and $-\given{A}$ V otherwise.

::: part
answer: A*(2*p - 1)
unit: V
tolerance: 0.5%

### What is its mean?

::: misses
- [any] $Ap - A(1 - p)$.
:::
:::

::: part
answer: A*sqrt(1 - (2*p - 1)^2)
unit: V
tolerance: 0.5%

### What is its standard deviation?

::: misses
- [A^2*(1 - (2*p - 1)^2)] That's the variance.
- [any] $\sqrt{E[X^2] - E[X]^2}$.
:::
:::
:::

::: check
kind: parts
given: n = 3 | 5; s = 5 | 10

## {n} resistors in series each have an independent spread of {s} Ω.

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

### What is the spread of the total?

::: misses
- [s*n] Independent spreads add in squares.
- [any] $\sigma\sqrt n$.
:::
:::
:::

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

## A die's value $X$ is transformed to $Y = \given{k}X + \given{b}$.

::: part
answer: k*3.5 + b
tolerance: 0.5%

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

::: misses
- [any] $kE[X] + b$ with $E[X] = 3.5$.
:::
:::

::: part
answer: k*sqrt(35/12)
tolerance: 0.5%

### What is its standard deviation?

::: misses
- [k*sqrt(35/12) + b] Shifting doesn't change the spread.
- [any] $k\sigma_X$ with $\sigma_X^2 = \frac{35}{12}$.
:::
:::
:::

::: check
kind: parts
given: p = 0.7 | 0.9; k = 2 | 4

## Each attempt succeeds with probability {p}, independently.

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

### How many attempts does success take on average?

::: misses
- [any] Geometric: $1/p$.
:::
:::

::: part
answer: (1 - p)^k
tolerance: 0.5%

### What is the chance of needing more than {k}?

::: misses
- [any] The first {k} must all fail.
:::
:::
:::

::: check
kind: parts
given: n = 2000 | 5000; p = 0.001 | 0.002

## A packet of {n} bits has bit error rate {p}.

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

### What is the mean number of errors?

::: misses
- [any] $np$.
:::
:::

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

### What is its standard deviation?

::: misses
- [n*p*(1 - p)] That's the variance.
- [any] $\sqrt{np(1 - p)}$.
:::
:::
:::

::: check
kind: parts
given: n = 8 | 12; p = 0.01 | 0.05

## Each of {n} bits flips with probability {p}.

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

### What is the chance of no flips?

::: misses
- [any] $(1 - p)^n$.
:::
:::

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

### What is the chance of exactly one?

::: misses
- [p*(1 - p)^(n - 1)] Any of the {n} bits could be the one: multiply by {n}.
- [any] $np(1 - p)^{n-1}$.
:::
:::
:::

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

## $X$ takes the values 0 and {a} with equal probability; $Y$ takes 0 and {b} with equal probability, independently.

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

### What is $E[X + Y]$?

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

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

### What is $\text{Var}(X + Y)$?

::: misses
- [(a + b)^2/4] Variances add for independent quantities: $\frac{a^2}{4} + \frac{b^2}{4}$.
- [any] Each has variance $\frac{v^2}{4}$.
:::
:::
:::

::: check
kind: parts
given: m = 10 | 20; s = 3 | 10

## A quantity has mean {m} and standard deviation {s}.

::: part
answer: m^2 + s^2
tolerance: 0.5%

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

::: misses
- [m^2] Add the variance.
- [any] $E[X^2] = \mu^2 + \sigma^2$.
:::
:::
:::

::: check
kind: parts
given: k = 2..8 int

## A test passes boards with probability 0.95, independently. Boards are tested until {k} fail.

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

### How many boards are tested on average?

::: misses
- [any] Each failure takes $\frac{1}{0.05} = 20$ boards on average.
:::
:::
:::

::: check
kind: parts
given: n = 10 | 20; p = 0.1 | 0.3

## A binomial count has $n$ = {n} and $p$ = {p}.

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

### What is its mean?

::: misses
- [any] $np$.
:::
:::

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

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

::: misses
- [any] Every trial must fail.
:::
:::
:::

::: check
kind: parts
given: v = 5 | 12; p = 0.1 | 0.25

## A fault drops a {v} V rail to 0 with probability {p} on each measurement.

::: part
answer: v*(1 - p)
unit: V
tolerance: 0.5%

### What is the average reading?

::: misses
- [any] $v(1 - p) + 0 \cdot p$.
:::
:::

::: part
answer: v*sqrt(p*(1 - p))
unit: V
tolerance: 0.5%

### What is its standard deviation?

::: misses
- [any] A scaled Bernoulli: $v\sqrt{p(1 - p)}$.
:::
:::
:::

::: check
kind: parts
given: N = 6 | 8 | 20

## A fair $N$-sided die with faces 1 to {N}.

::: part
answer: (N + 1)/2
tolerance: 0.5%

### What is its mean?

::: misses
- [any] The average of 1 to $N$.
:::
:::

::: part
answer: (N^2 - 1)/12
tolerance: 0.5%

### What is its variance?

::: misses
- [any] $\frac{N^2 - 1}{12}$.
:::
:::
:::

::: check
kind: parts
given: a = 0.1 | 0.2 | 0.5 | 0.8 | 1 | 1.25

## A random voltage is uniform over the {a}-volt step of a converter, centered on zero.

::: part
answer: a/sqrt(12)
unit: V
tolerance: 0.5%

### What is its RMS?

::: misses
- [a/2] The RMS of a uniform spread is width$/\sqrt{12}$.
- [any] $\frac{a}{\sqrt{12}}$.
:::
:::
:::

::: check
kind: parts
given: n = 3 | 5; r = 0.9 | 0.95

## Packets are retried up to {n} times; each attempt succeeds with probability {r}.

::: part
answer: 1 - (1 - r)^n
tolerance: 0.5%

### What is the chance a packet gets through?

::: misses
- [r^n] It fails only if all attempts fail.
- [any] $1 - (1 - r)^n$.
:::
:::
:::

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

## A quantity has mean {m} and variance {c}. It's measured twice, independently, and the readings are averaged.

::: part
answer: c/2
tolerance: 0.5%

### What is the variance of the average?

::: misses
- [c] Averaging two halves the variance.
- [any] $\frac{\sigma^2}{2}$.
:::
:::
:::
:::
