Method · Correlation · pearson_p_valueAs of 1 Dec
Pearson p-value
Two-tailed via the t-distribution: t = r·√df / √(1-r²), df = n-2; erf-based normal approximation with a small-df shrink z = t·√(df/(df+2)) below df=30
WindowTakes fractional n, so it composes directly with effective_sample_size's autocorrelation-corrected n_eff rather than the raw observation count. Minimum n— Used bycorrelation_report (the ONE correlation-reporting helper, replacing 6 duplicate copies), tools_training.
Limitations
None when |r| ≥ 1 or n ≤ 2. Accurate to ~3 decimals for df > 10, conservative (slightly wider) below — a stated intentional trade-off, not an unhandled edge case. Always compute on n_eff for daily series, never raw n (ADR-105).