FAILURE MAP
← Case archive

FA-12631 / Survey sampling estimators / Open access

Fay replicate shrinkage understates variance · case 01

Fay replicate shrinkage understates variance.

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

ROOT CAUSE

BRR replicate deviations are averaged without undoing Fay shrinkage.

VERIFIED REPAIR

Divide the average squared deviation from full estimate by (1-rho)^2.

Unsuccessful approach: Centering on the replicate mean erases a common replicate displacement.

Case contract

replicates are nonempty estimates; rho lies in [0,1). Return Fay BRR variance using the supplied full estimate as center, rounded to eight decimals.

Why this case matters

A deterministic survey-design model isolates this sampling contract before it is embedded in a larger estimation pipeline.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(full, replicates, rho):
    return round(sum((r-full)**2 for r in replicates)/len(replicates),8)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('half shrinkage',solve(N,[N-1,N+1],0.5),4)
check('common displacement',solve(N,[N+1,N+1],0.5),4)
check('ordinary BRR boundary',solve(N,[N-2,N+2],0),4)
check('identical full replicates',solve(N,[N,N],0.5),0)
check('asymmetric deviations',solve(N,[N,N+2],0.5),8)
check('quarter residual scale',solve(N,[N-1,N+1],0.75),16)
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
half shrinkage1.04Failed
common displacement1.04Failed
ordinary BRR boundary4.04Passed
identical full replicates0.00Passed
asymmetric deviations2.08Failed
quarter residual scale1.016Failed

SHA-256 / f4cea12721da88ba9b689fb8c488175950ead340cf82b6a4f620acfdfc44905a

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(full, replicates, rho):
    center=sum(replicates)/len(replicates)
    return round(sum((r-center)**2 for r in replicates)/(len(replicates)*(1-rho)**2),8)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('half shrinkage',solve(N,[N-1,N+1],0.5),4)
check('common displacement',solve(N,[N+1,N+1],0.5),4)
check('ordinary BRR boundary',solve(N,[N-2,N+2],0),4)
check('identical full replicates',solve(N,[N,N],0.5),0)
check('asymmetric deviations',solve(N,[N,N+2],0.5),8)
check('quarter residual scale',solve(N,[N-1,N+1],0.75),16)
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
half shrinkage4.04Passed
common displacement0.04Failed
ordinary BRR boundary4.04Passed
identical full replicates0.00Passed
asymmetric deviations4.08Failed
quarter residual scale16.016Passed

SHA-256 / 9332ca8de8f98643d9261ace85eca8e9dcc7013c0e96c1d033efc4d9ccaa3f0a

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(full, replicates, rho):
    return round(sum((r-full)**2 for r in replicates)/(len(replicates)*(1-rho)**2),8)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('half shrinkage',solve(N,[N-1,N+1],0.5),4)
check('common displacement',solve(N,[N+1,N+1],0.5),4)
check('ordinary BRR boundary',solve(N,[N-2,N+2],0),4)
check('identical full replicates',solve(N,[N,N],0.5),0)
check('asymmetric deviations',solve(N,[N,N+2],0.5),8)
check('quarter residual scale',solve(N,[N-1,N+1],0.75),16)
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
half shrinkage4.04Passed
common displacement4.04Passed
ordinary BRR boundary4.04Passed
identical full replicates0.00Passed
asymmetric deviations8.08Passed
quarter residual scale16.016Passed

SHA-256 / 4e0d2d57091ee5b2503eb6e300606a66d836fe9041334c3ed1888007b25b66e5

Verification & scope

Controlled finite fixtures; not a general survey-analysis package. 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:38:58.748365+00:00.

Case digest / 57021b261efc019db998bb25e250d7e84af6b13e9f90c97ec9ec49e060fa1541