---
title: Random processes
heading: Noise as a random function of time
eyebrow: A11 · Lesson 44 · Random processes
xp: 40
---

::: hook
So far noise has been a random number: one reading, one sample. But noise on a wire is a waveform, and what a circuit does to it depends on how the waveform moves in time. Two noise signals can have the same RMS and look completely different: one jumps wildly from sample to sample, the other drifts slowly. The difference is how strongly the noise now is related to the noise a moment later, its autocorrelation. That one function connects noise to filters, sets how fast you can usefully sample, and leads straight to the power spectral density of lesson 45.
:::

::: play
- The solid curve is the autocorrelation of white noise after an RC low-pass: how alike the noise is at two moments $\tau$ apart. It starts at the noise power and dies away over about one time constant.
- The dashed curve is a sine with a random phase: its autocorrelation never dies away; it's a cosine.
- Change $RC$. A slower filter makes the noise stay alike for longer: smoother, slower-moving noise.
:::
:::

```sim plot
view: graph
x: tau = -5..5 ms
y: R = -1.2..1.2 V²
slider: RC = 0.1..2 step 0.05 = 0.5 ms
slider: f = 0.1..2 step 0.05 = 0.5 kHz
plot: exp(-abs(tau)/RC) | label: RC-filtered noise
plot: cos(2*pi*f*tau) | label: random-phase sine | dashed | color: ch2
readout: correlation one ms apart = exp(-1/RC) | digits: 3
readout: spacing for correlation under 0.05, ms = RC*ln(20) | digits: 3
```

::: predict
## White noise from a resistor is filtered by an RC low-pass with a 1 pF capacitor. What happens to the output noise if R is made ten times bigger?

- [ ] It grows by $\sqrt{10}$, like a resistor's own noise
- [x] It stays the same
- [ ] It shrinks by $\sqrt{10}$
- [ ] It grows ten times

::: reveal
It stays the same. A bigger $R$ makes more noise per hertz, but it also lowers the corner frequency by the same factor, so the filter passes less bandwidth. The two cancel, leaving $\overline{v^2} = \frac{kT}{C}$, which depends only on the capacitor. For 1 pF at 290 K that's 63 µV RMS: the "kT/C noise" that limits every sampling circuit.
:::
:::

::: nameit
## Random processes

A **random process** $X(t)$ is a random function of time. Picture an **ensemble**: many copies of the same circuit, each producing its own noise waveform. At any one instant $t$, $X(t)$ is a random variable across the ensemble, with a mean $\mu_X(t)$ and a variance.

## Autocorrelation

The **autocorrelation** measures how alike the process is at two times:

$$R_X(t_1, t_2) = E[X(t_1)\,X(t_2)]$$

For zero-mean noise it's the covariance of the two samples (lesson 22).

## Stationarity

A process is **wide-sense stationary** (WSS) if its mean doesn't change with time and its autocorrelation depends only on the gap $\tau = t_2 - t_1$:

$$R_X(\tau) = E[X(t)\,X(t + \tau)]$$

Then:

- $R_X(0) = E[X^2]$, the average power (mean square);
- $R_X(-\tau) = R_X(\tau)$, and $|R_X(\tau)| \le R_X(0)$;
- the **correlation coefficient** between samples $\tau$ apart is $\frac{R_X(\tau)}{R_X(0)}$ for zero-mean noise.

Most noise in steady-state circuits is WSS. If time averages along one waveform equal the ensemble averages, the process is **ergodic**, which is what lets a scope's single trace stand for the statistics.

## Three examples

| Process | $R_X(\tau)$ | Power |
|---|---|---|
| white noise, two-sided density $\frac{N_0}{2}$ | $\frac{N_0}{2}\delta(\tau)$ | unlimited in theory |
| white noise through an RC low-pass | $\frac{N_0}{4RC}e^{-|\tau|/RC}$ | $\frac{N_0}{4RC}$ |
| $A\cos(2\pi f_0t + \Theta)$, $\Theta$ uniform | $\frac{A^2}{2}\cos(2\pi f_0\tau)$ | $\frac{A^2}{2}$ |

White noise is uncorrelated at any nonzero gap. Filtering gives it memory: samples closer than about $RC$ are strongly alike, and samples $3RC$ apart are nearly independent ($e^{-3} = 0.05$).

## kT/C noise

