Skip to main content
Social Sci LibreTexts

4: Filtering the EEG and ERPs

  • Page ID
    201997
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\dsum}{\displaystyle\sum\limits} \)

    \( \newcommand{\dint}{\displaystyle\int\limits} \)

    \( \newcommand{\dlim}{\displaystyle\lim\limits} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \(\newcommand{\longvect}{\overrightarrow}\)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\ket}[1]{\left| #1 \right>}\)
    \(\newcommand{\bra}[1]{\left< #1 \right|}\)
    \(\newcommand{\braket}[2]{\left< #1 \vphantom{#2} \right| \left. #2 \vphantom{#1} \right>}\)
    \(\newcommand{\braopket}[3]{\left< #1 \vphantom{#2}\vphantom{#3} \right| #2 \vphantom{#1}\vphantom{#3} \left| #3 \vphantom{#1}\vphantom{#2} \right>}\)
    \(\newcommand{\qmvec}[1]{\mathbf{\vec{#1}}}\)
    \(\newcommand{\op}[1]{\hat{\mathbf{#1}}}\)
    \(\newcommand{\expect}[1]{\langle #1 \rangle}\)
    \(\newcommand{\dfn}[1]{\emph{\textbf{#1}}}\)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)
    Learning Objectives
    • Part 1 focuses on the basics of filtering in the frequency domain. You will learn to:
      • Compare the frequency content of an ERP waveform with the frequency response function of a filter to predict how well the filter will attenuate the noise in the data
      • Identify filter distortions
      • Choose filter settings that will work reasonably well for most experiments
    • Part 2 focuses on how filtering works in the time domain. You will learn to:
      • Determine the impulse response function of a filter and conceptualize filtering as a process that replaces each point in the unfiltered waveform with a scaled-and-shifted copy of this function
      • Think of an ERP waveform as a series of impulses, one at each time point
      • Predict how a filter will distort an ERP waveform on the basis of the filter’s impulse response function
    • Part 3 focuses on how to choose the optimal filter settings for a given type of study. You will learn to:
      • Conceptualize what it means for a filter to be optimal
      • Create artificial waveforms that resemble an experimental effect
      • Quantify the waveform distortion that occurs when a set of filters is applied to the artificial waveform
      • Quantify the improvement in data quality produced by each of a set of filters
      • Choose a filter that best balances data quality with waveform distortion

    You must use filters in ERP experiments. At a minimum, your amplifier’s hardware includes an antialiasing filter that must be used prior to digitizing the EEG. In almost all ERP experiments, additional filtering is important for reducing sources of noise that would otherwise create large measurement error and reduce your statistical power. However, when filters are misused, they can dramatically distort your data, leading to incorrect conclusions. As a result, it’s vitally important that you understand how filters work and the conditions under which they can significantly distort your ERP waveforms.

    Consider, for example, the waveforms shown below in Figure 4.1. This is a simulation of an experiment in which there are two conditions, A and B. If you were to describe these results in a journal article, you might say that both the N1 and P2 components are larger in Condition B than in Condition A. Or you might be more careful and say that there is greater extended negativity in Condition B than in Condition A up until the peak of the N1 wave, along with a greater positivity in the P2 latency range for condition B than for Condition A. But both of these descriptions contain a clear falsehood that is a result of filtering.

    Simulated Experiment
    Figure 4.1. Simulation of an experiment with two conditions, A and B.

    These waveforms were filtered using a combination of a 1 Hz high-pass filter and a 10 Hz low-pass filter (with a roll-off of 48 dB/octave). These would be somewhat unusual filter settings in some areas of research, but they would be fairly typical in others. And these filter settings created a completely artifactual effect in the early part of the waveform in Figure 4.1. I know with 100% certainty that the early effect is artifactual, because I simulated these waveforms so I know what the true effect is. These waveforms consist of a P1, an N1, and a P2, and the amplitude of the P2 is 50% larger in Condition B than in Condition A. The true effect does not contain a more negative voltage in Condition B than in Condition A at any time point. The more negative voltage prior to the N1 peak for Condition B in the filtered waveform is entirely an artifact of filtering.

    Can you imagine publishing a paper with these waveforms, concluding that there is a greater negativity for Condition B than for Condition A in the first part of the waveform, and later seeing a paper from another group of researchers demonstrating that your conclusion was based on a filtering artifact? That would be incredibly embarrassing. This sort of thing has actually happened. I don’t want it to happen to you, so this chapter takes a deep dive into how filters work in the time domain. You may already know how they work in the frequency domain, but ERPs are a time-domain phenomenon, and it is essential for ERP researchers to understand how filters work in the time domain.

    This chapter focused on giving you an intuitive, non-mathematical understanding of how filters work. If you want a more mathematical approach, see the free online Chapter 12 from An Introduction to the Event-Related Potential Technique.

    Should You Read This Entire Chapter?

    This chapter is divided into three parts. The first part (sections 4.1-4.5) provides some basic information about filters, including some practical recommendations for filter settings that work reasonably well for many kinds of ERP research. The second part (sections 4.6-4.10)  is more theoretical and is designed to provide you with an intuitive understanding of how filters work in the time domain. The third part (sections 4.11-4.16) is more practical and shows you how you can determine the optimal filter settings for your research with the help of some of the tools included in ERPLAB.

    If you are new to ERPs, I would recommend reading only the first part now. Once you have more experience, you can come back and read the second and third parts. 

    If you already have substantial ERP experience, I recommend that you read at least the first two parts. If you do research that yields relatively clean data (i.e., with cooperative participants, lots of trials, a gel-based EEG recording system, and a low-noise recording environment), you can skip the third part. But if you must deal with very noisy data, the third part will be important for you.
     


    This page titled 4: Filtering the EEG and ERPs was last modified on Thu, 01 Oct 2026 18:52:26 GMT and is shared under a CC BY-NC 4.0 license and was authored, remixed, and/or curated by Steven J Luck directly on the LibreTexts platform.

    • Was this article helpful?