✦ Day 15 · Time-Frequency Analysis

Multitaper
Spectral Analysis

Master the Prerau Lab (Stanford/Harvard MGH) multitaper framework — leveraging orthogonal DPSS Slepian tapers to minimize spectral variance and maximize degrees of freedom without discarding boundary data.

🎓 Prerau Lab (Stanford/Harvard) 🧺 DPSS / Slepian Tapers ⚖ Time-Bandwidth TW = N·W 📊 Degrees of Freedom (2K) 🐍 compute_tfr('multitaper')

While Morlet wavelets (Day 14) and single-taper Fourier transforms are widely used, standard periodograms suffer from high spectral variance and spatial data loss. Following the principled framework established by Dr. Michael Prerau (Prerau Lab, Stanford/Harvard MGH), Multitaper Spectral Analysis provides an optimal, mathematically rigorous solution to spectral estimation by utilizing multiple orthogonal Discrete Prolate Spheroidal Sequences (DPSS / Slepian tapers).


1

The Problem with Single Tapers
Variance Invariance & Edge Data Discard

Traditional periodograms and single-taper methods (Hanning, Hamming) suffer from two major flaws:

1. Invariant Variance: The variance of a standard periodogram is proportional to the square of the true spectrum: Var[&hat;S(f)] ≈ S(f)². Crucially, increasing the window length N does not reduce this variance!

2. Data Loss at Boundaries: Standard tapers attenuate signal at the edges of the window to prevent spectral leakage, effectively discarding ~50% of the underlying EEG data.

Prerau Lab Insight: Multitaper spectral estimation (originally pioneered by David Thomson and expanded by the Prerau Lab for sleep & neural electrophysiology) uses multiple mutually orthogonal Slepian tapers to recover data lost at window edges while dramatically reducing spectral variance.


2

The Multitaper Parameter Framework
N, W, TW, K & Degrees of Freedom

Multitaper estimation is governed by five interdependent parameters:

Window Duration (N or T): Length of the data window in seconds.
Frequency Half-Bandwidth (W): Half of the total frequency smoothing ($\Delta f = 2W$).
Time-Bandwidth Product (TW = N · W): Dimensionless product controlling smoothing vs. variance reduction.
Number of Tapers (K = 2TW − 1): Number of orthogonal DPSS tapers retained.
Degrees of Freedom (DOF = 2K): Determines the statistical stability of the estimate ($\chi²_{2K}$ distribution).

Var[&hat;Smt(f)] ≈ (1 / K) · S(f)²

By averaging across K orthogonal DPSS spectral estimates, variance is reduced by a factor of 1/K!

High Frequency Resolution

Small W (e.g., W = 0.5 Hz $\rightarrow \Delta f = 1$ Hz).
Preserves narrow oscillatory peaks (alpha, sleep spindles), lower K.

High Variance Reduction

Larger W (e.g., W = 2 Hz $\rightarrow \Delta f = 4$ Hz).
Retains more tapers K. Ideal for noisy broadband gamma signals & continuous spectrograms.


3

Prerau Lab Recommended Guidelines
Sleep & Neural Time-Frequency Spectrograms

In Prerau et al. (2017) (Physiology) and the Prerau Lab Sleep EEG Multitaper Tutorial, standard parameterizations are recommended for high-resolution EEG time-frequency tracking:

Window Length N: 2.0 s to 5.0 s sliding windows.
Frequency Smoothing: $\Delta f = 2W = 1.0$ Hz to .0$ Hz.
Step Size / Overlap: 0.1 s to 1.0 s step size (80% to 90% overlap for smooth dynamic spectrograms).

Python
import mne
import numpy as np

# Prerau Lab Multitaper Parameters
N = 4.0         # 4-second window
W = 1.0         # Half-bandwidth = 1 Hz (Resolution df = 2 Hz)
TW = N * W      # Time-Bandwidth Product = 4.0
K = int(2 * TW - 1)  # K = 7 DPSS tapers (DOF = 14)

print(f"Multitaper Setup: TW={TW}, Tapers K={K}, Degrees of Freedom={2*K}")

# Compute MNE Multitaper Spectrogram
freqs = np.arange(1.0, 35.0, 0.5)
tfr_mt = epochs.compute_tfr(
    method='multitaper',
    freqs=freqs,
    n_cycles=freqs * (N / 2.0),
    time_bandwidth=TW * 2.0,
    return_itc=False
)

tfr_mt.plot([0], baseline=(-0.3, 0), mode='logratio')

Resource Link: Check Dr. Michael Prerau’s official laboratory resources at sleepeeg.org/multitaper and the preraulab/multitaper_toolbox on GitHub for Python/MATLAB implementations.