FAILURE MAP
← Case archive

FA-13156 / Numerical aggregation / Open access

Frequency central scatter: Absolute deviations are substituted for squared deviations. · case 01

The reduction disagrees with its explicit aggregation oracle.

Verified by executionVariant 1 · 9 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

Absolute deviations are substituted for squared deviations.

THE FAILURE

Absolute deviations are substituted for squared deviations.

Unsuccessful approach: Subtracting the center after squaring has no centering interpretation.

Case contract

Rows [integer value, nonnegative frequency] represent replicated observations. Return unnormalised sum of squared deviations from their exact replicated mean as a Fraction string; zero total frequency returns None.

Why this case matters

Exact bounded examples isolate a reduction defect without floating-point or external-service effects.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
from collections import Counter, defaultdict
import math
import itertools
N = 1
observations = []
def solve(rows):
    total=sum(w for x,w in rows)
    if total==0: return None
    center=Fraction(sum(x*w for x,w in rows),total)
    return str(sum(w*abs(x-center) for x,w in rows))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('regression 1', solve(*([(1, 2), (1, 2), (4, 1)],)), '36/5')
check('regression 2', solve(*([(1, 2), (4, 1)],)), '6')
check('regression 3', solve(*([(0, 1), (0, 3)],)), '0')
check('regression 4', solve(*([],)), None)
check('regression 5', solve(*([(3, 0), (8, 0)],)), None)
check('regression 6', solve(*([(9, 1), (-2, 3), (5, 2)],)), '689/6')
check('regression 7', solve(*([(7, 3), (1, 0)],)), '0')
check('regression 8', solve(*([(1, 1), (2, 1), (5, 1)],)), '26/3')
check("variable replication scatter",solve([(0,N),(2,N)]),str(2*N))
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
regression 124/536/5Failed
regression 246Failed
regression 300Passed
regression 4NoneNonePassed
regression 5NoneNonePassed
regression 625689/6Failed
regression 700Passed
regression 814/326/3Failed
variable replication scatter22Passed

SHA-256 / ace8ce7930f172e2f0e459ad92f0f31ee557604c2b8fcd694faa8877bb42bd88

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
from collections import Counter, defaultdict
import math
import itertools
N = 1
observations = []
def solve(rows):
    total=sum(w for x,w in rows)
    if total==0: return None
    center=Fraction(sum(x*w for x,w in rows),total)
    return str(sum(abs(w*(x-center)**2-center) for x,w in rows))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('regression 1', solve(*([(1, 2), (1, 2), (4, 1)],)), '36/5')
check('regression 2', solve(*([(1, 2), (4, 1)],)), '6')
check('regression 3', solve(*([(0, 1), (0, 3)],)), '0')
check('regression 4', solve(*([],)), None)
check('regression 5', solve(*([(3, 0), (8, 0)],)), None)
check('regression 6', solve(*([(9, 1), (-2, 3), (5, 2)],)), '689/6')
check('regression 7', solve(*([(7, 3), (1, 0)],)), '0')
check('regression 8', solve(*([(1, 1), (2, 1), (5, 1)],)), '26/3')
check("variable replication scatter",solve([(0,N),(2,N)]),str(2*N))
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
regression 1148/2536/5Failed
regression 226Failed
regression 300Passed
regression 4NoneNonePassed
regression 5NoneNonePassed
regression 6325/3689/6Failed
regression 7140Failed
regression 846/926/3Failed
variable replication scatter02Failed

SHA-256 / b9f95e681831fe072d8063265efcfce97b7803b6a974768782db3a3cc5b76818

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 9 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

Verification & scope

Small offline integer/rational inputs only; no performance, statistical inference, or production-library conformance claim. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.

Observations recorded using Python 3.12.14 at 2026-09-29T14:39:04.229740+00:00.

Case digest / 5658433368b539948f14fd8de26c35b82c7a064d7dc989ca6d3e3deb879015ca