Level 3 L3.2

The ERP and its components

Averaging and SNR, the canonical components, latent component versus observed peak, polarity conventions, and a tour of the ERP CORE paradigms.

~60 min Widget: w-erp-averager Notebook: nb-3-2-erp-core-p3

Prerequisites: L3.1 · Epoching and baseline

4 claims on this page are unverified. TODO(confirm) marks a specific statement the author has not yet checked against a primary source. Everything else on this page has been reviewed. Treat a marked claim as provisional and go to the cited source rather than quoting the sentence.

Objectives

  • Explain averaging and why SNR grows with the square root of trial count
  • Recognize canonical components (P1, N1, P2, N2, P3, N170, MMN, N2pc, N400, LRP, ERN/Pe)
  • Distinguish latent component from observed peak
  • State polarity conventions
  • Tour the ERP CORE paradigms

Why this matters

An event-related potential is not something you record; it is something you compute, and the computation is a single average. Understanding exactly what that average keeps, what it destroys and how fast it improves tells you how many trials your experiment needs, why two labs can report opposite polarities for the same effect, and why the bump you can see in the waveform is usually not the thing your theory is about. This lesson establishes the vocabulary — component, peak, polarity, paradigm — that the rest of the level measures and tests.

Concepts

Averaging: what it keeps and what it assumes

Take the epochs of one condition, line them up on the event, and average them sample by sample. Write each trial as a stimulus-locked signal plus noise:

x_i(t) = s(t) + n_i(t)

The average over N trials is s(t) + mean(n_i(t)). If the noise has zero mean and is independent across trials, the second term shrinks and the first does not. That is the whole idea: averaging does not enhance the response, it removes what was not consistently time-locked to the event.

Three assumptions are hiding in that one line, and every one of them is violated somewhere in real data:

  1. The signal is identical on every trial. It is not. Latency varies from trial to trial, and latency jitter smears and flattens the average — a sharp component present on every trial can average into a broad, small one. Amplitude varies too. L4.1 shows what averaging hides; L3.6 shows how to look at the trials instead.
  2. The noise is zero-mean and independent across trials. Slow drift, a lingering artifact and the response to a neighbouring trial (L3.1) are none of those things.
  3. The noise is not itself time-locked. Line noise at a fixed phase relative to the trigger survives averaging perfectly, and so does a stimulus-driven artifact such as a screen refresh or the click of a shutter.

Why signal-to-noise grows as the square root of N

Independent noise of standard deviation σ, averaged over N trials, has standard deviation σ/√N. The signal is unchanged. So the amplitude signal-to-noise ratio of the average is

SNR(N) = s / (σ / √N) = (s / σ) · √N

The consequences are worth stating as numbers rather than as a proportionality. Doubling the SNR costs four times the trials. Going from 20 trials to 80 doubles it; going from 80 to 160 buys a factor of 1.41. Recording time therefore has steeply diminishing returns, which is the whole reason L3.5 asks the design question — how many trials do I need — rather than “how many can I collect”.

The same arithmetic runs in reverse and is the reason unequal trial counts are dangerous: two conditions averaged from different numbers of trials have averages of different precision, and measures that respond to noise in a direction rather than merely with scatter will differ between them for no physiological reason (L3.3, pf-peak-amplitude-noise-bias).

The component is not the peak

The waveform you plot is the sum of several overlapping latent components plus whatever noise survived averaging. A peak is a local extremum of that sum. Four consequences follow, and they are the reason Level 3 spends a whole lesson on measurement:

  • Observed peak latency is not component latency. When two components overlap, the extremum of the sum sits between them and moves when either changes.
  • Observed peak amplitude mixes components. “The N2 got smaller” and “the P3 next to it got bigger” produce the same picture.
  • A component can exist without a peak. If it rides on a larger neighbour it appears only as a shoulder, with no local extremum at all.
  • A peak can exist without a component. Two overlapping components of opposite polarity produce an extremum where neither has one.
Warning

Naming a deflection after a component (“the N2 in this condition”) asserts a decomposition you have not performed. The defensible claims are about the measured quantity — mean amplitude in a stated window at stated electrodes — and about the difference between conditions, where the components shared by both largely subtract out. L3.3 makes that concrete.

