Level 4 L4.1

Why time-frequency

What trial averaging hides: evoked versus induced versus total power, and when a time-frequency analysis is warranted.

~40 min Widget: w-evoked-vs-induced Notebook: nb-4-1-evoked-vs-induced

Prerequisites: L3.2 · The ERP and its components, L1.7 · Aperiodic and periodic components

Objectives

  • Explain what trial averaging hides
  • Distinguish evoked, induced and total power
  • State when TF analysis is warranted

Why this matters

Level 3 built an analysis on one operation: average the trials, and whatever is not time-locked to the event cancels. That is exactly the right thing to do for a response that arrives at the same latency and with the same shape every trial — and it is a shredder for a response that arrives with a different phase every trial. A 10 Hz burst that is present on every single trial can be made to vanish from the ERP completely, without touching its amplitude, simply by letting its phase wander. Time-frequency analysis exists because the averaged waveform cannot tell you the difference between an effect that is absent and an effect that is not aligned.

Concepts

What averaging keeps

Write trial k as a time-locked part plus everything else: x_k(t) = s(t) + n_k(t). The average over N trials is s(t) + (1/N)·Σ n_k(t), and the second term shrinks as 1/√N (L3.2). The assumption hiding inside that arithmetic is that the interesting part, s(t), is identical on every trial — same latency, same polarity, same phase.

Relax it by one step. Let every trial contain the same burst but at its own phase: x_k(t) = A·e(t)·cos(2πf(t − t₀) + φ_k) + n_k(t), with e(t) a fixed envelope and φ_k drawn per trial. Then the average is

A·e(t)·Re{ e^{i2πf(t − t₀)} · (1/N)·Σ e^{iφ_k} }

— the same burst, scaled by the mean resultant length of the trial phases, |(1/N)·Σ e^{iφ_k}|. That factor is 1 when every trial agrees and 0 when the phases are spread evenly around the circle. Nothing has happened to any trial; the average has simply stopped being able to see them.

The law depends on how the phases are drawn, and the two conventions in use are far apart, so the parameterisation has to be stated with any number:

  • Uniform over a full width W (the convention this lesson’s widget and data file use): the attenuation is sin(W/2)/(W/2), which halves at W = 217.2° and reaches zero at 360°.
  • Circular standard deviation s of a von Mises or wrapped-normal draw: the attenuation is approximately exp(−s²/2), which halves at s = 67.5°.

Between those two readings of the same slider is a factor of about three. The widget carries the reading as a named control, defaults to the data file’s, and prints the halving jitter under both readings side by side, so no number appears on screen without the convention it belongs to.

Evoked, induced, total

Time-frequency analysis gives three quantities that are routinely confused, and the difference between them is the order of two operations — averaging and taking the magnitude.

  • Evoked power — transform the average, then take the squared magnitude: |W ∗ x̄|². Everything that is not phase-locked has already cancelled in , so this is the spectral content of the ERP and nothing else.
  • Total power — transform each trial, take the squared magnitude, then average: (1/N)·Σ |W ∗ x_k|². Magnitude is taken before averaging, so phase never enters and a burst survives whatever its alignment. This is what an ordinary time-frequency map shows.
  • Induced power — the part of the total that is not phase-locked. Conventionally estimated as total minus evoked, which is a subtraction of two estimates and inherits the bias of both; the more careful route is to subtract the ERP from each trial before transforming, which removes the phase-locked component at the level of the data rather than at the level of the power estimate. Neither route is a clean separation, because a component can be partly locked, and because the subtraction assumes the evoked response is identical on every trial — the assumption this whole lesson is about. (Tallon-Baudry, 1999) is the standard reference for the distinction.

Total power is the only one of the three that answers “did this happen on the trials?”. Evoked power answers “did this happen in the same place on every trial?”. They are different questions and the difference between them is the finding, not a nuisance.

Latency jitter is phase jitter

A trial that arrives τ seconds late is not only shifted — at frequency f its carrier is also rotated by 2πfτ. At 10 Hz, 10 ms of latency shift is 36° of phase; at 20 Hz it is 72°. So latency jitter attenuates the ERP twice over: the envelope smears, and the phases scatter. The high-frequency parts of a response are destroyed by a jitter that leaves the low-frequency parts nearly intact, which is one reason a late slow component survives averaging while an early fast one does not.

This is also why “the ERP got smaller” is a weak claim on its own. An amplitude reduction in the average is consistent with a smaller response, with fewer trials containing a response, and with the same response arriving less consistently — and those three have different interpretations. Total power distinguishes the first from the other two; intertrial phase coherence (L4.5) distinguishes the second from the third.

When a time-frequency analysis is warranted

