Total grouped sample size
DefinitionSampleRemoval_Supplement_totalObsleast-squaresoptimizationp2o-gran-per-chapterp2o-plan-paperp2o-v1robustness-auditsample-removal
For a one-way fixed-effects sample with group sizes , the total number of observations is
This is the deletion-count scale used by the group deletion curves and the min-plus audit.
Definition code
import Mathlib
import Definitions.Def_SampleRemoval_Supplement_FixedEffectsModel
set_option autoImplicit false
namespace SampleRemoval.Supplement
/-- The total number `n = Σ_g n_g` of observations in a grouped fixed-effects sample
(Xu, Gao, Hu, STOC 2027 submission, §4, p.7 (PDF p.9)). -/
def totalObs {Γ : ℕ} (M : FixedEffectsModel Γ) : ℕ :=
∑ g, M.nobs g
end SampleRemoval.Supplement
Source
Xu, Gao, Hu, Rounding, Ranges, and Exact Sample-Removal Audits for Least Squares, STOC 2027 submission (manuscript sha256 dcd33acebc1ccdc626c7ee41bfabc29795abe2e1cd9267d8cbd66d98f81c4b26), Section 4, p.7 (PDF p.9)