Polarity conventions

Component names encode a polarity at a canonical site: the P3 is positive at midline parietal electrodes, the N170 negative at lateral occipito-temporal ones. Two cautions come with that convention. First, polarity is reference-dependent (L2.3): the same generator measured against the mastoids and against an average reference can differ in sign at some electrodes, so the name describes a tradition, not a measurement. Second, a large part of the ERP literature plots negative upward, and both conventions remain in use; a waveform figure whose vertical axis is unlabelled is genuinely ambiguous.

Note

This site’s widgets default to positive up with a global toggle, and every amplitude axis is labelled in µV. When you read a figure elsewhere, find the axis label before you read the waveform.

The canonical components

A reference table for the components this level and Level 6 keep referring to. Treat the latencies as the centre of a wide range, not as a criterion.

ComponentNominal latencyNominal scalp maximumTypically elicited by
P1~80–130 mslateral occipitalvisual onset; modulated by spatial attention
N1~100–200 msmodality-dependent (fronto-central for auditory, lateral occipital for visual)stimulus onset; attention
P2~150–250 msfronto-central or occipital by modalitystimulus features, repetition
N2~200–350 msfronto-central (control and deviance)deviance, conflict, inhibition
P3~300–600 msmidline parietal for the P3brare, task-relevant stimuli in an oddball design
N170~130–200 mslateral occipito-temporalfaces relative to other object categories
MMN~150–250 msfronto-central, often inverting at the mastoidsa rare deviant in a repeating auditory stream, with or without attention
N2pc~200–300 msposterior, contralateral to the attended sideattentional selection of a lateralized target
N400~300–500 mscentro-parietalsemantic mismatch or low expectancy
LRPbefore and around the responsecentral, contralateral to the responding handresponse preparation
ERN / PeERN shortly after an erroneous response; Pe a few hundred ms laterfronto-centralresponse errors

TODO(confirm): the latency ranges and scalp maxima in this table are nominal textbook values assembled for expert review. They are reference-dependent, montage-dependent and vary with paradigm, age and clinical population, and none of them is quoted from a source in the site’s reading list. (Luck, 2014) is the standard reference for the set.

The ERP CORE paradigms

(Kappenman et al., 2021) is the dataset this level runs on. What the site’s own dataset entry records: six paradigms yielding seven components — N170, MMN, N2pc, N400, P3, ERN and LRP — with 40 participants per paradigm, each paradigm published as its own component with a per-subject BIDS-compatible folder. Acquisition is identical across paradigms: Biosemi ActiveTwo, 30 EEG + 3 EOG electrodes in a 10-20 placement scheme, 1024 Hz, referenced to the Biosemi CMS arrangement, 60 Hz mains, no software filters applied, one run per paradigm per subject. It is CC BY 4.0 and openly downloadable per subject and per file, which is why this site can both link it and ship derived assets from it.

Seven components from six tasks means one task yields two. The standard pairings, each of which is the textbook paradigm for its component:

  • Faces versus other object categories → N170.
  • A passive auditory oddball, a repeating standard tone with rare deviants that the participant is not asked to attend → MMN.
  • Visual search with a lateralized target, scored as contralateral minus ipsilateral → N2pc.
  • Word pairs that are semantically related or unrelated → N400.
  • An active visual oddball, rare targets among frequent standards with a response → P3.
  • A flankers task, which yields both the error-related negativity locked to an incorrect response and the lateralized readiness potential locked to response preparation → ERN and LRP.

TODO(confirm): the pairing of ERN and LRP to a single flankers task, and the specific implementation of each paradigm (stimulus set, timing, trial counts, instructions), should be checked against the dataset’s own documentation before publication; the six-paradigms/seven-components fact and the acquisition parameters above are from the site’s dataset entry. TODO(confirm): the author mirrors the ERP CORE entry into the catalogue registry and signs off the dataset page (§10.11 item 8); the shipped asset sidecars also record a licence conflict in the source — the OSF node record says CC BY 4.0, the per-paradigm component’s own LICENSE file says CC BY-SA 4.0 and its dataset_description.json says CC0 — which the author reconciles (§13 item 22).

