A random signal keeps its power somewhere along the frequency axis. Here AR(1) noise, whose samples remember a share of their neighbour, is drawn twice: its autocorrelation, and its power at each frequency. Watch both as grows from 0: the longer the memory, the narrower the spectrum.
Memory in time, narrowness in frequency
AR(1) noise of variance 1: R_x[ℓ] = a^{|ℓ|} and its DTFT, the PSD.
a = 0, white noise: R_x is a single stem at lag 0, and the PSD is flat at 0.0 dB.
Describe this picture
Two panels for AR(1) noise of variance 1. The first shows the autocorrelation as stems, from −1 to 1.1 against lag ℓ from −20 to 20. The second shows its DTFT, the PSD, as a solid curve in dB from −20 to 20 against Ω from 0 to π rad/sample. A dotted level at 0 dB, labelled “white”, marks the flat PSD of variance-1 white noise. The readouts are and the PSD at Ω = 0 and at Ω = π, in dB. At , white noise, is a single stem at lag 0 and the PSD is flat at 0.0 dB. As grows the autocorrelation spreads and the PSD gathers at low frequencies. At , halves at each step, and the PSD is 4.8 dB at 0 and −4.8 dB at π. At , a long memory and a narrow spectrum, it is 12.8 dB at 0 and −12.8 dB at π, and the caption ends: “The area under the PSD, the power, is still 1.” After the clip a slider “a” runs from −0.95 to 0.95 in steps of 0.05; at −0.5 the caption reads “a = −0.50: −4.8 dB at 0, 4.8 dB at π: memory that alternates in sign moves the power up.”
Power per frequency
In Random processes (24.2), “White noise forgets, coloured noise remembers” measured how alike two samples apart are. That was the autocorrelation, . White noise had none beyond lag 0, and AR(1) noise kept a share of its likeness per step. On this page I ask the same question in frequency: where along the frequency axis does a random signal keep its power?
Let’s start with a signal whose answer we know: a sine. In “A test sine goes in, a scaled and shifted sine comes out” of Frequency response of discrete-time systems (12.4), a sine of amplitude came out of a system times as big. Its average power, from How big is a signal (1.3), was going in. Coming out it is . So a system multiplies the power at each frequency by .
A noise has no single frequency. Its power is spread over the band, as the quantizer’s error was in “Sharing the same error among more slices” of Oversampling and noise shaping (11.3). There I said that this error’s power sits evenly from 0 to , and promised the proof for this page.
To describe a spread I need a density: the power per unit of frequency near . That is the power spectral density, or PSD, written . Adding it up over the whole band gives the whole power. For a process of mean 0, like every one on this page, that power is , the average power of 1.3:
Now filter the noise. Each narrow slice of frequency goes through like a test sine, so its power is multiplied by . The output’s PSD is
This needs a stable system and an input that has been running for a long time, 12.4’s steady state. The angle does not appear: delaying a noise does not move its power to other frequencies.
Wiener–Khinchin: the PSD is the DTFT of the autocorrelation
Where does come from? Take samples of the process and their DFT . In “Energy in time and in bins” of The DFT (13.2), the energy of the samples was . Divide by once more and you have the power, the average over the bins of . So is the power that sits at bin .
What is that number on average? Write it at any , with , the DTFT of the samples. Multiply out the square and take the expected value of “Mean and variance” in Random variables for signals (24.1). Each product becomes , and the pairs with the same lag give the same term:
As grows the weights tend to 1, and what is left is the DTFT of the autocorrelation, from The DTFT (12.2):
This is the Wiener–Khinchin theorem. Read backwards, the inverse DTFT gives from , and at it is the power formula above. An autocorrelation is even, , so the sum is : a real curve, and an even one.
White noise of variance has . Only the term survives, so
The PSD is flat: equal power at every frequency. That is the promise of 11.3 kept, for an error that behaves like white noise.
The AR(1) pair
Now the coloured noise of 24.2, AR(1) scaled to variance 1, with . Its autocorrelation is .
Split the sum at . The lags give the geometric series of “One arrow, two curves” in 12.2, the DTFT of , which settles because is less than 1. The negative lags give the same series in , starting one step later:
Put both over the common denominator . The numerator is , so
There is a second road to the same answer. AR(1) noise is white noise of variance sent through the recursion , so gives , the same curve. At the formula is , and at it is .
Memory in time, narrowness in frequency
The picture at the top of the page draws and its DTFT together for AR(1) noise, as grows from 0. Its decibels are , as for any power in “Signal and noise, in decibels” (1.3). Think of a crowd: a crowd that sways slowly hums low, and a jittery one hisses.
Notice the end caption’s last sentence. The power is the same, 1, at every : it only moves in frequency. The area is that of itself; in dB the curve is mirrored about 0 dB, because .
Where does the curve cross the white level? when , that is, when . For that is , and for it is . Below that frequency the power is raised, and above it the power is cut.
How narrow is narrow? At , the slowest tenth of the band, below , holds 79.6 % of the power; white noise keeps 10 % there.
The PSD falls to half its peak at rad/sample. The autocorrelation falls to of its first value after lags. Their product, , is 1.00: the longer the memory, the narrower the spectrum.
After the clip, use the slider to try a negative . At the PSD is −4.8 dB at 0 and 4.8 dB at π: memory that alternates in sign moves the power up. Neighbours now tend to have opposite signs, so the power gathers near . At either end of the slider the PSD reaches ±15.9 dB, still inside the panel.
Does a recording agree with the formula? I drew 400 realisations of 256 samples each, with , from the site’s seeded generator (seed 244). For each I took and then averaged the 400 results, bin by bin. At every bin from 1 to 127 the average is within 0.61 dB of .
At the average reads 0.900 of . The peak there is so sharp that 256 samples blur it: the weights above predict 0.963. The rest is the scatter of 400 random results, about 5 % for one bin. Estimating a PSD from data is the subject of The periodogram (25.1).
Equal power in every octave
Our ears judge pitch by ratios. From 20 Hz to 40 Hz is one octave, a doubling, as in 11.3, and so is 10 kHz to 20 kHz. The range we hear, 20 Hz to 20 kHz, is just under 10 octaves.
White noise has the same power in every hertz. Its octave from 10 to 20 kHz is 10 000 Hz wide, and its octave from 20 to 40 Hz only 20 Hz wide. So the top octave holds 500 times the power, 27.0 dB more, and white noise sounds like a hiss.
Pink noise has the same power in every octave instead: 20 to 40 Hz holds as much as 10 to 20 kHz. Each octave is twice as wide as the one before it, so to hold the same power its PSD must be half as high. Half the power is dB, so pink noise falls 3.01 dB per octave.
Brown noise is white noise added up, a random walk: . The first difference of 11.3, , has gain , as 12.4 worked out, and adding up undoes a first difference. So the running sum has gain , and
For small , is close to , so is close to . Each doubling of frequency then divides the power by 4: dB per octave.
A pure random walk wanders off: its variance grows with , so it is not stationary, and its PSD is infinite at .
In practice I let the sum leak a little, , the leaky integrator of Difference equations (6.1) with a different constant. That is AR(1) noise with , a longer memory than the first instrument reaches. Its PSD is flat below a corner of about rad/sample and falls about 6 dB per octave above it. At kHz the corner is Hz.
No simple recursion falls exactly 3 dB per octave. J. O. Smith’s pink-noise filter comes close with three poles and three zeros. They take turns along the real axis between 0.1 and 1. The falls of the poles and the rises of the zeros overlap, and on average the slope is near −3 dB per octave.
White, pink, brown
The second instrument passes white noise at 44.1 kHz through the two filters and draws the three PSDs. The frequency axis is logarithmic: each octave takes the same width, so a fixed number of dB per octave is a straight line. Rain on leaves sounds pink, a distant waterfall brown, and radio static white.
White, pink, brown
White noise at 44.1 kHz through two filters; PSD in dB re its value at 1 kHz.
White noise: the same power at every frequency, a flat line.
Describe this picture
One panel: white noise at 44.1 kHz through two filters, with each PSD in dB re its value at 1 kHz, from −30 to 30, against frequency from 20 Hz to 20 kHz on a log scale. The curve “white” is dotted, “pink” solid and “brown” dashed, each labelled at its high-frequency end. Two thin dotted guide lines pass through 1 kHz, one falling 3.01 dB per octave and one 6.02. The readouts are the colour and its slope from 200 to 3200 Hz, in dB per octave. A button, “Hear it”, plays 2 s of the chosen colour. The clip adds one curve at a time. White noise has the same power at every frequency, a flat line at 0.00 dB per octave. Pink falls −2.94 dB per octave, equal power in every octave, and keeps within 0.67 dB of the exact −3.01 dB line from 20 Hz to 20 kHz. Brown is white noise through a leaky integrator, about −6 dB per octave (−5.97) above its corner at 35.2 Hz, and the caption ends: “S_y = |H|² S_x: the filter’s gain squared is the colour.” After the clip three buttons, “white”, “pink” and “brown”, in a group named “Colour”, choose the curve drawn at full strength; the other two are drawn faintly.
Notice that pink measures −2.94 dB per octave, not exactly −3.01. The filter only approximates the ideal slope, but over the band we hear it never strays from it by more than 0.67 dB.
Brown’s slope eases near the top, to −5.46 dB from 5 to 10 kHz and −3.60 dB from 10 to 20 kHz. is even and repeats every , so it is mirrored about , which is 22.05 kHz here, and every curve levels off as it nears that frequency.
After the clip, choose each colour and press “Hear it”: white hisses, pink sounds even, and brown rumbles.
Every colour here came from the same white noise. Only differed, and turned it into the colour. To make noise of a given shape, design a filter whose gain squared has that shape, as closely as a filter can, and feed it white noise.
The maths behind it · eigenvalues of Toeplitz matrices
In “Arrows in, the same arrows out” of The DFT as a matrix (13.5), the DFT’s arrows were the eigenvectors of every circulant matrix. The autocorrelations of 24.2 fill a Toeplitz matrix, entry . For long records it is nearly circulant, so its eigenvalues approach samples of the PSD (Szegő’s theorem). The PSD is the spectrum of the correlation matrix in both senses.
Worked example
1. AR(1) PSD. For , at is , which is 4.77 dB, and at it is , which is dB. For the two values are and , or 12.79 dB and dB.
2. Through a filter. 12.2’s signal had at and 0.556 at . Used as a filter on white noise of variance , it gives at 0 and at . The AR(1) formula with gives the same, and , or 9.54 dB and dB.
3. Octaves. Pink noise falls dB per octave and brown noise dB. Over the octaves from 20 Hz to 20 kHz, pink falls 30.0 dB, which is , and brown falls 60.0 dB.
4. Units. The band from to is hertz wide, so in hertz the two-sided density is , with . For white noise of variance 1 V² at kHz that is V²/Hz. The one-sided density of “One spectrum, four units” in Reading a spectrum: scaling and units (15.4) doubles it, to V²/Hz, or dB re 1 V²/Hz.
Where you’ll meet this
Sound engineers play pink noise through loudspeakers and read the room with an analyser whose bands are an octave or a third of an octave wide. Pink noise puts equal power in every such band, so a flat reading means a flat system.
Random walks model slow drift: a gyroscope’s bias, a clock’s error, the position of an object pushed by random forces. The Kalman filter of RLS and the Kalman filter (26.4) builds such coloured noise into its model. Noise shaping, in “What a first difference does to slow and fast wiggles” of 11.3, is a designed . The quantizer’s white error goes through , and its PSD becomes times the flat one.
Estimating a PSD from a recording comes next, in The periodogram (25.1) and Averaged periodograms: Bartlett and Welch (25.2). Parametric models and linear prediction (25.3) fits AR models and reads their PSD from the formula. The Wiener filter (26.2) builds a filter from the PSDs of a signal and of its noise.
The maths behind it · ARMA spectra
In statistics, the spectral density of a stationary time series is this PSD. An ARMA model’s spectrum is the white noise’s variance times , the same rule. That track writes a random variable as a capital and the variance as , where this page writes and .
Reference card
| Quantity | Formula | Notes |
|---|---|---|
| Wiener–Khinchin | the DTFT of the autocorrelation | |
| Power | mean 0 | |
| White | flat | |
| AR(1), variance 1 | at 0, at | |
| Through a filter | colour = gain squared | |
| Pink | −3.01 dB per octave | equal power per octave |
| Brown | −6.02 dB per octave | a random walk; leaky in practice |
| In hertz | two-sided; one-sided doubles |