Chapter 3 — The Frequency-Domain View
Think of it like this: that squiggly EEG line is actually several instruments playing at the same time, mixed into one sound — like a whole band recorded through a single microphone, or a smoothie that's already been blended. You can't see the individual strawberry or banana pieces anymore, and you can't tell by ear alone how loud the bass is right now from the mixed track. A spectrogram is a tool (mathematically, a Fourier transform) that unmixes the recording back into its separate ingredients over time — like a lab test that tells you exactly what proportion of strawberry versus banana went into the smoothie, except here the "ingredients" are frequency bands and the result updates continuously.
The Five Instruments
Each band has its own speed, its own "instrument," and — tying straight back to Chapter 2 — its own relationship to a sleep stage:
- Delta (0.5–4 Hz) — the bass drum. Slow and huge. Dominates N3, the deepest sleep floor.
- Theta (4–8 Hz) — the cello. Shows up in N1 and REM — the exact same two stages that are hardest to tell apart, which is not a coincidence: their frequency content genuinely overlaps.
- Alpha (8–12 Hz) — the violin. The brain's idle hum: relaxed, eyes closed, still awake.
- Sigma (12–16 Hz) — the bell. The spindle band specifically — this is the frequency range those N2 "dings" from Chapter 2 actually live in.
- Beta (16–30 Hz) — the trumpet. Fast and busy. Alert wakefulness, active thinking.
Why This Matters for What's Next
This isn't just a nicer way to look at the same data. Chapter 4's classical machine-learning baseline is literally fed band-power numbers — how much delta, how much theta, and so on, per 30-second epoch — as its main ingredients. Computing a spectrogram is the "prep the ingredients" step before any classifier can start cooking. Everything in Part 2 builds directly on what you're about to compute in this chapter's lab.
Try It: Frequency Band Match
The next lesson is a game built around exactly these five bands — match each instrument to its waveform speed before the lab makes you do the real computation.
THE LAB
You'll compute a real spectrogram across a full night from the same recording used in Chapters 1 and 2, plot it directly above the expert's hypnogram, and watch delta glow brightest exactly where the label says N3.
DONE WHEN
You can point at a spot on a spectrogram and guess the sleep stage before checking the hypnogram underneath it.
That's Part 1 complete. Part 2 turns this same idea — band power per epoch — into actual numbers a classifier can learn from.