Average Joe Matt
Method · Correlation · pearson_rAs of 1 Dec

Pearson correlation (r)

r = Σ(x-x̄)(y-ȳ) / √(Σ(x-x̄)² · Σ(y-ȳ)²), clamped to [-1, 1]
WindowWhatever paired series the caller passes in — the function has no lookback of its own. The platform's primary caller, the weekly correlation compute, passes a 90-day rolling window (LOOKBACK_DAYS). Minimum n3 Used byThe correlation engine (/method/intelligence/), tools_training zone-2 and exercise-efficiency correlations, get_cross_source_correlation.

Limitations

Requires n ≥ min_n (default 3, callers commonly raise this to 5); returns None below that threshold or when either series has zero variance. Measures linear association only — a real non-linear relationship can score near zero. Not corrected for day-to-day autocorrelation on its own (see effective_sample_size) — a raw r without the effective-n-based p-value/CI overstates confidence on daily physiological series.