The P3 paradigm is the one Level 2 and Level 3 use throughout, so that every lesson measures the same effect with a different tool.

The same component in a second dataset

The notebook’s second section repeats the target-versus-non-target average on one ds-brain-invaders subject: 16 dry electrodes at 512 Hz, a calibration-less BCI game, and roughly 198 target against 990 non-target flashes per subject. Same family of component, three differences that matter here — far fewer channels, a dry-electrode contact whose noise level is higher, and a trial imbalance of about one to five. The result is a good check on whether you have understood this lesson: the same √N argument predicts that the rare condition is the noisier average despite being the interesting one, and that the two conditions’ averages cannot be compared with a noise-sensitive measure.

The data behind this lesson

  • ds-erpcore P3, as above. The widget ships sub-001’s 200 single trials at four channels (Pz, Cz, PO7, PO8) over both conditions — 40 target against 160 standard, the imbalance the paradigm requires — baselined to (−0.2, 0) s and stored over −0.2 to 0.8 s at 256 Hz, with a per-trial, per-channel pre-stimulus noise estimate so that the SNR read-out is computed from the data rather than assumed.
  • ds-brain-invaders — 16 dry electrodes, 512 Hz, 50 Hz mains, no online filter, ~198 target versus ~990 non-target trials per subject, available through moabb; CC BY 4.0. Used in the notebook only.

Explore

ERP averager — add trials one at a time and watch the component emerge from the noise, with an SNR readout

mode: averager Open lab page →
Loading ERP averager — add trials one at a time and watch the component emerge from the noise, with an SNR readout…

What to look for

Data: ds-erpcore , subject sub-001, run task-P3, -0.19921875–0.80078125 s · license CC-BY-SA-4.0 · DOI TODO(confirm) · labels: algorithmic · a cropped, re-referenced or filtered derivative of the source recording. Share-alike. This asset is derived from a source whose licence requires that anything built from it carry the same licence. If you reuse it, distribute your version under CC-BY-SA-4.0 and keep the attribution below.
Kappenman, E., Farrens, J., Zhang, W., Stewart, A. X., & Luck, S. J. (2020). ERP CORE: An Open Resource for Human Event-related Potential Research. PsyArXiv. Paper DOI 10.31234/osf.io/4azqm. Dataset DOI 10.18112/openneuro.ds003069.v1.0.0, https://osf.io/thsqg/. Licensed CC-BY-SA-4.0; this is a derived asset and is distributed under the same licence (data/directory.yaml license_decision, section 13 item 15).

Work through it in this order: set N to 1 and step up slowly, watching where the deflection appears rather than how big it is; at each stop read the two numbers under the chart and notice that the signal settles early while the noise keeps falling; compare the measured SNR with the dashed √N reference; press Shuffle repeatedly at a fixed N to see that the average is a property of the trial set and not of the order; then switch to the rarer condition and see the same component arrive more slowly because there are fewer trials of it.

Practice

The ERP and its components: the grand-average P3, target versus standard, over ten ERP CORE subjects, and the same component on 16 dry electrodes nb-3-2-erp-core-p3

Level 3 ~5 min
notebooks/L3/nb-3-2-erp-core-p3.ipynb

Downloads from ds-erpcore, ds-brain-invaders.

Open in Colab Download Read it here

The notebook computes the grand-average P3 for target and standard trials from ds-erpcore, plots the two conditions and their difference, and then repeats the target-versus-non-target average for one ds-brain-invaders subject. Its final cell prints the trial counts, the noise estimates and the number of trials needed for the SNR the exercise asks about.

Exercises

Exercise ex-3-2-trials-for-snr

Numeric

Using the averager, set the target SNR to 3 and read off how many trials of the target condition are needed to reach it for this subject at Pz.

trials

Accepted within ±2 trials.

Exercise ex-3-2-paradigm-component

Multiple choice

ERP CORE runs six paradigms and reports seven components. Which list pairs every paradigm with the component it was designed to elicit?

Options

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

  • pop_comperpEEGLAB

FieldTrip

  • ft_timelockanalysisFieldTrip

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. Luck (2014). An Introduction to the Event-Related Potential Technique, 2nd ed.. unverified
  2. Kappenman et al. (2021). ERP CORE. unverified