{"abstract":"The ratio of means incorrectly forces the fitted line through zero.","category":"Statistics","checks":4,"contract":"Integer finite observations and equal lengths for paired samples. Counts and weights are nonnegative. Rational results use reduced Fraction strings. Empty or undefined statistics return None where shown. Fit y=intercept+slope*x by least squares; return None when x variance is zero, including empty input. Exact operational definition: str(Fraction(len(x)*sum(a*b for a,b in zip(x,y))-sum(x)*sum(y),len(x)*sum(a*a for a in x)-sum(x)**2)) if len(x)*sum(a*a for a in x)!=sum(x)**2 else None","evaluation_group":"model-6001e925100924ca","failed_approach":"Dependent-variable variance replaces independent-variable variance.","family":"xn-linear-regression-slope-rational","id":"FA-6246","implementations":{"attempt":{"sha256":"1723bf98656ba35378e04bf30d78e1f21d9dfaf7f0ad60fc809178bac0bcf034","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport calendar\nimport statistics\nimport itertools\nfrom fractions import Fraction\nfrom datetime import date, datetime, timedelta, timezone\nfrom decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR\n\nN = 1\nobservations = []\ndef solve(x, y):\n    return str(Fraction(len(x)*sum(a*b for a,b in zip(x,y))-sum(x)*sum(y),len(x)*sum(b*b for b in y)-sum(y)**2)) if len(x)*sum(b*b for b in y)!=sum(y)**2 else None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1: ([1, 2, 3], [3, 5, 7])', solve(*([1, 2, 3], [3, 5, 7])), '2')\ncheck('fixture 2: ([1, 2, 3], [3, 2, 1])', solve(*([1, 2, 3], [3, 2, 1])), '-1')\ncheck('fixture 3: ([1, 1], [2, 3])', solve(*([1, 1], [2, 3])), None)\ncheck('fixture 4: ([0, 1], [2, 2])', solve(*([0, 1], [2, 2])), '0')\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"b5c822a33bc653dc7f35baf9fd8ebfc8a45c78c2e38523f6a1615638dce0a05a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport calendar\nimport statistics\nimport itertools\nfrom fractions import Fraction\nfrom datetime import date, datetime, timedelta, timezone\nfrom decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR\n\nN = 1\nobservations = []\ndef solve(x, y):\n    return str(Fraction(sum(y),sum(x))) if sum(x) else None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1: ([1, 2, 3], [3, 5, 7])', solve(*([1, 2, 3], [3, 5, 7])), '2')\ncheck('fixture 2: ([1, 2, 3], [3, 2, 1])', solve(*([1, 2, 3], [3, 2, 1])), '-1')\ncheck('fixture 3: ([1, 1], [2, 3])', solve(*([1, 1], [2, 3])), None)\ncheck('fixture 4: ([0, 1], [2, 2])', solve(*([0, 1], [2, 2])), '0')\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"11003650346ceae33747e10e6a637ad5df5eabeb82e904b0f9883fe2068916d5","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport calendar\nimport statistics\nimport itertools\nfrom fractions import Fraction\nfrom datetime import date, datetime, timedelta, timezone\nfrom decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR\n\nN = 1\nobservations = []\ndef solve(x, y):\n    return str(Fraction(len(x)*sum(a*b for a,b in zip(x,y))-sum(x)*sum(y),len(x)*sum(a*a for a in x)-sum(x)**2)) if len(x)*sum(a*a for a in x)!=sum(x)**2 else None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1: ([1, 2, 3], [3, 5, 7])', solve(*([1, 2, 3], [3, 5, 7])), '2')\ncheck('fixture 2: ([1, 2, 3], [3, 2, 1])', solve(*([1, 2, 3], [3, 2, 1])), '-1')\ncheck('fixture 3: ([1, 1], [2, 3])', solve(*([1, 1], [2, 3])), None)\ncheck('fixture 4: ([0, 1], [2, 2])', solve(*([0, 1], [2, 2])), '0')\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":" 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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"xn-linear-regression-slope-rational","generated_at":"2026-09-29T14:37:59.417271+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Small exact fixtures expose this error without platform timing, external services, or probabilistic observations. Statistical estimators results depend on the stated convention.","repair":"Apply the specified mathematical contract directly, preserving all terms and boundary cases: return str(Fraction(len(x)*sum(a*b for a,b in zip(x,y))-sum(x)*sum(y),len(x)*sum(a*a for a in x)-sum(x)**2)) if len(x)*sum(a*a for a in x)!=sum(x)**2 else None","root_cause":"The ratio of means incorrectly forces the fitted line through zero.","sha256":"2a5ae9ca5f21d4fcdc5f52076631f10f24cec48cba0054c6f7fd12b7a533836d","title":"Linear regression slope rational · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.726,"exit_code":1,"observations":[{"actual":"1/2","check":"fixture 1: ([1, 2, 3], [3, 5, 7])","expected":"2","passed":false},{"actual":"-1","check":"fixture 2: ([1, 2, 3], [3, 2, 1])","expected":"-1","passed":true},{"actual":"0","check":"fixture 3: ([1, 1], [2, 3])","expected":null,"passed":false},{"actual":null,"check":"fixture 4: ([0, 1], [2, 2])","expected":"0","passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1: ([1, 2, 3], [3, 5, 7])\", \"actual\": \"1/2\", \"expected\": \"2\", \"passed\": false}, {\"check\": \"fixture 2: ([1, 2, 3], [3, 2, 1])\", \"actual\": \"-1\", \"expected\": \"-1\", \"passed\": true}, {\"check\": \"fixture 3: ([1, 1], [2, 3])\", \"actual\": \"0\", \"expected\": null, \"passed\": false}, {\"check\": \"fixture 4: ([0, 1], [2, 2])\", \"actual\": null, \"expected\": \"0\", \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.041,"exit_code":1,"observations":[{"actual":"5/2","check":"fixture 1: ([1, 2, 3], [3, 5, 7])","expected":"2","passed":false},{"actual":"1","check":"fixture 2: ([1, 2, 3], [3, 2, 1])","expected":"-1","passed":false},{"actual":"5/2","check":"fixture 3: ([1, 1], [2, 3])","expected":null,"passed":false},{"actual":"4","check":"fixture 4: ([0, 1], [2, 2])","expected":"0","passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1: ([1, 2, 3], [3, 5, 7])\", \"actual\": \"5/2\", \"expected\": \"2\", \"passed\": false}, {\"check\": \"fixture 2: ([1, 2, 3], [3, 2, 1])\", \"actual\": \"1\", \"expected\": \"-1\", \"passed\": false}, {\"check\": \"fixture 3: ([1, 1], [2, 3])\", \"actual\": \"5/2\", \"expected\": null, \"passed\": false}, {\"check\": \"fixture 4: ([0, 1], [2, 2])\", \"actual\": \"4\", \"expected\": \"0\", \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":45.705,"exit_code":0,"observations":[{"actual":"2","check":"fixture 1: ([1, 2, 3], [3, 5, 7])","expected":"2","passed":true},{"actual":"-1","check":"fixture 2: ([1, 2, 3], [3, 2, 1])","expected":"-1","passed":true},{"actual":null,"check":"fixture 3: ([1, 1], [2, 3])","expected":null,"passed":true},{"actual":"0","check":"fixture 4: ([0, 1], [2, 2])","expected":"0","passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1: ([1, 2, 3], [3, 5, 7])\", \"actual\": \"2\", \"expected\": \"2\", \"passed\": true}, {\"check\": \"fixture 2: ([1, 2, 3], [3, 2, 1])\", \"actual\": \"-1\", \"expected\": \"-1\", \"passed\": true}, {\"check\": \"fixture 3: ([1, 1], [2, 3])\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"fixture 4: ([0, 1], [2, 2])\", \"actual\": \"0\", \"expected\": \"0\", \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}