Thinking in Waves Episode 60 / Part XIX — Back to Physics, with the Tools

Where did the subtracted part go?

Where a trend ends and a signal begins ──
the boundary is set by the record, not the system ★ Removing a degree-\(q\) trend is a high-pass filter of order \(\alpha=q+1\) ── \(\text{dB/oct}=6\alpha\) again. Episode 1’s yardstick turns up here too.
★★ From it follows the condition for finite leakage, \(\beta\le2q+3\), which explains all five rows of Episode 59 §03.
★★★ And the “variance” of a \(1/f^\beta\) process is not a number ── it runs as \(N^{\beta-1}\) for \(\beta>1\), and as \(\log N\) at exactly \(\beta=1\). The same structure as Episode 29’s renormalisation.

Tools needed: Episodes 1, 5, 29, 51, 58, 59Computation: kenshou/torendo.js

Episode 59 concluded: subtract a degree 1–2 trend and the leakage goes away. ★ So where did the subtracted part go ── and where exactly is the boundary between trend and signal?

01★★★ Detrending is a high-pass filter

Feed a sinusoid at frequency \(f\) [bins] into a record of length 1024 and measure the residual energy.

\(f\) [bins]\(q{=}0\) (mean)\(q{=}1\) (line)\(q{=}2\)\(q{=}3\)
0.01−34.83−76.65−122.14−170.19
0.1−14.89−36.70−62.18−90.23
10.00−1.57−6.31−13.72
30.00−0.15−0.17−0.43

(The table is gain² in dB; 0 dB means it passes unchanged.)

\(q\)low-frequency slope dB/octpredicted \(6(q{+}1)\)\(\alpha\)\(-3\)dB point [bins]
06.0146.02110.4436
112.03612.04120.8527
218.05718.06231.2391
324.07824.08241.6152

The core of §01

degree-\(q\) detrending \(=\) a high-pass filter of order \(\alpha=q+1\)

★★★ \(\text{dB/oct}=6(q+1)\) ── Episode 1’s yardstick appears here too: the third time, after Episode 57’s edges and Episode 58’s windows.
★★ The \(-3\)dB points are 0.44 / 0.85 / 1.24 / 1.62 bins ── about \(0.4(q+1)\). All of them sit at “roughly one cycle per record.”
★★★ So the boundary between trend and signal is set by the record’s length, not by the system. Make the record ten times longer and what was a trend becomes a signal ── exactly the shape of Episode 5’s “a period longer than the age of the universe is indistinguishable from a constant.”

02★★★ The condition for finite leakage ── \(\beta\le2q+3\)

Derivation $$\mathrm{Leak}(k)=\int f^{-\beta}G_q(f)\,|W_\alpha(k-f)|^2df,\quad G_q\propto f^{2(q+1)}\ \Longrightarrow\ \text{converges iff}\ \beta\le2q+3$$

Hann window (\(\alpha=3\)), leakage into bin \(k=64\). By what factor does it grow when the lower limit drops from 1/16 to 1/64? (Near 1 means converged.)

\(\beta\)\(q{=}0\)\(q{=}1\)\(q{=}2\)
31.0181.0001.000
41.1361.0021.000
51.7971.0181.000
64.8051.1341.002
717.1451.7901.017

★ Exactly at \(\beta=2q+3\) (\(\beta{=}5,q{=}1\) and \(\beta{=}7,q{=}2\)) the divergence is logarithmic: dropping the lower limit by 4× raises the leakage only 1.02× ── in practice the same as converged.

★★ This explains Episode 59 §03.

\(\beta\)\(q\)\(2q{+}3\)leakage ratioEpisode 59 measuredceiling \(2\alpha{=}6\)
5031.80 diverges5.512 (overshoot)—
5151.02 converges4.992 (fixed)—
6151.13 diverges6.035 (not yet)—
6271.00 converges5.994 (fixed)—
7271.02 converges6.039 (ceiling)clamped

The core of §02 ── two separate conditions

★★★ Only the converging rows are fixed. \(\beta=6,q=1\) has a ratio of 1.13 and the measurement stayed at 6.035.
★★ \(\beta=7,q=2\) has its leakage under control and is still wrong ── because it is hitting the window ceiling \(2\alpha=6\). That is how you tell two causes apart.
★★★ There are two conditions, and they are separate:
 ① leakage from waves longer than the record → \(\beta\le2q+3\) (bought with detrending)
 ② the window’s sidelobe ceiling → \(\beta<2\alpha\) (bought with the window)
