{"abstract":"No-vig prices come out shorter than the quoted prices.","category":"Betting odds conversion","checks":7,"contract":"Market book analysis for decimal prices (strings, each > 1, else \"invalid\"). Implied probability is 1/d; book = sum of implied probabilities. Return [overround percent (book - 1) * 100, bookmaker margin percent (1 - 1/book) * 100, fair prices d * book for proportional margin removal], every number rounded half up to two decimals (negative values are rounded toward +infinity at the half) and formatted with two decimals.","contract_signature":"prices","evaluation_group":"w2-odds-conversion-book-overround-fair-odds","failed_approach":"Adding the overround as a flat amount is the additive method, not proportional removal.","family":"w2-odds-conversion-book-overround-fair-odds-fair-price-direction","id":"FA-84416","implementations":{"attempt":{"sha256":"53cab83fc5458a98fc6ed5f34c84e520a1b0bb1bd63a6bf29da9bd9e0a9e9e90","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nimport math\nN = 1\nobservations = []\ndef solve(prices):\n    def fmt(x):\n        c = math.floor(x * 100 + Fraction(1, 2))\n        sign = '-' if c < 0 else ''\n        c = abs(c)\n        return sign + '%d.%02d' % (c // 100, c % 100)\n    ds = [Fraction(p) for p in prices]\n    if any(d <= 1 for d in ds):\n        return 'invalid'\n    book = sum(1 / d for d in ds)\n    over = (book - 1) * 100\n    margin = (1 - 1 / book) * 100\n    fair = [fmt(d + (book - 1)) for d in ds]\n    return [fmt(over), fmt(margin), fair]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ndef run(args):\n    try:\n        return solve(*args)\n    except Exception as exc:\n        return 'raised ' + type(exc).__name__\ncases = [[('control fair coin', (['2.00', '2.00'],), ['0.00', '0.00', ['2.00', '2.00']]),\n  ('control standard juice', (['1.91', '1.91'],), ['4.71', '4.50', ['2.00', '2.00']]),\n  ('boundary three-way', (['2.50', '3.20', '2.90'],), ['5.73', '5.42', ['2.64', '3.38', '3.07']]),\n  ('boundary no-profit price', (['1.00', '5.00'],), 'invalid'),\n  ('regression: fair price direction',\n   (['4.28', '3.78', '1.86'],),\n   ['3.58', '3.46', ['4.43', '3.92', '1.93']]),\n  ('variant scenario 1',\n   (['2.38', '9.10', '1.69'],),\n   ['12.18', '10.86', ['2.67', '10.21', '1.90']]),\n  ('variant scenario 2', (['3.25', '2.80', '2.78'],), ['2.45', '2.40', ['3.33', '2.87', '2.85']])],\n [('control fair coin', (['2.00', '2.00'],), ['0.00', '0.00', ['2.00', '2.00']]),\n  ('control standard juice', (['1.91', '1.91'],), ['4.71', '4.50', ['2.00', '2.00']]),\n  ('boundary three-way', (['2.50', '3.20', '2.90'],), ['5.73', '5.42', ['2.64', '3.38', '3.07']]),\n  ('boundary no-profit price', (['1.00', '5.00'],), 'invalid'),\n  ('regression: fair price direction',\n   (['4.98', '3.07', '3.86', '5.09'],),\n   ['-1.79', '-1.83', ['4.89', '3.01', '3.79', '5.00']]),\n  ('variant scenario 1', (['2.65', '9.18', '1.83'],), ['3.27', '3.17', ['2.74', '9.48', '1.89']]),\n  ('variant scenario 2', (['2.11', '4.77', '2.91'],), ['2.72', '2.65', ['2.17', '4.90', '2.99']])],\n [('control fair coin', (['2.00', '2.00'],), ['0.00', '0.00', ['2.00', '2.00']]),\n  ('control standard juice', (['1.91', '1.91'],), ['4.71', '4.50', ['2.00', '2.00']]),\n  ('boundary three-way', (['2.50', '3.20', '2.90'],), ['5.73', '5.42', ['2.64', '3.38', '3.07']]),\n  ('boundary no-profit price', (['1.00', '5.00'],), 'invalid'),\n  ('regression: fair price direction', (['1.36', '3.90'],), ['-0.83', '-0.84', ['1.35', '3.87']]),\n  ('variant scenario 1', (['1.12', '6.59'],), ['4.46', '4.27', ['1.17', '6.88']]),\n  ('variant scenario 2', (['1.86', '1.65'],), ['14.37', '12.56', ['2.13', '1.89']])],\n [('control fair coin', (['2.00', '2.00'],), ['0.00', '0.00', ['2.00', '2.00']]),\n  ('control standard juice', (['1.91', '1.91'],), ['4.71', '4.50', ['2.00', '2.00']]),\n  ('boundary three-way', (['2.50', '3.20', '2.90'],), ['5.73', '5.42', ['2.64', '3.38', '3.07']]),\n  ('boundary no-profit price', (['1.00', '5.00'],), 'invalid'),\n  ('regression: fair price direction', (['1.99', '1.97'],), ['1.01', '1.00', ['2.01', '1.99']]),\n  ('variant scenario 1', (['2.21', '2.07', '7.52'],), ['6.86', '6.42', ['2.36', '2.21', '8.04']]),\n  ('variant scenario 2', (['1.37', '3.08'],), ['5.46', '5.18', ['1.44', '3.25']])],\n [('control fair coin', (['2.00', '2.00'],), ['0.00', '0.00', ['2.00', '2.00']]),\n  ('control standard juice', (['1.91', '1.91'],), ['4.71', '4.50', ['2.00', '2.00']]),\n  ('boundary three-way', (['2.50', '3.20', '2.90'],), ['5.73', '5.42', ['2.64', '3.38', '3.07']]),\n  ('boundary no-profit price', (['1.00', '5.00'],), 'invalid'),\n  ('regression: fair price direction',\n   (['1.67', '6.50', '3.71'],),\n   ['2.22', '2.17', ['1.71', '6.64', '3.79']]),\n  ('variant scenario 1', (['5.20', '1.15'],), ['6.19', '5.83', ['5.52', '1.22']]),\n  ('variant scenario 2',\n   (['7.11', '3.30', '9.10', '2.32'],),\n   ['-1.54', '-1.56', ['7.00', '3.25', '8.96', '2.28']])]]\nfor label, args, expected in cases[N - 1]:\n    check(label, run(args), expected)\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":"a0c4f28a22862f0a4962b90db32ff8391d250457b393d0cc761f15b8c6e67cdd","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nimport math\nN = 1\nobservations = []\ndef solve(prices):\n    def fmt(x):\n        c = math.floor(x * 100 + Fraction(1, 2))\n        sign = '-' if c < 0 else ''\n        c = abs(c)\n        return sign + '%d.%02d' % (c // 100, c % 100)\n    ds = [Fraction(p) for p in prices]\n    if any(d <= 1 for d in ds):\n        return 'invalid'\n    book = sum(1 / d for d in ds)\n    over = (book - 1) * 100\n    margin = (1 - 1 / book) * 100\n    fair = [fmt(d / book) for d in ds]\n    return [fmt(over), fmt(margin), fair]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ndef run(args):\n    try:\n        return solve(*args)\n    except Exception as exc:\n        return 'raised ' + type(exc).__name__\ncases = [[('control fair coin', (['2.00', '2.00'],), ['0.00', '0.00', ['2.00', '2.00']]),\n  ('control standard juice', (['1.91', '1.91'],), ['4.71', '4.50', ['2.00', '2.00']]),\n  ('boundary three-way', (['2.50', '3.20', '2.90'],), ['5.73', '5.42', ['2.64', '3.38', '3.07']]),\n  ('boundary no-profit price', (['1.00', '5.00'],), 'invalid'),\n  ('regression: fair price direction',\n   (['4.28', '3.78', '1.86'],),\n   ['3.58', '3.46', ['4.43', '3.92', '1.93']]),\n  ('variant scenario 1',\n   (['2.38', '9.10', '1.69'],),\n   ['12.18', '10.86', ['2.67', '10.21', '1.90']]),\n  ('variant scenario 2', (['3.25', '2.80', '2.78'],), ['2.45', '2.40', ['3.33', '2.87', '2.85']])],\n [('control fair coin', (['2.00', '2.00'],), ['0.00', '0.00', ['2.00', '2.00']]),\n  ('control standard juice', (['1.91', '1.91'],), ['4.71', '4.50', ['2.00', '2.00']]),\n  ('boundary three-way', (['2.50', '3.20', '2.90'],), ['5.73', '5.42', ['2.64', '3.38', '3.07']]),\n  ('boundary no-profit price', (['1.00', '5.00'],), 'invalid'),\n  ('regression: fair price direction',\n   (['4.98', '3.07', '3.86', '5.09'],),\n   ['-1.79', '-1.83', ['4.89', '3.01', '3.79', '5.00']]),\n  ('variant scenario 1', (['2.65', '9.18', '1.83'],), ['3.27', '3.17', ['2.74', '9.48', '1.89']]),\n  ('variant scenario 2', (['2.11', '4.77', '2.91'],), ['2.72', '2.65', ['2.17', '4.90', '2.99']])],\n [('control fair coin', (['2.00', '2.00'],), ['0.00', '0.00', ['2.00', '2.00']]),\n  ('control standard juice', (['1.91', '1.91'],), ['4.71', '4.50', ['2.00', '2.00']]),\n  ('boundary three-way', (['2.50', '3.20', '2.90'],), ['5.73', '5.42', ['2.64', '3.38', '3.07']]),\n  ('boundary no-profit price', (['1.00', '5.00'],), 'invalid'),\n  ('regression: fair price direction', (['1.36', '3.90'],), ['-0.83', '-0.84', ['1.35', '3.87']]),\n  ('variant scenario 1', (['1.12', '6.59'],), ['4.46', '4.27', ['1.17', '6.88']]),\n  ('variant scenario 2', (['1.86', '1.65'],), ['14.37', '12.56', ['2.13', '1.89']])],\n [('control fair coin', (['2.00', '2.00'],), ['0.00', '0.00', ['2.00', '2.00']]),\n  ('control standard juice', (['1.91', '1.91'],), ['4.71', '4.50', ['2.00', '2.00']]),\n  ('boundary three-way', (['2.50', '3.20', '2.90'],), ['5.73', '5.42', ['2.64', '3.38', '3.07']]),\n  ('boundary no-profit price', (['1.00', '5.00'],), 'invalid'),\n  ('regression: fair price direction', (['1.99', '1.97'],), ['1.01', '1.00', ['2.01', '1.99']]),\n  ('variant scenario 1', (['2.21', '2.07', '7.52'],), ['6.86', '6.42', ['2.36', '2.21', '8.04']]),\n  ('variant scenario 2', (['1.37', '3.08'],), ['5.46', '5.18', ['1.44', '3.25']])],\n [('control fair coin', (['2.00', '2.00'],), ['0.00', '0.00', ['2.00', '2.00']]),\n  ('control standard juice', (['1.91', '1.91'],), ['4.71', '4.50', ['2.00', '2.00']]),\n  ('boundary three-way', (['2.50', '3.20', '2.90'],), ['5.73', '5.42', ['2.64', '3.38', '3.07']]),\n  ('boundary no-profit price', (['1.00', '5.00'],), 'invalid'),\n  ('regression: fair price direction',\n   (['1.67', '6.50', '3.71'],),\n   ['2.22', '2.17', ['1.71', '6.64', '3.79']]),\n  ('variant scenario 1', (['5.20', '1.15'],), ['6.19', '5.83', ['5.52', '1.22']]),\n  ('variant scenario 2',\n   (['7.11', '3.30', '9.10', '2.32'],),\n   ['-1.54', '-1.56', ['7.00', '3.25', '8.96', '2.28']])]]\nfor label, args, expected in cases[N - 1]:\n    check(label, run(args), expected)\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":"Stipulated, bounded toy contract stated in the contract field; not a claim of conformance with any operator, exchange or regulator rule set. 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":"w2-odds-conversion-book-overround-fair-odds-fair-price-direction","generated_at":"2026-09-29T14:50:30.541955+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Trading tools report overround and margin separately and derive no-vig fair prices.","root_cause":"Fair prices divide by the book instead of multiplying.","sha256":"211f37b7713a3f0af5652a3136258db4730d8a364f19bfc8bf351bb56aaa1b78","title":"Fair prices shortened instead of lengthened · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":44.259,"exit_code":1,"observations":[{"actual":["0.00","0.00",["2.00","2.00"]],"check":"control fair coin","expected":["0.00","0.00",["2.00","2.00"]],"passed":true},{"actual":["4.71","4.50",["1.96","1.96"]],"check":"control standard juice","expected":["4.71","4.50",["2.00","2.00"]],"passed":false},{"actual":["5.73","5.42",["2.56","3.26","2.96"]],"check":"boundary three-way","expected":["5.73","5.42",["2.64","3.38","3.07"]],"passed":false},{"actual":"invalid","check":"boundary no-profit price","expected":"invalid","passed":true},{"actual":["3.58","3.46",["4.32","3.82","1.90"]],"check":"regression: fair price direction","expected":["3.58","3.46",["4.43","3.92","1.93"]],"passed":false},{"actual":["12.18","10.86",["2.50","9.22","1.81"]],"check":"variant scenario 1","expected":["12.18","10.86",["2.67","10.21","1.90"]],"passed":false},{"actual":["2.45","2.40",["3.27","2.82","2.80"]],"check":"variant scenario 2","expected":["2.45","2.40",["3.33","2.87","2.85"]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control fair coin\", \"actual\": [\"0.00\", \"0.00\", [\"2.00\", \"2.00\"]], \"expected\": [\"0.00\", \"0.00\", [\"2.00\", \"2.00\"]], \"passed\": true}, {\"check\": \"control standard juice\", \"actual\": [\"4.71\", \"4.50\", [\"1.96\", \"1.96\"]], \"expected\": [\"4.71\", \"4.50\", [\"2.00\", \"2.00\"]], \"passed\": false}, {\"check\": \"boundary three-way\", \"actual\": [\"5.73\", \"5.42\", [\"2.56\", \"3.26\", \"2.96\"]], \"expected\": [\"5.73\", \"5.42\", [\"2.64\", \"3.38\", \"3.07\"]], \"passed\": false}, {\"check\": \"boundary no-profit price\", \"actual\": \"invalid\", \"expected\": \"invalid\", \"passed\": true}, {\"check\": \"regression: fair price direction\", \"actual\": [\"3.58\", \"3.46\", [\"4.32\", \"3.82\", \"1.90\"]], \"expected\": [\"3.58\", \"3.46\", [\"4.43\", \"3.92\", \"1.93\"]], \"passed\": false}, {\"check\": \"variant scenario 1\", \"actual\": [\"12.18\", \"10.86\", [\"2.50\", \"9.22\", \"1.81\"]], \"expected\": [\"12.18\", \"10.86\", [\"2.67\", \"10.21\", \"1.90\"]], \"passed\": false}, {\"check\": \"variant scenario 2\", \"actual\": [\"2.45\", \"2.40\", [\"3.27\", \"2.82\", \"2.80\"]], \"expected\": [\"2.45\", \"2.40\", [\"3.33\", \"2.87\", \"2.85\"]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.215,"exit_code":1,"observations":[{"actual":["0.00","0.00",["2.00","2.00"]],"check":"control fair coin","expected":["0.00","0.00",["2.00","2.00"]],"passed":true},{"actual":["4.71","4.50",["1.82","1.82"]],"check":"control standard juice","expected":["4.71","4.50",["2.00","2.00"]],"passed":false},{"actual":["5.73","5.42",["2.36","3.03","2.74"]],"check":"boundary three-way","expected":["5.73","5.42",["2.64","3.38","3.07"]],"passed":false},{"actual":"invalid","check":"boundary no-profit price","expected":"invalid","passed":true},{"actual":["3.58","3.46",["4.13","3.65","1.80"]],"check":"regression: fair price direction","expected":["3.58","3.46",["4.43","3.92","1.93"]],"passed":false},{"actual":["12.18","10.86",["2.12","8.11","1.51"]],"check":"variant scenario 1","expected":["12.18","10.86",["2.67","10.21","1.90"]],"passed":false},{"actual":["2.45","2.40",["3.17","2.73","2.71"]],"check":"variant scenario 2","expected":["2.45","2.40",["3.33","2.87","2.85"]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control fair coin\", \"actual\": [\"0.00\", \"0.00\", [\"2.00\", \"2.00\"]], \"expected\": [\"0.00\", \"0.00\", [\"2.00\", \"2.00\"]], \"passed\": true}, {\"check\": \"control standard juice\", \"actual\": [\"4.71\", \"4.50\", [\"1.82\", \"1.82\"]], \"expected\": [\"4.71\", \"4.50\", [\"2.00\", \"2.00\"]], \"passed\": false}, {\"check\": \"boundary three-way\", \"actual\": [\"5.73\", \"5.42\", [\"2.36\", \"3.03\", \"2.74\"]], \"expected\": [\"5.73\", \"5.42\", [\"2.64\", \"3.38\", \"3.07\"]], \"passed\": false}, {\"check\": \"boundary no-profit price\", \"actual\": \"invalid\", \"expected\": \"invalid\", \"passed\": true}, {\"check\": \"regression: fair price direction\", \"actual\": [\"3.58\", \"3.46\", [\"4.13\", \"3.65\", \"1.80\"]], \"expected\": [\"3.58\", \"3.46\", [\"4.43\", \"3.92\", \"1.93\"]], \"passed\": false}, {\"check\": \"variant scenario 1\", \"actual\": [\"12.18\", \"10.86\", [\"2.12\", \"8.11\", \"1.51\"]], \"expected\": [\"12.18\", \"10.86\", [\"2.67\", \"10.21\", \"1.90\"]], \"passed\": false}, {\"check\": \"variant scenario 2\", \"actual\": [\"2.45\", \"2.40\", [\"3.17\", \"2.73\", \"2.71\"]], \"expected\": [\"2.45\", \"2.40\", [\"3.33\", \"2.87\", \"2.85\"]], \"passed\": false}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}