Page actions
instrument mechanism / verified-clean
Gini Coefficient / Lorenz Curve Estimator mechanism
The inspectable method record for Gini Coefficient / Lorenz Curve Estimator, kept separate from implementation and qualification.
Model scope
The core Gini and trapezoidal Lorenz method is standard, but the specification needs explicit fraction-versus-percent handling, sorting and nonnegative-data constraints, zero-total handling, endpoint requirements, and a clear statement that decile/quintile results are grouped-data estimates. The educational-only honest label is appropriate.
- The formula Gini=A/(A+B) is mathematically correct only when A is the area between the equality line and Lorenz curve and B is the area under the Lorenz curve; the implementation should explicitly use Gini=(0.5-B)/0.5=1-2B because the equality-line area A+B is 0.5.
- The trapezoidal calculation must include the Lorenz endpoints (0,0) and (1,1), and must define B as the sum of trapezoids between consecutive cumulative population and cumulative income/wealth shares.
- The input specification does not state whether shares are entered as fractions or percentages, nor whether decile/quintile groups are assumed to have equal population weights.
- The instrument must require observations to be sorted from lowest to highest income/wealth and must reject negative shares, negative population weights, and distributions whose total income/wealth is zero.
Units and conventions
- Population shares and income/wealth shares are dimensionless proportions; fractions such as 0.10 are assumed unless an explicit percent-input mode converts 10% to 0.10.
- For deciles, cumulative population coordinates are x=0,0.1,...,1. For quintiles, they are x=0,0.2,...,1.
- Income/wealth shares must sum to exactly 1 after normalization, and population shares must sum to 1.
- The Lorenz curve is piecewise linear between cumulative-share points; the reported Gini is therefore the grouped-data trapezoidal estimate.
- The equality line is y=x, whose area under the curve on [0,1] is 0.5.
Inspectable vector
One of 4 source-bound review vectors:
{
"inputs": {
"grouping": "10 equal-population deciles",
"income_shares": [
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1
],
"sampled_x": [
0,
0.5,
1
]
},
"expected_outputs": {
"gini": 0,
"lorenz_sampled_points": [
{
"x": 0,
"y": 0
},
{
"x": 0.5,
"y": 0.5
},
{
"x": 1,
"y": 1
}
],
"curve_features": {
"equality_intersections": "Every point on 0<=x<=1",
"maximum_gap_from_equality": 0,
"asymptotes": "None"
}
},
"working": "Cumulative Lorenz y-values: 0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1. Each trapezoid has width 0.1 and average height 0.1. B=10*(0.1*((0.1+0.1)/2))=10*0.01=0.10? Including the endpoint formula directly: B=0.1*(0.5*0+0.1+0.2+0.3+0.4+0.5+0.6+0.7+0.8+0.9+0.5*1)=0.1*(5.0)=0.5. A=0.5-B=0.5-0.5=0. Gini=A/(A+B)=0/0.5=0. The Lorenz curve is y=x, so y(0.5)=0.5 and its maximum gap from equality is 0."
}Failure boundary
BREAK_CLAIMED · SELF_FLAGGED
The zero-total input produces an undefined normalization denominator and must be rejected. The specification also does not state how group ordering or percentage-versus-fraction units are interpreted; reversed ordering can yield an invalid negative formal Gini.
Other records
Sources and evidence
These pointers bind the page to evidence. They do not grant authority or collapse verification into deployment.
VERIFIED_LEDGER.jsonevidence-tranche6/tranche6-results.jsonBOUNDARY_HAZARD_CATALOG.json