Simple-regression cross-scatter
DefinitionSampleRemoval_Supplement_crossScatterleast-squaresoptimizationp2o-gran-per-chapterp2o-plan-paperp2o-v1robustness-auditsample-removal
For retained planar observations , the cross-scatter is
Whenever the simple-regression slope is defined, its sign is the sign of . All theorem uses have .
Definition code
import Mathlib
set_option autoImplicit false
namespace SampleRemoval.Supplement
/-- The simple-regression cross-scatter `F(S) = Σ_S xᵢyᵢ - (Σ_S xᵢ)(Σ_S yᵢ)/|S|`
(Xu, Gao, Hu, STOC 2027 submission, eq. (1), p.4 (PDF p.6)). At `S=∅` all sums vanish,
so the total real division convention also gives zero; every theorem uses sets of size at least two. -/
noncomputable def crossScatter {n : ℕ} (p : Fin n → ℝ × ℝ) (S : Finset (Fin n)) : ℝ :=
∑ i ∈ S, (p i).1 * (p i).2 -
((∑ i ∈ S, (p i).1) * (∑ i ∈ S, (p i).2)) / (S.card : ℝ)
end SampleRemoval.Supplement
Source
Xu, Gao, Hu, Rounding, Ranges, and Exact Sample-Removal Audits for Least Squares, STOC 2027 submission (manuscript sha256 dcd33acebc1ccdc626c7ee41bfabc29795abe2e1cd9267d8cbd66d98f81c4b26), Sections 2 and 5, pp.3,8 (PDF pp.5,10)