PHASE 06 / DATA FORENSICS & STATISTICAL AUDITING
PhysioNet mcPHASES · N=42 Longitudinal Tracking Cohen's d = 0.27

Lunar — Wearable Health Data Audit

A rigorous analysis of wearable health tracker data from 42 women across monthly cycles: quantifying true physiological variation (Cohen's d = 0.27) and verifying an early biological warning signal 24 to 36 hours before cramps begin.

Cohort
42 Women (mcPHASES Dataset)
Sensors Tested
Heart Rate, HRV, Skin Temp
Effect Size
Cohen's d = 0.27
Key Takeaway
Check Data Before Building AI

Physiological Modeling in Real-World Health Data

In consumer health tech, analyzing real-world biosignals requires rigorous data auditing. Across multi-month health ring and smartwatch recordings from 42 women, I analyzed heart rate, heart rate variability, and skin temperature to isolate true biological trends.

My audit verified that cycle phase variation represents a realistic, subtle shift of Cohen's d = 0.27, while uncovering a reliable early warning dip in nighttime heart variability prior to cramp onset.

What was I trying to understand?

Can longitudinal wearable health trackers detect genuine hormonal and autonomic shifts across natural menstrual cycles, and can nighttime biosignals anticipate physical pain symptoms before they start?

⚡
The Focus: Separating genuine biological signals from wearable recording artifacts and battery gaps to establish trustworthy health markers.

Quantifying Longitudinal Missingness

A baseline availability audit across 42 participants revealed substantial gaps in continuous commercial wearable coverage:

Physiological Stream Overall Coverage (%) Missingness Profile Forensic Implication
Heart Rate (HR) 68.2% Periodic daytime dropouts, charging intervals Acceptable for rolling hourly baselines
Heart Rate Variability (HRV) 45.8% Extreme nocturnal skew, daytime motion rejection Cannot support continuous real-time classification
Skin Temperature (Temp) 52.1% Intermittent contact loss, ambient sensor resets Requires baseline calibration per wear segment
Symptom Logs (Cramps/Pain) Sparse Subjective recall delay (1–12 hours) Ground-truth timestamps require fuzzy onset windows

With HRV coverage at only 45.8%, any algorithm claiming to continuously forecast cycle transitions 24/7 in real time was mathematically unfeasible without imputing more than half the autonomic data stream.

Two Critical Architectural Pipeline Flaws

Diving into individual sample traces revealed two distinct software bugs that completely invalidated earlier published results:

BUG 01
Look-Back Window Truncation
To prevent across-session leakage, look-back windows were bounded to the current wear segment start (bounded_since = max(since, t_start)). Because the longest continuous wear segment was 31.25 hours, the DAILY (24h), WEEKLY (7d), and MONTHLY (30d) features were bounded to the exact same raw samples. As a result, daily, weekly, and monthly features were mathematically identical (correlation 1.000).
BUG 02
Noise Amplification by StandardScaler
Because daily and weekly means were identical, their difference feature was pure floating-point noise (std ≈ 10-6). When passed into Scikit-Learn's StandardScaler, dividing by 0.000003 amplified micro-precision numerical jitter by over 300,000x to force a unit variance of 1.0, turning numerical noise into the primary feature driving cluster separation.

Validated Effect Size: Cohen's d = 0.27

Across all 42 participants, statistical modeling of heart rate and autonomic variation between follicular and luteal phases yields:

📊
Validated Separation: Cohen's d = 0.27 across longitudinal cycle phases.

An effect size of 0.27 reflects a subtle, natural physiological shift across menstrual phases. This aligns with clinical literature on autonomic variation, confirming that physiological changes in consumer wearables are real but require multi-day tracking rather than single-day assumptions.

Primary Biological Finding: Early Cramp Warning

Across the longitudinal recordings, one genuine physical pattern proved consistent:

Early Physical Warning Before Cramps (HRV & Heart Rate)
Real Biological Pattern
Lunar — Pre-Cramp Onset Trajectory Deviation
Early Warning Signal: 24 to 36 hours before people reported painful cramps, their nighttime heart rate variability showed a distinct dip followed by an increase in resting heart rate. The body's nervous system senses inflammation coming a full day in advance.

Unlike the broken mathematical features, this early warning signal survived all verification tests, showing genuine potential for early alerts before physical pain starts.

What this experience taught me

"I stopped asking whether the machine learning model worked — and started asking whether the data was trustworthy in the first place."

1. If Numbers Look Too Good to Be True, They Are: When an algorithm claims an impossibly high score, don't celebrate—check your code for bugs and data leakage.

2. Missing Data is Normal: People take off smartwatches to shower or charge them. If your software assumes 24/7 continuous perfection, it will break.

3. Auditing Builds Better Devices: Rigorous data verification and uncovering genuine biological baselines is what real engineering is about. These findings directly shaped my next wearable platform, Novara.

Next Project: Novara — Wearable Health Platform

Novara — Wearable Physiological Monitoring Platform

Applying the lessons from Lunar: I built Novara from scratch with custom 4-layer hardware, combining electrical heart signals (ECG), optical pulse (PPG), body temperature, and motion to prevent false alarms.

Explore Novara Case Study