FAILURE MAP
← Case archive

FA-63701 / Actuarial life tables / Open access

Abridged period life table: Group mortality can exceed one · case 01

Very high mortality groups produce negative survivors.

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

ROOT CAUSE

nqx is not capped at one.

VERIFIED REPAIR

Cap nqx at one.

Unsuccessful approach: A 0.99 cap distorts groups that legitimately reach 1 and binds too early.

Case contract

Input groups [[width n (None = open), deaths, population (<=0 -> 'invalid population'), nax as [num, den] years]]. m = deaths/pop; closed nqx = min(1, n m/(1+(n-a) m)), nLx = n l_{x+n} + a d; open q=1, L = l/m (m=0 -> 'open interval without deaths'). Radix 100000. Return [q list rounded 6, e0 = sum L / radix rounded 4].

Why this case matters

Life-table arithmetic compounds across ages, so one misplaced index or assumption shifts every downstream value.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
from fractions import Fraction
N = 1
observations = []
def solve(x):
    l=Fraction(100000); qs=[]; Ls=[]
    for n,dth,pop,a in x['groups']:
        if pop<=0: return 'invalid population'
        m=Fraction(dth,pop); a=Fraction(*a)
        if n is None:
            q=Fraction(1); L=l/m if m else None
            if L is None: return 'open interval without deaths'
        else:
            q=n*m/(1+(n-a)*m)
            L=n*(l-q*l)+a*q*l
        qs.append(round(float(q),6)); Ls.append(L); l=l-q*l
    return [qs, round(float(sum(Ls)/100000),4)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['standard abridged', {'groups': [[1, 78, 35807, [1, 10]], [4, 40, 31065, [16, 10]], [5, 23, 20813, [35, 10]], [5, 94, 68066, [30, 10]], [10, 754, 74092, [70, 10]], [None, 1996, 5163, [1, 1]]]}, [[0.002174, 0.005135, 0.005516, 0.006886, 0.098751, 1.0], 26.6543]], ['high mortality group capped', {'groups': [[1, 40, 1000, [1, 10]], [5, 910, 1000, [2, 1]], [None, 50, 100, [1, 1]]]}, [[0.03861, 1.0, 1.0], 2.888]], ['uneven separation factors', {'groups': [[5, 50, 56806, [9, 10]], [5, 98, 23525, [41, 10]], [None, 400, 3000, [1, 1]]]}, [[0.004385, 0.020751, 1.0], 17.2537]], ['open interval without deaths', {'groups': [[5, 47, 40536, [25, 10]], [None, 0, 3000, [1, 1]]]}, 'open interval without deaths'], ['invalid population', {'groups': [[5, 1, 0, [5, 2]]]}, 'invalid population'], ['only open interval', {'groups': [[None, 101, 1000, [1, 1]]]}, [[1.0], 9.901]], ['two closed groups', {'groups': [[1, 161, 24128, [1, 10]], [4, 35, 63384, [24, 10]], [None, 300, 900, [1, 1]]]}, [[0.006633, 0.002207, 1.0], 7.9375]]], [['standard abridged', {'groups': [[1, 119, 39042, [1, 10]], [4, 38, 70073, [16, 10]], [5, 65, 50043, [15, 10]], [5, 69, 35464, [25, 10]], [10, 757, 35297, [50, 10]], [None, 1988, 19598, [1, 1]]]}, [[0.00304, 0.002166, 0.006465, 0.009681, 0.193695, 1.0], 31.4696]], ['high mortality group capped', {'groups': [[1, 40, 1000, [1, 10]], [5, 920, 1000, [2, 1]], [None, 50, 100, [1, 1]]]}, [[0.03861, 1.0, 1.0], 2.888]], ['uneven separation factors', {'groups': [[5, 83, 57486, [9, 10]], [5, 167, 30917, [41, 10]], [None, 400, 3000, [1, 1]]]}, [[0.007177, 0.026877, 1.0], 17.1567]], ['open interval without deaths', {'groups': [[5, 29, 62231, [30, 10]], [None, 0, 3000, [1, 1]]]}, 'open interval without deaths'], ['invalid population', {'groups': [[5, 1, 0, [5, 2]]]}, 'invalid population'], ['only open interval', {'groups': [[None, 102, 1000, [1, 1]]]}, [[1.0], 9.8039]], ['two closed groups', {'groups': [[1, 199, 26345, [1, 10]], [4, 26, 58148, [20, 10]], [None, 300, 900, [1, 1]]]}, [[0.007503, 0.001787, 1.0], 7.9319]]], [['standard abridged', {'groups': [[1, 161, 39157, [1, 10]], [4, 14, 74008, [28, 10]], [5, 67, 61324, [30, 10]], [5, 74, 61950, [30, 10]], [10, 446, 68571, [30, 10]], [None, 1726, 15365, [1, 1]]]}, [[0.004096, 0.000757, 0.005451, 0.005958, 0.06221, 1.0], 32.5039]], ['high mortality group capped', {'groups': [[1, 40, 1000, [1, 10]], [5, 930, 1000, [2, 1]], [None, 50, 100, [1, 1]]]}, [[0.03861, 1.0, 1.0], 2.888]], ['uneven separation factors', {'groups': [[5, 49, 26242, [9, 10]], [5, 195, 72229, [41, 10]], [None, 400, 3000, [1, 1]]]}, [[0.009265, 0.013466, 1.0], 17.2341]], ['open interval without deaths', {'groups': [[5, 10, 87442, [35, 10]], [None, 0, 3000, [1, 1]]]}, 'open interval without deaths'], ['invalid population', {'groups': [[5, 1, 0, [5, 2]]]}, 'invalid population'], ['only open interval', {'groups': [[None, 103, 1000, [1, 1]]]}, [[1.0], 9.7087]], ['two closed groups', {'groups': [[1, 104, 22103, [1, 10]], [4, 29, 41513, [24, 10]], [None, 300, 900, [1, 1]]]}, [[0.004685, 0.002791, 1.0], 7.9502]]], [['standard abridged', {'groups': [[1, 86, 20865, [1, 10]], [4, 39, 69667, [12, 10]], [5, 68, 35568, [30, 10]], [5, 84, 86222, [30, 10]], [10, 489, 53271, [50, 10]], [None, 1628, 19429, [1, 1]]]}, [[0.004107, 0.002236, 0.009523, 0.004862, 0.087767, 1.0], 34.8617]], ['high mortality group capped', {'groups': [[1, 40, 1000, [1, 10]], [5, 940, 1000, [2, 1]], [None, 50, 100, [1, 1]]]}, [[0.03861, 1.0, 1.0], 2.888]], ['uneven separation factors', {'groups': [[5, 74, 59451, [9, 10]], [5, 147, 46096, [41, 10]], [None, 400, 3000, [1, 1]]]}, [[0.006192, 0.015899, 1.0], 17.2645]], ['open interval without deaths', {'groups': [[5, 28, 27501, [25, 10]], [None, 0, 3000, [1, 1]]]}, 'open interval without deaths'], ['invalid population', {'groups': [[5, 1, 0, [5, 2]]]}, 'invalid population'], ['only open interval', {'groups': [[None, 104, 1000, [1, 1]]]}, [[1.0], 9.6154]], ['two closed groups', {'groups': [[1, 148, 29585, [1, 10]], [4, 16, 64951, [12, 10]], [None, 300, 900, [1, 1]]]}, [[0.00498, 0.000985, 1.0], 7.955]]], [['standard abridged', {'groups': [[1, 167, 32312, [1, 10]], [4, 35, 75919, [12, 10]], [5, 23, 33686, [20, 10]], [5, 128, 21883, [15, 10]], [10, 792, 28264, [60, 10]], [None, 1788, 16345, [1, 1]]]}, [[0.005144, 0.001842, 0.003407, 0.02866, 0.251973, 1.0], 29.9908]], ['high mortality group capped', {'groups': [[1, 40, 1000, [1, 10]], [5, 950, 1000, [2, 1]], [None, 50, 100, [1, 1]]]}, [[0.03861, 1.0, 1.0], 2.888]], ['uneven separation factors', {'groups': [[5, 79, 62778, [9, 10]], [5, 151, 43550, [41, 10]], [None, 400, 3000, [1, 1]]]}, [[0.00626, 0.017282, 1.0], 17.2518]], ['open interval without deaths', {'groups': [[5, 21, 81201, [25, 10]], [None, 0, 3000, [1, 1]]]}, 'open interval without deaths'], ['invalid population', {'groups': [[5, 1, 0, [5, 2]]]}, 'invalid population'], ['only open interval', {'groups': [[None, 105, 1000, [1, 1]]]}, [[1.0], 9.5238]], ['two closed groups', {'groups': [[1, 183, 30052, [1, 10]], [4, 23, 26428, [28, 10]], [None, 300, 900, [1, 1]]]}, [[0.006056, 0.003478, 1.0], 7.9376]]]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(args), expected)
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
standard abridged[[0.002174, 0.005135, 0.005516, 0.006886, 0.098751, 1.0], 26.6543][[0.002174, 0.005135, 0.005516, 0.006886, 0.098751, 1.0], 26.6543]Passed
high mortality group capped[[0.03861, 1.219839, 1.0], 1.8313][[0.03861, 1.0, 1.0], 2.888]Failed
uneven separation factors[[0.004385, 0.020751, 1.0], 17.2537][[0.004385, 0.020751, 1.0], 17.2537]Passed
open interval without deathsopen interval without deathsopen interval without deathsPassed
invalid populationinvalid populationinvalid populationPassed
only open interval[[1.0], 9.901][[1.0], 9.901]Passed
two closed groups[[0.006633, 0.002207, 1.0], 7.9375][[0.006633, 0.002207, 1.0], 7.9375]Passed