A resistor's thermal noise has one-sided density $N_0 = 4kTR$. Through its own RC filter, the output power is $\frac{4kTR}{4RC} = \frac{kT}{C}$. Every switched-capacitor sampler, imager pixel and sample-and-hold carries this much noise however small $R$ is made; only a bigger capacitor reduces it.
:::

::: example
## A sine of amplitude 2 V has a random phase, uniform over a full cycle. Find its mean, autocorrelation and power.

::: solution
1. **Mean.** At any $t$, averaging over the phase gives
   $$E[2\cos(\omega t + \Theta)] = 0$$
2. **Autocorrelation.** Use $\cos a\cos b = \frac12[\cos(a - b) + \cos(a + b)]$; the sum term averages to zero:
   $$\begin{aligned} R(\tau) &= E[4\cos(\omega t + \Theta) \\ &\qquad \times \cos(\omega(t + \tau) + \Theta)] \\ &= 2\cos\omega\tau \end{aligned}$$
3. **Power.**
   $$R(0) = 2\ \text{V}^2$$
   which is $\frac{A^2}{2}$, as for any sine.

**Answer:** the mean is 0, the autocorrelation is $2\cos\omega\tau$, and the power is 2 V².
:::
:::

::: example
## What is the kT/C noise on a 1 pF and a 10 pF sampling capacitor at 290 K?

::: solution
1. **1 pF.**
   $$\begin{aligned} v_n &= \sqrt{kT/C} \\ &= \sqrt{\frac{1.38 \times 10^{-23} \times 290}{10^{-12}}} \\ &= 63\ \mu\text{V} \end{aligned}$$
2. **10 pF.** It's $\sqrt{10}$ times less: 20 µV.
3. **Compare with an ADC step.** A 12-bit ADC with a 1 V range has steps of 244 µV, so a 1 pF sampler would already use a quarter of a step on noise.

**Answer:** 63 µV RMS on 1 pF and 20 µV on 10 pF.
:::
:::

::: example
## A random telegraph signal switches between ±1 at random, at an average rate of 100 switches per second. How quickly does it forget its past?

::: solution
1. **Autocorrelation.**
   $$R(\tau) = e^{-2\lambda|\tau|}$$
   with $\lambda = 100$/s.
2. **Correlation time.** It falls to $\frac1e$ at
   $$\begin{aligned} \tau &= \frac{1}{2\lambda} \\ &= 5\ \text{ms} \end{aligned}$$
3. **What it means.** Samples much more than 5 ms apart are nearly uncorrelated; samples 1 ms apart are still correlated by $e^{-0.2} = 0.82$.

**Answer:** it forgets its past over about 5 ms.
:::
:::

::: check
given: a = 4 | 9 | 0.25; b = 1 | 3
answer: sqrt(a)
unit: mV
tolerance: 0.5%

## A zero-mean noise has $R(\tau) = \given{a}e^{-|\tau|/\given{b}}$ mV². What is its RMS value?

::: right
Right. $R(0)$ = {a} mV² is the mean square, so the RMS is {answer}.
:::

::: misses
- [a] That's the mean square; take its square root.
- [any] Not yet. $R(0) = E[X^2]$.
:::
:::

::: check
given: RC = 0.5 | 2; t = 1 | 3
answer: exp(-t/RC)
tolerance: 0.5%

## White noise passes through an RC low-pass with $RC$ = {RC} ms. What is the correlation coefficient between output samples {t} ms apart?

::: right
Right. $e^{-\tau/RC}$ = {answer}.
:::

::: misses
- [exp(-RC/t)] Upside down: the gap is divided by the time constant.
- [0] Filtered noise remembers its past; only white noise is uncorrelated.
- [any] Not yet. $R(\tau)/R(0) = e^{-|\tau|/RC}$.
:::
:::

::: check
given: A = 2 | 3; f = 1 | 2; t = 0.1 | 0.2
answer: A^2/2*cos(2*pi*f*t)
unit: V²
tolerance: 0.5%

## A sine of amplitude {A} V and frequency {f} kHz has a uniformly random phase. What is its autocorrelation at $\tau$ = {t} ms, in V²?

::: right
Right. $\frac{A^2}{2}\cos(2\pi f\tau)$ = {answer}.
:::

