erp Level 3 pf-peak-amplitude-noise-bias

Peak amplitude inflated by noise

Symptom. Low-trial condition has larger peaks.

Symptom

The condition with fewer surviving trials has the larger peak amplitude. The effect is present with peak amplitude and absent with mean amplitude in the same window. Subjects with more rejected trials show larger components. A patient or child group — which moves more, and therefore loses more trials — shows “larger” components than controls. The apparent effect shrinks when trial counts are matched, and it grows when the rejection threshold is tightened.

Cause

Peak amplitude is the maximum (or minimum) of the waveform inside a window, and taking a maximum is not a linear operation. Adding symmetric, zero-mean noise to a waveform can push its largest sample further out but can never pull it back, so the expected peak of a noisy average is larger than the peak of the underlying signal:

E[ max(signal + noise) ]  >  max(signal)

and the gap grows with the noise level and with the number of samples in the window.

Noise in an average falls as the square root of the trial count, so anything that changes the trial count — condition-biased rejection (pf-condition-biased-rejection), a rare-target design, a group that moves more, a subject with a bad electrode — changes the measured peak in a direction, not merely with more scatter. The result is a difference between conditions, groups or subjects that is a difference in data quality.

Two related consequences follow from the same non-linearity:

  • Peak latency is affected too, and worse. The argmax of a noisy waveform jumps between local maxima, and because the window bounds it, at low signal-to-noise it drifts toward the window centre.
  • Window width matters. A wider window can only find a larger maximum, so two studies with different windows are measuring different quantities — and a window widened after seeing the data is pf-post-hoc-windows as well.

Rectified or absolute-value area measures share the mechanism: noise adds area that cannot cancel. Signed area and mean amplitude do not, because they are linear.

Detect

  • Report trial counts per subject and per condition, always, and look at them before looking at the effect.
  • Measure the same effect with mean amplitude over the same window. If the effect is present with the peak and absent with the mean, the peak’s bias is the leading explanation.
  • Plot the measurement against trial count across subjects. A downward-sloping relationship between trial count and measured peak amplitude is the signature.
  • Thin the trials deliberately. Subsample the better-preserved condition to the trial count of the other, with a recorded seed, and recompute. A difference that vanishes under matching was a precision difference.
  • Report the standardized measurement error per condition (L3.5). Unequal SME is the quantitative statement of unequal noise, and it is what a reader needs in order to judge a peak measure.
  • Compare the noise estimates directly: the root-mean-square of the pre-stimulus interval of each condition’s average is a one-line check.

Fix

  • Use mean amplitude over an a-priori window as the default measurement. It is linear, so its expected value does not depend on the noise level, and it commutes with averaging, difference waves and grand-averaging (L3.3).
  • Use signed area when area units are wanted; avoid rectified area when noise differs across the compared units.
  • For latency, use a fractional-area latency rather than a peak latency, or measure the peak on jackknifed grand averages with the corresponding correction to the test statistic (L3.3).
  • Equalise the noise rather than the appearance: set rejection criteria condition-blind (L2.5), and where an imbalance survives, report the count-matched analysis alongside the full one.
  • If the literature requires a peak measure, report it with the trial counts, the per-condition SME and a mean-amplitude analysis of the same window, so a reader can see whether the effect depends on the measure.
  • Design against it. The trial-count argument of L3.5 is what stops the imbalance from being large enough to matter in the first place.

Example

Three panels from one ERP CORE P3 dataset. Left: the target-minus-standard difference wave at Pz averaged from the full trial set and, overlaid, the same subject's difference wave averaged from a randomly thinned subset of the trials, with the measured peak marked on each — the noisier, thinned average has the higher peak although it is the same underlying response. Middle: measured peak amplitude and mean amplitude plotted against the number of trials entering the average, where the peak curve rises as trials are removed while the mean curve stays flat and merely widens its error bars. Right: the across-subject distributions of the two measures at a high and a low trial count, showing the peak distribution shifting upward and widening while the mean distribution only widens.
ds-erpcore P3. Left and middle: sub-002, 40 target and 160 standard surviving trials at Pz, 400 seeded subsamples per trial count (numpy.random.default_rng(20260917)). Thinning to 8 trials per condition raises the measured peak from +13.62 to +17.42 µV with nothing in the underlying response changing: a maximum taken over a noisier curve finds noise. Right: all 19 subjects, the same two measures at the full trial count and at 8 trials per condition — peak amplitude moves from +5.01 to +6.45 µV across subjects (a shift of +1.43 µV) while the window mean moves from +2.71 to +2.13 µV and only its spread grows (SD 2.42 → 4.12 µV). A condition that lost more trials to rejection therefore gets a larger peak for free (pf-condition-biased-rejection). Numbers TODO(confirm) at author review. Data: ds-erpcore · license CC-BY-SA-4.0 · DOI 10.18112/openneuro.ds003069.v1.0.0. Source: data/scripts/make_figures_p2.py.