SHA-256 / ec331414c011f5712c4dcdb1895d0e430e7ed4d1f7d02633a72bf939fa3dc3fc

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
from fractions import Fraction
N = 1
observations = []
def solve(x):
    l=Fraction(100000); qs=[]; Ls=[]
    for n,dth,pop,a in x['groups']:
        if pop<=0: return 'invalid population'
        m=Fraction(dth,pop); a=Fraction(*a)
        if n is None:
            q=Fraction(1); L=l/m if m else None
            if L is None: return 'open interval without deaths'
        else:
            q=min(Fraction(99,100),n*m/(1+(n-a)*m))
            L=n*(l-q*l)+a*q*l
        qs.append(round(float(q),6)); Ls.append(L); l=l-q*l
    return [qs, round(float(sum(Ls)/100000),4)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['standard abridged', {'groups': [[1, 78, 35807, [1, 10]], [4, 40, 31065, [16, 10]], [5, 23, 20813, [35, 10]], [5, 94, 68066, [30, 10]], [10, 754, 74092, [70, 10]], [None, 1996, 5163, [1, 1]]]}, [[0.002174, 0.005135, 0.005516, 0.006886, 0.098751, 1.0], 26.6543]], ['high mortality group capped', {'groups': [[1, 40, 1000, [1, 10]], [5, 910, 1000, [2, 1]], [None, 50, 100, [1, 1]]]}, [[0.03861, 1.0, 1.0], 2.888]], ['uneven separation factors', {'groups': [[5, 50, 56806, [9, 10]], [5, 98, 23525, [41, 10]], [None, 400, 3000, [1, 1]]]}, [[0.004385, 0.020751, 1.0], 17.2537]], ['open interval without deaths', {'groups': [[5, 47, 40536, [25, 10]], [None, 0, 3000, [1, 1]]]}, 'open interval without deaths'], ['invalid population', {'groups': [[5, 1, 0, [5, 2]]]}, 'invalid population'], ['only open interval', {'groups': [[None, 101, 1000, [1, 1]]]}, [[1.0], 9.901]], ['two closed groups', {'groups': [[1, 161, 24128, [1, 10]], [4, 35, 63384, [24, 10]], [None, 300, 900, [1, 1]]]}, [[0.006633, 0.002207, 1.0], 7.9375]]], [['standard abridged', {'groups': [[1, 119, 39042, [1, 10]], [4, 38, 70073, [16, 10]], [5, 65, 50043, [15, 10]], [5, 69, 35464, [25, 10]], [10, 757, 35297, [50, 10]], [None, 1988, 19598, [1, 1]]]}, [[0.00304, 0.002166, 0.006465, 0.009681, 0.193695, 1.0], 31.4696]], ['high mortality group capped', {'groups': [[1, 40, 1000, [1, 10]], [5, 920, 1000, [2, 1]], [None, 50, 100, [1, 1]]]}, [[0.03861, 1.0, 1.0], 2.888]], ['uneven separation factors', {'groups': [[5, 83, 57486, [9, 10]], [5, 167, 30917, [41, 10]], [None, 400, 3000, [1, 1]]]}, [[0.007177, 0.026877, 1.0], 17.1567]], ['open interval without deaths', {'groups': [[5, 29, 62231, [30, 10]], [None, 0, 3000, [1, 1]]]}, 'open interval without deaths'], ['invalid population', {'groups': [[5, 1, 0, [5, 2]]]}, 'invalid population'], ['only open interval', {'groups': [[None, 102, 1000, [1, 1]]]}, [[1.0], 9.8039]], ['two closed groups', {'groups': [[1, 199, 26345, [1, 10]], [4, 26, 58148, [20, 10]], [None, 300, 900, [1, 1]]]}, [[0.007503, 0.001787, 1.0], 7.9319]]], [['standard abridged', {'groups': [[1, 161, 39157, [1, 10]], [4, 14, 74008, [28, 10]], [5, 67, 61324, [30, 10]], [5, 74, 61950, [30, 10]], [10, 446, 68571, [30, 10]], [None, 1726, 15365, [1, 1]]]}, [[0.004096, 0.000757, 0.005451, 0.005958, 0.06221, 1.0], 32.5039]], ['high mortality group capped', {'groups': [[1, 40, 1000, [1, 10]], [5, 930, 1000, [2, 1]], [None, 50, 100, [1, 1]]]}, [[0.03861, 1.0, 1.0], 2.888]], ['uneven separation factors', {'groups': [[5, 49, 26242, [9, 10]], [5, 195, 72229, [41, 10]], [None, 400, 3000, [1, 1]]]}, [[0.009265, 0.013466, 1.0], 17.2341]], ['open interval without deaths', {'groups': [[5, 10, 87442, [35, 10]], [None, 0, 3000, [1, 1]]]}, 'open interval without deaths'], ['invalid population', {'groups': [[5, 1, 0, [5, 2]]]}, 'invalid population'], ['only open interval', {'groups': [[None, 103, 1000, [1, 1]]]}, [[1.0], 9.7087]], ['two closed groups', {'groups': [[1, 104, 22103, [1, 10]], [4, 29, 41513, [24, 10]], [None, 300, 900, [1, 1]]]}, [[0.004685, 0.002791, 1.0], 7.9502]]], [['standard abridged', {'groups': [[1, 86, 20865, [1, 10]], [4, 39, 69667, [12, 10]], [5, 68, 35568, [30, 10]], [5, 84, 86222, [30, 10]], [10, 489, 53271, [50, 10]], [None, 1628, 19429, [1, 1]]]}, [[0.004107, 0.002236, 0.009523, 0.004862, 0.087767, 1.0], 34.8617]], ['high mortality group capped', {'groups': [[1, 40, 1000, [1, 10]], [5, 940, 1000, [2, 1]], [None, 50, 100, [1, 1]]]}, [[0.03861, 1.0, 1.0], 2.888]], ['uneven separation factors', {'groups': [[5, 74, 59451, [9, 10]], [5, 147, 46096, [41, 10]], [None, 400, 3000, [1, 1]]]}, [[0.006192, 0.015899, 1.0], 17.2645]], ['open interval without deaths', {'groups': [[5, 28, 27501, [25, 10]], [None, 0, 3000, [1, 1]]]}, 'open interval without deaths'], ['invalid population', {'groups': [[5, 1, 0, [5, 2]]]}, 'invalid population'], ['only open interval', {'groups': [[None, 104, 1000, [1, 1]]]}, [[1.0], 9.6154]], ['two closed groups', {'groups': [[1, 148, 29585, [1, 10]], [4, 16, 64951, [12, 10]], [None, 300, 900, [1, 1]]]}, [[0.00498, 0.000985, 1.0], 7.955]]], [['standard abridged', {'groups': [[1, 167, 32312, [1, 10]], [4, 35, 75919, [12, 10]], [5, 23, 33686, [20, 10]], [5, 128, 21883, [15, 10]], [10, 792, 28264, [60, 10]], [None, 1788, 16345, [1, 1]]]}, [[0.005144, 0.001842, 0.003407, 0.02866, 0.251973, 1.0], 29.9908]], ['high mortality group capped', {'groups': [[1, 40, 1000, [1, 10]], [5, 950, 1000, [2, 1]], [None, 50, 100, [1, 1]]]}, [[0.03861, 1.0, 1.0], 2.888]], ['uneven separation factors', {'groups': [[5, 79, 62778, [9, 10]], [5, 151, 43550, [41, 10]], [None, 400, 3000, [1, 1]]]}, [[0.00626, 0.017282, 1.0], 17.2518]], ['open interval without deaths', {'groups': [[5, 21, 81201, [25, 10]], [None, 0, 3000, [1, 1]]]}, 'open interval without deaths'], ['invalid population', {'groups': [[5, 1, 0, [5, 2]]]}, 'invalid population'], ['only open interval', {'groups': [[None, 105, 1000, [1, 1]]]}, [[1.0], 9.5238]], ['two closed groups', {'groups': [[1, 183, 30052, [1, 10]], [4, 23, 26428, [28, 10]], [None, 300, 900, [1, 1]]]}, [[0.006056, 0.003478, 1.0], 7.9376]]]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(args), expected)
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
standard abridged[[0.002174, 0.005135, 0.005516, 0.006886, 0.098751, 1.0], 26.6543][[0.002174, 0.005135, 0.005516, 0.006886, 0.098751, 1.0], 26.6543]Passed
high mortality group capped[[0.03861, 0.99, 1.0], 2.9361][[0.03861, 1.0, 1.0], 2.888]Failed
uneven separation factors[[0.004385, 0.020751, 1.0], 17.2537][[0.004385, 0.020751, 1.0], 17.2537]Passed
open interval without deathsopen interval without deathsopen interval without deathsPassed
invalid populationinvalid populationinvalid populationPassed
only open interval[[1.0], 9.901][[1.0], 9.901]Passed
two closed groups[[0.006633, 0.002207, 1.0], 7.9375][[0.006633, 0.002207, 1.0], 7.9375]Passed