★ Episode 58’s “raise the window” and Episode 59’s “subtract a trend” were different conditions ── neither one alone is enough.

03What is the subtracted trend a measurement of?

Segment length 1024. Compare the fitted degree-1 polynomial against the true low-frequency part (the series with only components below the record’s 1-bin resolution).

\(\beta\)correlationtrend variance / low-part variancelow part’s share of total variance
10.61750.79060.1121
20.70780.77440.5700
30.88010.81940.9067
40.95640.93500.9684
50.99870.99681.0007

The core of §03 ── what you subtract is not gone

★ The larger \(\beta\), the higher the correlation ── because the low end dominates (0.999 at \(\beta=5\)).
★★ The subtracted trend is not waste; it is a measurement of “waves longer than the record.” At \(\beta=5\) it reproduces the true low-frequency part almost exactly.
★★★ But a very coarse measurement, with two degrees of freedom ── one straight line’s worth of information. Episode 51’s “a periodogram point has two degrees of freedom” shows up here too.
★ What Episode 59 thought it was throwing away was still in hand ── whether to use it is another matter.

04★★ The “variance” of \(1/f^\beta\) is not a number

\(\beta\)\(N{=}256\)\(N{=}1024\)\(N{=}4096\)slope (dec/dec)predicted
0.53.25e−73.40e−73.40e−70.0160 (converges)
15.10e−96.33e−97.97e−90.1610.146 (\(\log N\))
28.99e−123.32e−112.16e−101.1471.0
32.24e−133.01e−125.43e−111.9802.0

The core of §04 ── the structure of Episode 29’s renormalisation

★★★ For \(\beta>1\) the variance keeps growing as the record lengthens (\(N^{\beta-1}\)). “What is this signal’s variance?” has no answer ── not until you state the record length.
★ For \(\beta<1\) the high end dominates and it converges (measured 0.016).
★★★ And at exactly \(\beta=1\) it grows as \(\log N\) ── neither a power nor a constant. Over \(N{=}256\to4096\) the prediction \(\ln(\ln4096/\ln256)/\ln16=0.146\) against a measured 0.161. \(1/f\) sits exactly on the boundary here too.
★★ This is the structure of Episode 29’s renormalisation: a physical quantity depends on where you cut, and it runs as you move the cut ── with the logarithmically running point playing the role of the fixed point.

05How much variance does detrending remove?

\(N=1024\). Residual variance, with the original variance set to 1.

\(\beta\)\(q{=}0\)\(q{=}1\)\(q{=}2\)\(q{=}3\)\(q{=}5\)
0.51.00000.98610.97680.96740.9532
11.00000.89990.84950.80640.7502
21.00000.55170.39580.30590.2130
31.00000.21450.10320.05450.0255
41.00000.09200.01840.00770.0029

★★★ At \(\beta=4\), one straight line takes the variance below a tenth. That shows how thoroughly “the variance” was dominated by the low end.

★★ At \(\beta=0.5\) almost nothing changes (0.986) ── subtracting does little harm. “When in doubt, detrend” is sound advice in exactly this sense.

Exercises

  1. §01 says the record sets the boundary. Does the system itself distinguish trend from signal?
    Show answer
    A pure \(1/f^\beta\) process does not. It is scale invariant ── if every frequency looks the same, no line can be drawn from the system’s side saying “below here is trend.”
    ★ A distinction exists only when the system has a characteristic time: Episode 56’s \(\tau_{\max}\), or Episode 44’s band edge.
    ★★ So “subtract the trend” is not a claim about the system but a declaration about the measurement ── “I have decided not to measure waves longer than this record.”
    ★★★ In Episode 55’s classification, detrending is not an assumption but a statement of range. What must be written honestly is therefore not a count of assumptions but \(q\) and the record length.
  2. §04 says the variance “runs.” Is it really the same as Episode 29’s renormalisation?
    Show answer
    The shape is the same; the substance is not.
    ★ The same: in both, an observable depends on the cutoff and runs as you move it, and the point that runs logarithmically is special (Episode 29’s fixed point, this episode’s \(\beta=1\)).
    ★★ Different: in field theory you can fix the running quantity (a coupling) to an experimental value and thereby remove the cutoff dependence from observables. There is no such step here ── the variance simply keeps running.
    ★★★ Honestly stated: this is “the same structure as renormalisation,” not “renormalisation is available.” This series enjoys finding analogies, but as Episode 55 insisted, an analogy is not a claim until you say how far it goes.
  3. §03 calls the trend a two-degree-of-freedom measurement. Can it be used?
    Show answer
    Barely, from one record ── but usefully from many.
    ★ One record gives two degrees of freedom ── Episode 51’s formula gives \(\mathrm{sd}=1.2825/\sqrt2\approx0.91\) nats, just under 4 dB of scatter. Poor for a single point.
    ★★ But \(M\) records improve it as \(\sqrt M\): pooling the trends of 100 independent records would measure the power one decade below the record to about 0.4 dB.
    ★★★ That is a fourth way to buy range, alongside Episode 54’s three ── ① measure longer ② take more samples ③ change the system, plus ④ collect many short records and turn their “trends” into a statistic. ★ It requires the records to be independent, which in \(1/f\) is itself doubtful. Not verified here.

