Calculation catalog › Monte Carlo
Display histogram bin label
The dollar label printed under each ending-balance histogram bar.
Field: Histogram bin center label Unit: US dollars Basis: nominal dollars Computed by: UI transformation Status: Complete chain
Appears in: monte-carlo-page (Ending balances histogram x-axis labels (histRows))
Calculation records
-
Histogram bin centres Formula record, justified by derivation
Purpose: The dollar amount each bar of the ending balance histogram is labelled with.
Statement: montecarlo/run.ts#histogramFor publishes, on every histogram aggregateMonteCarlo builds, binCenters[i] = min + (i + 0.5) × binWidth in that association, or min for every bin when every value is equal, where binWidth is only a placeholder of 1 and the one value the sample holds is the only amount it can show. A histogram with min $100,000 and binWidth $50,000 has centres $125,000, $175,000 and so on to $1,575,000; endings [0, 20, 40, 80, 100] in 4 bins have centres 12.5, 37.5, 62.5 and 87.5; four paths all ending at $0 have every centre $0, where the page used to label the bars $1 to $30. Units: the histogram's dollars (nominal ending values). Rounding: none; the page formats compactly.
Formula:
c_i = min + (i + 0.5) · binWidth when max > min, else c_i = min-
min, max: Smallest and largest value of the sample (unit: usd) (domain: finite; 0 and 0 for an empty sample) -
binWidth: (max − min) / bins, or 1 when every value is equal (unit: usd) (domain: > 0) -
i: Bin index (unit: 1) (domain: 0 to bins − 1)
Timing: once per aggregation
Rounding: none
Limits:
- The last bin is closed (it holds the maximum), so its centre is the midpoint of a closed interval.
- With every value equal the other bins are empty and their centres carry no information; at the page's defaults this happens on 3 of the 29 example plans as the library opens them on the default seed (every path runs out; 5 on the plan-id seed it replaced).
Provenance: derived by
claude, implemented byclaude-subagent.Independent review:
codexGates (6 of 6 pass): fixture registers a test: pass; pins resolve: pass; families exist: pass; worksheet exists: pass; mutation receipt exists: pass; provenance independent: pass
Worksheet: display-histogram-bin-label.md Mutation receipt: display-histogram-bin-label.mutation.md
Evidence tests: run.binCenters.evidence.test.ts
Implemented in: run.ts
Is the number of: display-histogram-bin-label
-
Transformations
- The engine's histogram publishes binCenters (min + (i + 0.5) × binWidth, or min when every value is equal); the page formats each compactly (format.ts#histogramBars), and when every centre is one value it draws one bar at that value holding every path.
The evidence links on this page (each record's worksheet, mutation receipt, evidence tests
and implementation, and the source links) are pinned to engine commit
2624dbdba9fd, committed 2026-10-11.
The live calculation index and
output-family census links point at the repository's main
branch, so you can check this snapshot against them.