ENع
←Random signals and noise
Lesson 49 · Multirate and random signals

Random signals and noise

16 min11 steps5 questionsAdvanced
About this lesson

Some signals have no formula: the thermal noise of a resistor is one. Follow a 1 MΩ resistor at 300 K, built three times over, and sample each copy 20 thousand times a second. You will meet the ensemble and the random process, the random variable at one instant, the histogram and the Gaussian bell curve, the mean and the variance (the noise power, σ² = 4kTRB), stationarity, ergodicity and white noise, and the signal-to-noise ratio. It uses the Maths lessons on probability, random variables and distributions; the white noise met here is what the autocorrelation and power spectral density lessons measure, and what the matched filter later fights.

You'll learn to

Tick what you feel confident about. These self-checks do not affect your lesson score.

Fig 49 · Interactive
01 / 11

A signal you cannot predict

A resistor is never quiet. Heat jiggles its electrons, so a tiny random voltage appears across it: thermal noise. No formula tells you the next value. One recording of it is called a realization.

resistor R = 1 MΩ at T = 300 K (27 °C)
heat -> electrons jiggle -> random voltage

sampled fs = 20 kHz (every 50 µs)
100 samples = 5 ms

deterministic: x[n] = 100·sin(...) predicts every value
random: no formula gives the next value
motion in the figure: slowed down a lot
Loading figure…
or ← →
Read the lesson step by step
  1. A signal you cannot predict

    A resistor is never quiet. Heat jiggles its electrons, so a tiny random voltage appears across it: thermal noise. No formula tells you the next value. One recording of it is called a realization.

    resistor R = 1 MΩ at T = 300 K (27 °C)
    heat -> electrons jiggle -> random voltage
    
    sampled fs = 20 kHz (every 50 µs)
    100 samples = 5 ms
    
    deterministic: x[n] = 100·sin(...) predicts every value
    random: no formula gives the next value
    motion in the figure: slowed down a lot
  2. Many copies: the ensemble

    Build three identical copies: same resistor, same temperature. Each records a different wiggle. The set of all records the experiment could give is a random process, or ensemble. Each record is one sample function.

    random process = the whole ensemble
      x₁[n], x₂[n], x₃[n], ... (endless copies)
    sample function = one record
    
    same physics, different outcomes
    we can only describe them by
    probabilities and averages
  3. One instant: a random variable

    Freeze one instant, n = 40 (t = 2 ms). The three copies give 0.36, 10.09 and −7.40 µV. The value at a fixed time is a random variable: unpredictable, but described by a probability distribution.

    n = 40, t = 40 × 50 µs = 2 ms
    
    copy 1: x₁[40] = 0.36 µV
    copy 2: x₂[40] = 10.09 µV
    copy 3: x₃[40] = −7.40 µV
    
    x[40] across the ensemble = a random variable
    (see Maths: random variables and expectation)
  4. Count them: a histogram

    Collect all 300 samples and count how many land in each 5 µV bin. The bars estimate the probability distribution: values near 0 are common, values beyond ±30 µV are rare.

    3 copies × 100 samples = 300 values
    bins: 16 × 5 µV from -40 to +40 µV
    
    counts:
    2 2 6 9 12 37 33 38
    50 41 34 21 8 4 3 0
    
    more samples -> a smoother estimate
  5. The bell curve: Gaussian noise

    Each voltage is the sum of countless tiny electron kicks, so it is Gaussian (central limit theorem). The bell curve with σ = 12.87 µV fits the bars. 206 of 300 samples (68.7%) lie within ±σ; theory says 68.3%.

    Gaussian pdf
    p(x) = 1/(σ√(2π)) · exp(−x² / 2σ²)
    
    expected count per bin ≈ 300 × 5 µV × p(x)
      at x = 0: 46.5
    
    within ±σ:  206 / 300 = 68.7%
    theory:     erf(1/√2) = 68.3%
  6. Mean: the expected value

    The mean, or expected value, is μ = E[x]. Thermal noise pushes up as often as down, so μ = 0. The average of our 300 samples is 0.18 µV: close to 0, but an estimate, not the true value.

    μ = E[x]  (average over the ensemble)
    true mean:     0 µV
    sample mean:   (1/300) Σ x = 0.18 µV
    
    an estimate wobbles around the truth;
    more samples -> a smaller wobble
  7. Variance: the noise power

    The variance σ² = E[(x − μ)²] measures the spread. With μ = 0 it is the average power: σ² = 4kTRB = 165.7 µV² (1 MΩ, 300 K, B = 10 kHz). So σ = 12.87 µV rms; our data give 12.93 µV.

    σ² = 4·k·T·R·B
       = 4 × 1.380649e-23 × 300 × 1e6 × 1e4 V²
       = 1.657e-10 V² = 165.7 µV²
    σ  = √σ² = 12.87 µV  (rms)
    
    sample std of 300 values: 12.93 µV
    (k = Boltzmann constant, B = bandwidth)
  8. Stationary and ergodic

    The temperature stays the same, so the statistics do too: the mean and variance at n = 10 equal those at n = 80. That is a stationary process. It is also ergodic: one long record's time average matches the ensemble average.

    stationary: statistics do not change with time
    ergodic: time averages = ensemble averages
    
    copy 1 alone, over 100 samples:
      time mean 0.05 µV   (ensemble: 0)
      rms       12.96 µV  (ensemble: 12.87)
    
    so one long recording is enough
  9. White: no memory between samples

    Knowing x[40] tells you nothing about x[41]: the samples are independent. Over our 297 neighbour pairs the correlation is −0.07, near 0. Noise like this is called white; the next lessons, on autocorrelation and spectra, make that exact.

    pairs (x[n], x[n+1]) inside each copy: 297
    correlation coefficient: −0.07
    (independent -> 0, plus estimation wobble)
    
    why: noise band-limited to B, sampled at
    fs = 2B, gives uncorrelated samples;
    Gaussian + uncorrelated = independent
  10. Noise on a signal: SNR

    Add copy 1's noise to a 1 kHz sine of amplitude 100 µV. Signal power is A²/2 = 5000 µV², noise power 165.7 µV². Their ratio, the signal-to-noise ratio (SNR), is 30.2, or 14.8 dB.

    x[n] = 100·sin(2π·1000·n / 20000) + w₁[n]  µV
    
    P_signal = A²/2 = 5000 µV²
    P_noise  = σ²  = 165.7 µV²
      (copy 1 measured: 167.9 µV²)
    SNR = 5000 / 165.7 = 30.2
        = 10·log10(30.2) = 14.8 dB
  11. Random signals in Python

    numpy draws Gaussian samples: rng.normal(0, 12.87, (3, 100)) makes three records of 100. A fixed seed (9) repeats the same numbers: these are the samples drawn in the figure. w.mean() and w.std() give 0.18 and 12.93.

    import numpy as np
    rng = np.random.default_rng(9)
    w = rng.normal(0, 12.87, (3, 100))
    m, s = w.mean(), w.std()
    
    >>> print(f"{m:.2f} {s:.2f}")
    0.18 12.93
    >>> w[:, 40].round(2)
    array([ 0.36, 10.09, -7.4 ])
    >>> np.histogram(w, bins=16, range=(-40, 40))[0]
    array([ 2,  2,  6,  9, 12, 37, 33, 38, 50, 41, 34, 21,  8,  4,  3,  0])
    
    (Python 3 with numpy 2.4)

Quiz Unlocks after the last step.