Summary — the boundary belongs to the record, not the system

Episode 59 said “subtract the trend.” This time we looked at it from the side of what was subtracted.

★★★ degree-\(q\) detrending \(=\) a high-pass filter of order \(\alpha=q+1\).
\(\text{dB/oct}=6(q+1)\) (measured 6.014 / 12.036 / 18.057 / 24.078).

★ Episode 1’s yardstick turns up for the third time ── Episode 57’s edges, Episode 58’s windows, and now detrending. ★★ The \(-3\)dB point is \(0.4(q+1)\) bins, i.e. about one cycle per record ── the boundary is set by the record, and lengthening it tenfold turns a trend into a signal. Exactly Episode 5’s shape.

★★ From this follows the leakage condition \(\beta\le2q+3\) ── which explains all five rows of Episode 59 §03. And \(\beta=7,q=2\) has its leakage under control yet is still wrong, because it hits the window ceiling \(2\alpha=6\): the two conditions are separate. ① leakage: \(\beta\le2q+3\), bought with detrending; ② the ceiling: \(\beta<2\alpha\), bought with the window. Neither alone suffices.

★★★ The subtracted trend had not vanished ── at \(\beta=5\) it correlates 0.999 with the true low-frequency part. It is a measurement of “waves longer than the record.” A very coarse one, with two degrees of freedom (Episode 51).

★★★ And the “variance” of \(1/f^\beta\) is not a number. It runs as \(N^{\beta-1}\) for \(\beta>1\) (measured 1.147 / 1.980 against 1 / 2), converges for \(\beta<1\), and grows as \(\log N\) at exactly \(\beta=1\) (0.146 predicted, 0.161 measured). ★ “What is this signal’s variance?” has no answer without the record length ── the structure of Episode 29’s renormalisation, with the logarithmic point as the fixed point. ★★ But “the same structure” is not “renormalisation is available” (Exercise 2).

This document is Episode 60 of the “Thinking in Waves” series. The computations are in kenshou/torendo.js (own FFT, zero dependencies). On the numbers in this episode: the detrending gain, its low-frequency slope and \(-3\)dB points, the leakage-integral convergence ratios, the correlation between trend and low-frequency part, the \(N\) dependence of the variance, and the variance removed by detrending are all computed here. That polynomial detrending acts as a high-pass, and that a \(1/f\) process’s variance depends on record length, are well-known facts and are not discoveries of this episode ── what this episode did was re-measure them on Episode 1’s \(\text{dB/oct}=6\alpha\) yardstick, derive the leakage condition \(\beta\le2q+3\) and check it against Episode 59’s table, and compare the \(\log N\) growth at \(\beta=1\) against the predicted 0.146. §01 uses a record of 1024; §02 uses a Hann window at \(k=64\) comparing lower limits 1/16 and 1/64; §§03–05 cut segments from a synthesis of length 65536 ── all are condition-dependent. The “converges/diverges” verdict in §02 uses a convenience threshold of 1.1, and exactly \(\beta=2q+3\) diverges logarithmically (ratio 1.02). The §04 slopes are fitted from only three points (\(N=256,1024,4096\)). This episode also uses synthetic data only, and has not been applied to real measurements. ── To print, use your browser’s Print → Save as PDF.

Printing / PDF: ⌘+P (Ctrl+P on Windows). “Show answer” opens the solutions.