A time-frequency decomposition is not free: it multiplies the size of the search space (L4.7), it introduces smoothing parameters that have to be chosen and reported (L4.2), and it produces maps that invite over-reading. Reach for one when:

  • the effect is expected to be non-phase-locked — induced gamma, mu/beta desynchronisation during movement or imagery (L4.4), alpha modulation with attention;
  • the question is about a rhythm rather than a deflection — band-limited power, its time course, or its phase (L4.5) — and there is a spectral peak to justify calling it a rhythm at all (L4.6);
  • the question is about consistency across trials — whether trials align, not whether they are large;
  • the ERP is ambiguous — a reduced average could be a reduced response or a less consistent one, and the two need to be separated before either is reported.

Do not reach for one merely because the ERP analysis did not find anything. Testing the same data a second way, in a much larger space, with parameters chosen after the first test failed, is pf-post-hoc-windows with more axes; L4.7 and L6.4 cover what it costs.

The data behind this lesson

  • The widget is synthetic, and says so. Its parameters come from /data/widgets/w-evoked-vs-induced/fixtures.json, generated by data/scripts/make_phase_fixtures.py: a 20 µV, 10 Hz, 7-cycle Gaussian burst (σ = 0.111408 s) centred at 0.3 s in a −1.0 … 1.5 s epoch at 250 Hz, on a 1/f^1.343 background of 19.8 µV standard deviation, seed 20260918. Trials, averaging and the Morlet transform all run in the browser, which is what makes the jitter slider live.
  • The background is not invented. Its exponent and amplitude are medians read at build time from the shipped w-aperiodic-explorer spectra — 12 ds-eegbci subjects, channel O1, eyes-open, specparam 2.0.0rc4 — with a per-subject exponent range of 0.677–1.76 and amplitude range 13.6–41.2 µV. Only those two summary statistics of a real spectrum are used; no recording is behind the trace.
  • The notebook does the same demonstration on real ds-eegbci motor trials, where the burst is a real mu rhythm and the jitter is whatever the participant supplied.

Explore

Evoked vs induced — jitter the phase of a burst that is present on every trial, and watch it leave the ERP but not the time-frequency map

mode: default Open lab page →
Loading Evoked vs induced — jitter the phase of a burst that is present on every trial, and watch it leave the ERP but not the time-frequency map…

What to look for

Data: synthetic · license CC-BY-4.0 · synthetic / modified segment · labels: algorithmic · a cropped, re-referenced or filtered derivative of the source recording.

Work it in this order. Start at zero jitter and confirm that the ERP is the burst and that the evoked and total maps are the same picture. Set the background to zero, so the law is visible without a noise floor, and drag the phase jitter: the ERP shrinks along sin(W/2)/(W/2) while the total-power map barely moves. Press Halving jitter and read the value — that is the exercise. Then put the background back and watch where the measured curve stops falling: it lands on the noise floor the widget measured in the pre-stimulus window, not on zero. Finally set the phase jitter to zero and raise the latency jitter instead, and read the conversion the widget prints between the two.

Practice

Why time-frequency: ERP against single-trial power on real motor-imagery trials, and the phase jitter at which a trial average halves nb-4-1-evoked-vs-induced

Level 4 ~3 min
notebooks/L4/nb-4-1-evoked-vs-induced.ipynb

Downloads from ds-eegbci.

Open in Colab Download Read it here

The notebook repeats the comparison on real ds-eegbci motor-imagery epochs: the ERP, the total-power map and the evoked-power map of the same trials, with the trial count and the analysis parameters stated in one cell.

Exercises

Exercise ex-4-1-halving-jitter

Numeric

In the widget, leave the jitter reading on its default — 'uniform over a full width', the convention the data file defines — with the burst, background and trial count at their defaults. At what phase jitter does the amplitude of the trial average fall to half its zero-jitter value?

degrees (full width of the uniform draw)

Accepted within ±30 degrees (full width of the uniform draw).

Exercise ex-4-1-what-survives

Multiple select

Every trial in a recording contains a 20 Hz burst of the same amplitude and duration, but its phase is drawn uniformly over the whole circle and its latency varies by ±50 ms. Select every statement that is true of what the analysis will show.

Options (select all that apply)

Exercise ex-4-1-smaller-or-less-consistent

Free response

A colleague reports that their late positive component is 40 % smaller in the patient group than in the controls, and concludes that the patients' response is weaker. What else could produce that result, and what would you compute to tell the accounts apart?

Pitfalls

No pitfall for this lesson: Spec §6 lists no pitfall for this lesson (§5.3 exemption).

In other tools

In other toolsEEGLAB · FieldTrip — names only

The equivalents of what this lesson does, for a reader who works in another toolbox. Function names only: their own documentation is the place to learn how to call them.

EEGLAB

  • newtimefEEGLAB

FieldTrip

  • ft_freqanalysis(keeptrials)FieldTrip
  • ft_freqdescriptivesFieldTrip

Names checked 2026-09-18 against EEGLAB 2026.0.0 (plugins at the versions in EEGLAB’s own plugin list) and FieldTrip 20251218.

Reading

  1. Cohen (2014). Analyzing Neural Time Series Data. unverified
  2. Tallon-Baudry & Bertrand (1999). Oscillatory gamma. unverified