SHA-256 / c6ab648296a2c82fe00d7512631b9e998f12140ebc1ab4ab0be43175b89c161d

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
from fractions import Fraction
N = 1
observations = []
def solve(x):
    l=Fraction(100000); qs=[]; Ls=[]
    for n,dth,pop,a in x['groups']:
        if pop<=0: return 'invalid population'
        m=Fraction(dth,pop); a=Fraction(*a)
        if n is None:
            q=Fraction(1); L=l/m if m else None
            if L is None: return 'open interval without deaths'
        else:
            q=min(Fraction(1),n*m/(1+(n-a)*m))
            L=n*(l-q*l)+a*q*l
        qs.append(round(float(q),6)); Ls.append(L); l=l-q*l
    return [qs, round(float(sum(Ls)/100000),4)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['standard abridged', {'groups': [[1, 78, 35807, [1, 10]], [4, 40, 31065, [16, 10]], [5, 23, 20813, [35, 10]], [5, 94, 68066, [30, 10]], [10, 754, 74092, [70, 10]], [None, 1996, 5163, [1, 1]]]}, [[0.002174, 0.005135, 0.005516, 0.006886, 0.098751, 1.0], 26.6543]], ['high mortality group capped', {'groups': [[1, 40, 1000, [1, 10]], [5, 910, 1000, [2, 1]], [None, 50, 100, [1, 1]]]}, [[0.03861, 1.0, 1.0], 2.888]], ['uneven separation factors', {'groups': [[5, 50, 56806, [9, 10]], [5, 98, 23525, [41, 10]], [None, 400, 3000, [1, 1]]]}, [[0.004385, 0.020751, 1.0], 17.2537]], ['open interval without deaths', {'groups': [[5, 47, 40536, [25, 10]], [None, 0, 3000, [1, 1]]]}, 'open interval without deaths'], ['invalid population', {'groups': [[5, 1, 0, [5, 2]]]}, 'invalid population'], ['only open interval', {'groups': [[None, 101, 1000, [1, 1]]]}, [[1.0], 9.901]], ['two closed groups', {'groups': [[1, 161, 24128, [1, 10]], [4, 35, 63384, [24, 10]], [None, 300, 900, [1, 1]]]}, [[0.006633, 0.002207, 1.0], 7.9375]]], [['standard abridged', {'groups': [[1, 119, 39042, [1, 10]], [4, 38, 70073, [16, 10]], [5, 65, 50043, [15, 10]], [5, 69, 35464, [25, 10]], [10, 757, 35297, [50, 10]], [None, 1988, 19598, [1, 1]]]}, [[0.00304, 0.002166, 0.006465, 0.009681, 0.193695, 1.0], 31.4696]], ['high mortality group capped', {'groups': [[1, 40, 1000, [1, 10]], [5, 920, 1000, [2, 1]], [None, 50, 100, [1, 1]]]}, [[0.03861, 1.0, 1.0], 2.888]], ['uneven separation factors', {'groups': [[5, 83, 57486, [9, 10]], [5, 167, 30917, [41, 10]], [None, 400, 3000, [1, 1]]]}, [[0.007177, 0.026877, 1.0], 17.1567]], ['open interval without deaths', {'groups': [[5, 29, 62231, [30, 10]], [None, 0, 3000, [1, 1]]]}, 'open interval without deaths'], ['invalid population', {'groups': [[5, 1, 0, [5, 2]]]}, 'invalid population'], ['only open interval', {'groups': [[None, 102, 1000, [1, 1]]]}, [[1.0], 9.8039]], ['two closed groups', {'groups': [[1, 199, 26345, [1, 10]], [4, 26, 58148, [20, 10]], [None, 300, 900, [1, 1]]]}, [[0.007503, 0.001787, 1.0], 7.9319]]], [['standard abridged', {'groups': [[1, 161, 39157, [1, 10]], [4, 14, 74008, [28, 10]], [5, 67, 61324, [30, 10]], [5, 74, 61950, [30, 10]], [10, 446, 68571, [30, 10]], [None, 1726, 15365, [1, 1]]]}, [[0.004096, 0.000757, 0.005451, 0.005958, 0.06221, 1.0], 32.5039]], ['high mortality group capped', {'groups': [[1, 40, 1000, [1, 10]], [5, 930, 1000, [2, 1]], [None, 50, 100, [1, 1]]]}, [[0.03861, 1.0, 1.0], 2.888]], ['uneven separation factors', {'groups': [[5, 49, 26242, [9, 10]], [5, 195, 72229, [41, 10]], [None, 400, 3000, [1, 1]]]}, [[0.009265, 0.013466, 1.0], 17.2341]], ['open interval without deaths', {'groups': [[5, 10, 87442, [35, 10]], [None, 0, 3000, [1, 1]]]}, 'open interval without deaths'], ['invalid population', {'groups': [[5, 1, 0, [5, 2]]]}, 'invalid population'], ['only open interval', {'groups': [[None, 103, 1000, [1, 1]]]}, [[1.0], 9.7087]], ['two closed groups', {'groups': [[1, 104, 22103, [1, 10]], [4, 29, 41513, [24, 10]], [None, 300, 900, [1, 1]]]}, [[0.004685, 0.002791, 1.0], 7.9502]]], [['standard abridged', {'groups': [[1, 86, 20865, [1, 10]], [4, 39, 69667, [12, 10]], [5, 68, 35568, [30, 10]], [5, 84, 86222, [30, 10]], [10, 489, 53271, [50, 10]], [None, 1628, 19429, [1, 1]]]}, [[0.004107, 0.002236, 0.009523, 0.004862, 0.087767, 1.0], 34.8617]], ['high mortality group capped', {'groups': [[1, 40, 1000, [1, 10]], [5, 940, 1000, [2, 1]], [None, 50, 100, [1, 1]]]}, [[0.03861, 1.0, 1.0], 2.888]], ['uneven separation factors', {'groups': [[5, 74, 59451, [9, 10]], [5, 147, 46096, [41, 10]], [None, 400, 3000, [1, 1]]]}, [[0.006192, 0.015899, 1.0], 17.2645]], ['open interval without deaths', {'groups': [[5, 28, 27501, [25, 10]], [None, 0, 3000, [1, 1]]]}, 'open interval without deaths'], ['invalid population', {'groups': [[5, 1, 0, [5, 2]]]}, 'invalid population'], ['only open interval', {'groups': [[None, 104, 1000, [1, 1]]]}, [[1.0], 9.6154]], ['two closed groups', {'groups': [[1, 148, 29585, [1, 10]], [4, 16, 64951, [12, 10]], [None, 300, 900, [1, 1]]]}, [[0.00498, 0.000985, 1.0], 7.955]]], [['standard abridged', {'groups': [[1, 167, 32312, [1, 10]], [4, 35, 75919, [12, 10]], [5, 23, 33686, [20, 10]], [5, 128, 21883, [15, 10]], [10, 792, 28264, [60, 10]], [None, 1788, 16345, [1, 1]]]}, [[0.005144, 0.001842, 0.003407, 0.02866, 0.251973, 1.0], 29.9908]], ['high mortality group capped', {'groups': [[1, 40, 1000, [1, 10]], [5, 950, 1000, [2, 1]], [None, 50, 100, [1, 1]]]}, [[0.03861, 1.0, 1.0], 2.888]], ['uneven separation factors', {'groups': [[5, 79, 62778, [9, 10]], [5, 151, 43550, [41, 10]], [None, 400, 3000, [1, 1]]]}, [[0.00626, 0.017282, 1.0], 17.2518]], ['open interval without deaths', {'groups': [[5, 21, 81201, [25, 10]], [None, 0, 3000, [1, 1]]]}, 'open interval without deaths'], ['invalid population', {'groups': [[5, 1, 0, [5, 2]]]}, 'invalid population'], ['only open interval', {'groups': [[None, 105, 1000, [1, 1]]]}, [[1.0], 9.5238]], ['two closed groups', {'groups': [[1, 183, 30052, [1, 10]], [4, 23, 26428, [28, 10]], [None, 300, 900, [1, 1]]]}, [[0.006056, 0.003478, 1.0], 7.9376]]]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(args), expected)
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
standard abridged[[0.002174, 0.005135, 0.005516, 0.006886, 0.098751, 1.0], 26.6543][[0.002174, 0.005135, 0.005516, 0.006886, 0.098751, 1.0], 26.6543]Passed
high mortality group capped[[0.03861, 1.0, 1.0], 2.888][[0.03861, 1.0, 1.0], 2.888]Passed
uneven separation factors[[0.004385, 0.020751, 1.0], 17.2537][[0.004385, 0.020751, 1.0], 17.2537]Passed
open interval without deathsopen interval without deathsopen interval without deathsPassed
invalid populationinvalid populationinvalid populationPassed
only open interval[[1.0], 9.901][[1.0], 9.901]Passed
two closed groups[[0.006633, 0.002207, 1.0], 7.9375][[0.006633, 0.002207, 1.0], 7.9375]Passed

SHA-256 / 992a64019b4ff91fad9a9f9d9005073e601dbec16575e59ea267dd1843baf09b

Verification & scope

A deterministic bounded teaching model of a stipulated toy actuarial contract. Rates are small synthetic tables, exact rationals are used where practical and floats are rounded at the output; it makes no claim of conformance with any published table, standard of practice or regulation. 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:47:17.049930+00:00.

Case digest / dd241969231e425d2c84bad4a8de4966aa349fd28b480f03ee45abf4227aa69d