FAILURE MAP
← Case archive

FA-63706 / Actuarial life tables / Open access

Abridged period life table: Life expectancy omits the open interval · case 01

e0 is understated by the open-interval person-years.

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

ROOT CAUSE

The last L is dropped from the total.

THE FAILURE

The last L is dropped from the total.

Unsuccessful approach: Halving the open interval still undercounts it.

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=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[:-1])/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], 24.3687][[0.002174, 0.005135, 0.005516, 0.006886, 0.098751, 1.0], 26.6543]Failed
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], 9.9415][[0.004385, 0.020751, 1.0], 17.2537]Failed
open interval without deathsopen interval without deathsopen interval without deathsPassed
invalid populationinvalid populationinvalid populationPassed
only open interval[[1.0], 0.0][[1.0], 9.901]Failed
two closed groups[[0.006633, 0.002207, 1.0], 4.964][[0.006633, 0.002207, 1.0], 7.9375]Failed

SHA-256 / d6ba148fb8e6863ede8811e5bd1f369494b6056bf288cd3e4e06004dce6621ca

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(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)-Ls[-1]/2)/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], 25.5115][[0.002174, 0.005135, 0.005516, 0.006886, 0.098751, 1.0], 26.6543]Failed
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], 13.5976][[0.004385, 0.020751, 1.0], 17.2537]Failed
open interval without deathsopen interval without deathsopen interval without deathsPassed
invalid populationinvalid populationinvalid populationPassed
only open interval[[1.0], 4.9505][[1.0], 9.901]Failed
two closed groups[[0.006633, 0.002207, 1.0], 6.4508][[0.006633, 0.002207, 1.0], 7.9375]Failed

SHA-256 / 77518df997c958114e1ad8078f80d07a4ccb777b9a271dfd4dce3d88a3236094

HELD IN THE MEMBER ARCHIVE

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

This mechanism has 7 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

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.112966+00:00.

Case digest / 6fbb637a38ff6e0ffbc37a54051b86915dfe1155a8a82e20a0d21ccfea1d2189