ECG (electrocardiography, sometimes EKG) is the measurement of the electrical activity of the heart through electrodes placed on the skin. Each heartbeat produces a stereotyped voltage waveform: a small P wave (~0.1-0.25 mV), a sharp tall spike called the QRS complex with an R-wave amplitude of ~1 mV, and a longer T wave afterward (~0.1-0.25 mV). The pattern is regular and informative — irregularities in the timing or shape are diagnostic of many cardiac conditions. Resting heart rate sits in the 60-100 bpm range, corresponding to one QRS complex roughly every 0.6-1.0 s. The diagnostic frequency content lives between about 0.5 Hz and 40 Hz for monitoring (up to ~150 Hz for high-fidelity diagnostic ECG).
ECG recordings vary in cleanness depending on collection setting. A hospital ECG is clean: patient lying still, leads correctly placed, electrically shielded room, professional equipment. A wearable ECG-like signal — from a smartwatch or fitness band on someone going about their day — is much noisier: the leads move, the wearer is active, the device’s electronics are cheaper. This is the Lab vs in-the-wild data tradeoff in concrete form.
Several preprocessing steps are routine. Baseline wander from breathing (~0.2-0.3 Hz, well below the QRS band) is a Low-frequency noise artifact that a high-pass operation removes. Electrical interference from nearby equipment is High-frequency noise that a Moving-average filter reduces. The peak of each heartbeat lets us segment the signal into per-beat windows for Feature extraction — typically the maximum, minimum, mean, Standard deviation, Skewness, and Kurtosis within each window.
ECG is the running motivating example throughout the Introduction to Data Science textbook: it appears in chapters on Data collection, visualization, preprocessing, and classification. The pattern of cardiac signal → noisy recording → cleaned signal → features → classifier recurs across many Sensor applications, and ECG is just the most familiar instance.