::: misses
- [A^2*cos(2*pi*f*t)] The average of $\cos^2$ is $\frac12$.
- [any] Not yet. $\frac{A^2}{2}\cos(2\pi f_0\tau)$.
:::
:::

::: check
given: C = 1 | 5 | 20
answer: sqrt(1.38e-23*290/(C*1e-12))*1e6
unit: µV
tolerance: 1%

## What is the RMS kT/C noise on a {C} pF capacitor at 290 K?

::: right
Right. $\sqrt{kT/C}$ = {answer}.
:::

::: misses
- [1.38e-23*290/(C*1e-12)*1e6] That's the mean square; take the root.
- [any] Not yet. $\overline{v^2} = kT/C$.
:::
:::

::: check
given: RC = 0.5 | 1 | 2 | 5 | 10 | 20
answer: RC*ln(20)
unit: µs
tolerance: 0.5%

## Filtered noise has $RC$ = {RC} µs. How far apart must samples be for their correlation to fall to 0.05?

::: right
Right. $e^{-\tau/RC} = 0.05$ gives $\tau = RC\ln 20$ = {answer}, about $3RC$.
:::

::: misses
- [RC] After one time constant the correlation is still 0.37.
- [any] Not yet. Solve $e^{-\tau/RC} = 0.05$.
:::
:::

::: check
kind: choice

## A noise process is wide-sense stationary. Which must be true?

- [ ] Every sample is independent of every other
- [x] Its mean is constant and $E[X(t)X(t + \tau)]$ depends only on $\tau$
- [ ] It's white
- [ ] It's Gaussian

::: right
Right. Its statistics don't depend on when you look, at least for the mean and autocorrelation.
:::

::: misses
- [1] Stationary noise can be strongly correlated, like filtered noise.
- [3] White is one stationary process among many.
- [4] Stationarity says nothing about the distribution's shape.
:::
:::

::: check
kind: parts
given: l = 50 | 200; t = 1 | 5

## A random telegraph signal switches at {l} per second on average.

::: part
answer: exp(-2*l*t/1000)
tolerance: 0.5%

### What is its autocorrelation at {t} ms?

::: misses
- [exp(-l*t/1000)] It's $e^{-2\lambda|\tau|}$.
- [any] $R(\tau) = e^{-2\lambda|\tau|}$.
:::
:::
:::

::: check
kind: derivation
vars: C = 0.1..100

## A capacitor of $C$ pF samples at 290 K.

::: step
answer: sqrt(1.381e-23*290/(C*1e-12))*1e6

### What is its kT/C noise in µV RMS?
:::

::: right
Right. $\sqrt{kT/C}$: 64 µV for 1 pF, independent of the resistance that charged it.
:::
:::

::: explain
## Why does filtering white noise make nearby samples correlated?

::: model
A low-pass filter's output at any moment is a weighted average of its input over roughly the last time constant (its impulse response, A10.24). Two output samples close together average over nearly the same stretch of input noise, so they share most of their ingredients and come out similar. Samples many time constants apart average over different stretches, which are independent because the input is white, so they're uncorrelated. The autocorrelation $e^{-|\tau|/RC}$ is the overlap of those averaging windows.
:::
:::

::: practice

::: check
given: N = 4e-16 | 1e-15; RC = 1 | 10
answer: sqrt(N/(4*RC*1e-6))*1e6
unit: µV
tolerance: 1%

## White noise with one-sided density {N} V²/Hz passes an RC low-pass with $RC$ = {RC} µs. What is the output RMS?

::: misses
- [any] Power $\frac{N_0}{4RC}$, then the square root.
:::
:::

::: check
given: A = 1..12 int
answer: A^2/2
unit: V²
tolerance: 0.5%

## What is $R(0)$ for a random-phase sine of amplitude {A} V, in V²?

::: misses
- [A^2] The mean square of a sine is half its peak squared.
- [any] $\frac{A^2}{2}$.
:::
:::

::: check
given: k = 4 | 9 | 16 | 25 | 36 | 100
answer: k
tolerance: 0.5%

## By what factor must a sampling capacitor grow to cut its kT/C noise voltage by a factor of $\sqrt{\given{k}}$?

::: misses
- [sqrt(k)] Noise voltage goes as $1/\sqrt C$, so the capacitor must grow by the square of the voltage factor.
- [any] Noise voltage goes as $1/\sqrt C$.
:::
:::
:::
