Worked Examples

Developer reference for impact uncertainty — Global Impact Catalyst

Develop uncertainty-aware impact analysis in Global Impact Catalyst using versioned model contracts, independently reproducible calculations, scenario integration, permission checks, and auditable evidence lineage. This developer reference documents source-reviewed GIC uncertainty behavior and the additional scientific and publication safeguards needed before reporting confidence ranges or comparative impact findings.

ProductGlobal Impact CatalystComponentAnalysis — Uncertainty Models and ScenariosUpdatedNovember 26, 2026Reading time27 minutes

Application: Global Impact Catalyst
Component: Analysis — Uncertainty Models, Scenarios and Sensitivity (related: Indicator Registry and Evidence Governance)
Article type: Developer reference
Source-reviewed application version: 2.0.0 (commit e75808a0aa272656b1fdbacd2491c30fd6b987dc)
Source-reviewed Analysis module: 1.7.0
Last verified installed feature version: Not established; staging acceptance pending
Evidence classification: Pinned source review; synthetic calculation; proposed integration gates
Estimated reading time: 23–30 minutes
Review date: November 26, 2026

Goal

Implement, test, and review uncertainty-aware impact analysis without confusing a stable numeric interval with scientifically validated coverage, an authorized publication, or a causal impact finding. Developers must distinguish the observed/source input, the registered uncertainty model, the analysis output, and the claim approved for use. The primary technical acceptance criterion is that all output values are independently reproducible from immutable inputs, model versions, formulas, and documented assumptions.

Functional boundary: the reviewed Global Impact Catalyst (GIC) source implements uncertainty-model registration, deterministic margins, scenario-point annotations, and scenario parameter sensitivity. It does not demonstrate an automatic uncertainty-aware comparison-set ranking or validated probability coverage; integrate those as explicitly reviewed extensions, not undocumented existing behavior.

Requirements

  • Source control: a pinned GIC source commit and release document; verify the separately installed build before claiming runtime parity.
  • Authorized workspace: existing workspace/initiative/indicator references, authenticated actor, and approved role; use synthetic data for public examples.
  • Governed measurement: indicator-definition version, observation, unit, period, method, source version, and quality or missingness state.
  • Uncertainty specification: type, margins/bounds, distribution label, confidence-level metadata, assumptions, limitations, source linkage, revision, and lifecycle status.
  • Reproducibility: recorded inputs, hashes, stable code version, numerical tolerance, declared independence/covariance assumptions, and deterministic test fixture.
  • Publication controls: independent scientific review for material assertions, separate access-policy acceptance, and explicit approval-to-publication transitions.

1. Source-reviewed implementation versus deployed product

The source baseline is Global Impact Catalyst v2.0.0, commit e75808a0aa272656b1fdbacd2491c30fd6b987dc. The uncertainty implementation is in python/global_impact_analysis.py with ANALYSIS_VERSION = "1.7.0". python/global_impact_service.py delegates several analysis methods to the repository. The v2.0.0 source release document consolidates existing modules; it is not an installed-version attestation or a GitHub release tag.

This reviewed source supports code-contract statements below, but neither a WordPress control, a FastAPI route, a webhook, a deployed endpoint, nor its exact access policy can be certified without examining the relevant installed service and staging traffic. All client examples in this article are application-layer pseudocode unless explicitly identified as reviewed Python method signatures.

2. Architecture and data flow

Preserve the distinction between measurement provenance → indicator/observation version → uncertainty-model revision → scenario or independent calculation → result hash → review decision → published representation. An uncertainty model should never replace a raw observation; it attaches assumptions and an interval representation to a separately traceable estimate.

Stage Reviewed behavior / required boundary
Indicator and unit registry Governs definitions and compatible unit conversion; registry documentation.
Uncertainty model Registered by repository with actor, workspace ID, revision, optional source and method references.
Deterministic margin apply_uncertainty() calculates a bounded result for one scalar.
Scenario evaluation evaluate_scenario() may annotate each scenario point using an uncertainty model.
Comparison set run_comparison_set() ranks surviving members but has no reviewed uncertainty-model parameter.
Publication gate Separate scientific and access decisions; a calculation returning successfully is not an approval.

3. Exact reviewed Python entry points

Method Source-reviewed signature / behavior Persistence caveat
register_uncertainty_model (model, *, workspace_id, expected_revision=None, actor="system") Writes or updates model; passing no revision is not a strict CAS guarantee.
get_uncertainty_model (uncertainty_model_id) Returns decoded model; caller must enforce access boundary.
list_uncertainty_models (workspace_id) Scoped list method in repository; verify service authorization.
apply_uncertainty (uncertainty_model_id, value) Evaluates model arithmetic; no write implied.
evaluate_scenario (scenario_id, *, parameter_overrides=None, uncertainty_model_id=None, actor="system", persist=True) Default persist=True; explicitly set false in exploratory work.
run_sensitivity_analysis (scenario_id, parameter_ranges, *, actor="system") Reviewed function writes sensitivity records; not a read-only preview.
run_comparison_set (comparison_set_id, *, actor="system", persist=False) No uncertainty_model_id parameter in reviewed source.

The source inspection basis is Analysis module and service delegation. Do not infer a corresponding HTTP API from Python method names.

4. Model data contract and validation

The reviewed registration code accepts a dictionary and uses an uncertainty-model ID derived from workspace, name, and type when an explicit ID is absent. It validates a nonempty name; type among absolute, relative, bounds, combined; finite numerical fields; nonnegative margins; ordered bounds; a numeric confidence_level in (0, 1]; a supported distribution; and lifecycle among draft, active, deprecated, archived.

Field Reviewed rule Developer validation extension
uncertainty_type One of 4 enumerated values; defaults to relative Reject implicit defaults for a publication-grade submission.
absolute_margin Required for absolute, nonnegative finite Record unit and evidence source.
relative_margin_percent Required for relative, nonnegative finite Document denominator, especially for zero or negative centers.
lower_bound, upper_bound Required and ordered for bounds Check that the center lies within interval when it is intended to represent a bound on that center.
combined inputs At least one of absolute or relative Check units, independence and double-counting; algorithm uses RSS.
confidence_level Default 0.95; 0 < c ≤ 1 Treat as metadata; do not claim observed coverage.
distribution bounded, normal_assumption, triangular_assumption, unknown Not automatically turned into quantiles by apply_uncertainty.
source_id, method_definition_id Optional references passed to storage Verify referential ownership, license, version and existence.
expected_revision Optional optimistic-concurrency check Make mandatory at publication-facing integration boundary.

Important: the bounds source validation checks lower_bound ≤ upper_bound but not whether the input center lies inside; confidence_level=1 is accepted syntactically, but this is not a claim of 100% coverage. A strict quality gate can reject scientifically incoherent combinations while retaining the unchanged original record for audit.

5. Registered uncertainty-model example

This example shows a source-shaped model dictionary suitable for reviewing the repository method; IDs are placeholders and no live call is made. The values are synthetic and margins are not empirically calibrated:

model = {
    "name": "Synthetic net impact uncertainty",
    "uncertainty_type": "combined",
    "absolute_margin": 6.0,
    "relative_margin_percent": 10.0,
    "confidence_level": 0.95,
    "distribution": "unknown",
    "lifecycle_status": "draft",
    "assumptions": ["RSS treats the two margins as independent"],
    "limitations": ["Illustrative only; not calibrated statistical coverage"],
    "source_id": None,
    "method_definition_id": None,
    "metadata": {"fixture": "synthetic_impact_uncertainty_2026.csv"},
}
# Within an authorized repository/service integration only:
# saved = repository.register_uncertainty_model(
#     model, workspace_id=workspace_id,
#     expected_revision=0, actor=authenticated_actor)
# interval = repository.apply_uncertainty(saved["uncertainty_model_id"], 80.0)

The source_id=None and method_definition_id=None entries are tolerable for an expressly synthetic demonstration; an evidence-bearing real-world claim must link justified and permitted sources. No client should set actor="system" merely to bypass an authenticated identity.

6. Exact interval arithmetic implemented in GIC

center = finite(value)
absolute margin: m = absolute_margin
relative margin: m = abs(center) * relative_margin_percent / 100
combined margin: m = sqrt(absolute_margin**2 +
                          (abs(center)*relative_margin_percent/100)**2)
interval: [center-m, center+m]
bounds: [lower_bound, upper_bound], margin=None

The source rounds returned values and includes uncertainty_model_id, value, lower, upper, margin, confidence_level, distribution, and uncertainty_type. At center 80, absolute margin 6 and relative margin 10%, the reviewed combined expression gives m = 10 and reported range [70, 90] in the same indicator unit. That example is arithmetic parity, not a 95% interval.

Scientific limitation: root-sum-square does not incorporate covariance, model-form alternatives, nonlinearity, effective degrees of freedom or a validated distribution. A distribution label is returned but it does not change the margin calculation. If the two margins represent correlated errors or the same underlying evidence, this formula is not an adequate uncertainty propagation model.

7. Independent synthetic uncertainty budget

For a separate, independently reproducible example, the companion CSV uses N = G − P − T, representing a hypothetical gross quantity minus processing and transport quantities. All three observations and standard uncertainties are invented in tCO₂e; this does not demonstrate an emissions inventory, verified removals, additionality or permanence.

Input Value (tCO₂e) Illustrative standard uncertainty Sensitivity coefficient
Gross G 100 8 +1
Processing P 12 3 −1
Transport T 8 2 −1
N = 100 - 12 - 8 = 80 tCO2e
Independent standard variance = 8**2 + 3**2 + 2**2 = 77
u(N) = sqrt(77) = 8.774964 tCO2e
Illustrative k=2 interval: [62.4501, 97.5499] tCO2e

The composite u(N) above is an independent measurement-model reference and not the same model as GIC’s combined two-margin mode. The two formula families must not be treated as interchangeable or automatically linked.

8. Covariance, model-form, and coverage boundary

For Y = Σ c_i x_i:
u²(Y) = Σ (c_i u_i)² + 2 Σ_{i<j} c_i c_j cov(x_i, x_j)
For rho(G,P) = +0.4: variance = 77 - 19.2 = 57.8; u = 7.602631
For rho(G,P) = -0.4: variance = 77 + 19.2 = 96.2; u = 9.808160

Actual dependence must be measured or defended from evidence. The signs in a subtraction model matter: positively correlated gross and processing errors may partially cancel, while negative correlation may increase net uncertainty. A sensitivity model is not a substitute for validating the real covariance matrix.

JCGM 100:2008 and NIST distinguish combined standard uncertainty, expanded uncertainty and defensible coverage factors. JCGM 101:2008 addresses propagation of input distributions using Monte Carlo methods. GIC does not derive a valid 95% interval solely by recording confidence_level=0.95; a separately assessed statistical model and coverage interpretation are necessary.

9. Scenario integration and persistence semantics

evaluate_scenario(scenario_id, uncertainty_model_id=…, persist=…) applies apply_uncertainty() to each generated scenario value. The result includes the model ID, parameter assumptions, a point list with optional uncertainty annotations, and the boundary that a scenario is a conditional planning calculation, not a forecast or causal estimate.

Safe preflight: use persist=False for authorized exploratory evaluation. The reviewed method defaults to persist=True, which records an analysis run. A UI should disclose write behavior, require appropriate permissions and return a stable result reference rather than silently persisting a preview. For statistical disclosure, save the exact scenario parameters, base-observation version, input hash, uncertainty-model revision and reviewer decision.

10. Sensitivity-analysis contract

run_sensitivity_analysis(scenario_id, parameter_ranges, *, actor="system") accepts parameter-to-[low,high] pairs, evaluates the final period under low, baseline and high values, and ranks parameters by the absolute difference between high and low results. The reviewed method writes sensitivity records; it does not infer that the highest numerical response indicates the strongest real-world causal driver.

# Illustrative shape of parameter ranges; not a live call:
parameter_ranges = {
    "annual_change": [-3.0, 3.0],
    "growth_rate_percent": [-1.0, 1.0],
}
# In an authorized staging environment, only after source/API review:
# report = repository.run_sensitivity_analysis(
#     scenario_id, parameter_ranges, actor=authenticated_actor)

Choose ranges using documented evidence rather than arbitrary numbers when communicating policy findings. Test that low ≤ high at the integration layer, that the scenario model actually uses each parameter, that units are coherent and that a persisted sensitivity run is subject to the same audit and privacy controls as the underlying scenario.

11. Uncertainty-aware comparison is not automatic

The reviewed run_comparison_set() signature has no uncertainty-model argument. It selects and converts comparable observations, filters some mismatches, sorts members, and returns ranks. Its integrity.valid can be true if just one member survives; it does not show pairwise uncertainty propagation or a probability that one place outperforms another.

To support uncertainty-aware comparisons, build a separate, explicitly versioned evaluation that confirms at least two eligible members, comparable indicator and denominator definitions, aligned sources and periods, dependence between estimates, and a justified uncertainty model for the contrast. Do not modify saved raw values or silently suppress excluded members. For independent synthetic A=80 ±8.775 (standard) and B=74 ±7 (standard), D=6, u(D)=sqrt(126)=11.225, and illustrative D ± 2u(D) crosses zero. An unqualified directional superiority claim is blocked.

A rank derived only from central values may be useful for exploration if explicitly labeled descriptive, but it cannot imply certainty, scientifically validated superiority, or causal contribution.

12. Identity, workspace isolation and authorization

For production integration, check authorization at every read and write boundary: user identity, tenant membership, workspace, initiative, indicator, uncertainty-model ID, source permissions and intended audience. The reviewed repository methods do not themselves prove that a public API enforces these controls. Do not present source function signatures as exposed HTTP routes.

Threat / failure Required test Fail-safe behavior
Cross-workspace model reference Try a scenario in workspace A with an uncertainty-model ID owned by B Reject without exposing the source or model.
Unauthorized actor Create/update/list/evaluate as viewer or foreign tenant 403/appropriate denial in actual service, no write, sanitized audit entry.
Stale revision Update a model with an old expected_revision Conflict and retained current revision.
Secret in description/assumptions Attempt to publish a restricted source locator or person-level detail Block public projection; preserve only permitted nonsecret evidence in logs.
Draft publication bypass Persist run then attempt public export with no approval Remain private/unpublished; no automatic approval.
Repeated submission Retry with same idempotency key under the service contract One intentional operation and a deterministic response; verify the actual deployed idempotency mechanism.

13. Revision control, idempotency and audit lineage

The reviewed register_uncertainty_model() accepts an optional expected_revision, creates or increments a revision and calls the repository audit function. For a defensible integration, require a known revision for mutations, preserve prior versions or immutable evidence snapshots, and document what happens on concurrent writes. A successful database write must not reset reviewer status, erase open corrections or silently authorize dissemination.

Record stable object IDs, original source and method IDs, the exact input hash, chosen uncertainty type, model parameters, unit, method version, source code commit, analysis run ID/hash, actor, timestamps, exclusions, change rationale, reviewer identity and publication decision. A content hash supports integrity of the captured bytes, not truth of the measurement or accuracy of the stated interval.

14. Error handling and scientific fail-closed behavior

The reviewed source raises AnalysisError for invalid uncertainty fields (unsupported type or distribution, missing required margin, negative margins, reversed bounds, unsupported lifecycle, invalid confidence metadata). Concurrency conflicts are delegated through repository concurrency checks. Integration code should translate these into stable, nonsecret errors and avoid logging request bodies containing private evidence.

Input or state Runtime rule in reviewed source Additional acceptance gate
NaN/Infinity finite() validation Reject in APIs and exports; no serialization as strings.
Negative margin Rejected Distinguish signed measurement corrections from unsigned uncertainty magnitudes.
Bounds center outside endpoints Bounds order checked Reject or flag before scientific/publication approval.
confidence_level=0.95 Accepted as metadata No “95% confidence” claim without calibrated model.
relative at center zero Zero calculated margin Flag insufficient coverage of fixed instrument floor.
Combined margin from same source twice RSS arithmetic accepted Review overlap and dependence; fail if double-counted.
Missing licensed source Optional source field in reviewed model Require permitted evidence for real-world published assertion.

15. Proposed integration-layer validation contract

The following is proposed pseudocode, not an existing GIC API. It demonstrates where scientific, authorization and publication checks should be performed around the reviewed repository methods:

def evaluate_for_review(request, principal, repo):
    authorize(principal, request.workspace_id, "analysis:review")
    source = load_permitted_source(request.source_id, principal)
    assert_current_revision(request.expected_revision, request.model_id)
    validate_model_type_unit_and_provenance(request, source)
    model = repo.get_uncertainty_model(request.model_id)
    assert_same_workspace(model, request.workspace_id)
    result = repo.apply_uncertainty(request.model_id, request.value)
    validate_bounds_or_block_publication(result)
    verify_scientific_assumptions(request, source, result)
    return private_review_packet(result, status="verification_pending")
# Explicit approval and public projection are separate workflows.

The wrapper must also verify the model’s source and method licenses, protect restricted fields, and prevent unknown uncertainty from being silently treated as zero. Exact auth roles, route paths, status codes, event names, and DB constraints must be verified in the installed service rather than copied from this candidate contract.

16. Source data, rights and public-output minimization

Public outputs should expose only approved aggregate indicators, scientifically appropriate intervals and allowed provenance links. Do not expose individuals, secrets, private workspace IDs, restricted source files, full internal errors or unapproved review discussions. Public search, index pages, caches, feeds and exports must independently enforce the same restriction; a private page response does not by itself make a leaked search index safe.

For research involving people, check consent, lawful basis, retention and re-use restrictions; scientific transparency does not override data-protection obligations. Retain hashes and redacted evidence references where legally and operationally appropriate. Preserve necessary audit history rather than deleting it simply because a model was corrected.

17. Evidence and claims governance

Claim Governance distinguishes descriptive observations, progress-to-target statements, comparisons, contribution statements and causal claims. Uncertainty propagation does not change a descriptive observation into evidence of attribution. Even well-calibrated uncertainty around an observed difference cannot independently rule out confounding or establish a program mechanism.

Require separate reviewer decisions for: (a) calculation parity, (b) adequacy of measurement uncertainty, (c) completeness of model-form and covariance assumptions, (d) claim eligibility, (e) privacy and source rights, and (f) public release. Make all statuses explicit. Where evidence is incomplete, a scientifically honest result is verification pending or uncertainty not assessed, not “verified with zero error.”

18. Verification: reference arithmetic and structural assertions

The companion scripts are independently written synthetic diagnostics and do not import the installed GIC repository. A developer should verify the four reviewed arithmetic branches against the pinned code, check negative and boundary cases, reproduce the independent covariance example, and then repeat equivalent cases against the actual installed runtime in an authorized staging environment.

python3 gic_uncertainty_contract.py --fixture synthetic_impact_uncertainty_2026.csv --output local_contract_report.json
python3 scientific_validation.py synthetic_impact_uncertainty_2026.csv --output scientific_gate_report.json
python3 -m pytest -q
# Staging/service tests are distinct and are not invoked by these commands.

Expected math at center 80: absolute margin 6 → [74,86]; relative 10% → [72,88]; combined → [70,90]; explicit bounds [70,92] (given fixture); independent measurement u=sqrt(77). Verify a model of the same identity with a changed revision does not silently replace a review-approved output.

19. Verification: mutation and authorization test cases

Use the staging matrix for version-specific cases, not only unit tests. At minimum: all four modes; malformed margins; nonfinite values; reversed bounds; center-outside-bounds quality check; missing source; cross-tenant model ID; viewer write attempts; stale revision; duplicate/idempotent retries; scenario persistence default; sensitivity writes; public projection minimization; draft approval bypass; audit failure; evidence withdrawal; export consistency; source hash changes; and rollback.

Each acceptance record needs expected and actual status, permitted actor identity or synthetic role, fixture ID, service build hash, commit, timestamp, log location without secrets, response hash, reviewer, and rollback result. Failure to exercise a case is NOT_RUN, not PASS. An accepted calculation cannot substitute for a successful tenant-isolation test.

20. Numerical tolerances and test oracles

Compare floating-point outputs with explicit absolute/relative tolerances that are appropriate to the underlying unit and the repository’s rounding. Test unrounded independent intermediates separately, rather than rounding all inputs before analysis. Where covariance, truncation, distribution shape or Monte Carlo simulation is involved, specify the stochastic assumptions, seed, number of draws, convergence criterion and uncertainty in the simulation estimate.

For the linear synthetic example, the independent result is 80 ± 8.774964 standard units; adding ρ(G,P)=+0.4 gives u≈7.602631, and ρ=-0.4 gives u≈9.808160. A seeded Monte Carlo example may corroborate arithmetic under its own Gaussian assumptions, but neither the simulation nor its quantiles validate field distributions or a coverage probability.

21. Troubleshooting

Symptom Likely cause Action
GIC result and independent result differ Percent confused with fraction; changed unit; rounded intermediates Recompute from source values and verify exact source-reviewed branch.
“95%” interval claimed from stored label confidence_level metadata treated as empirical coverage Remove claim; assess calibration, degrees of freedom and assumptions.
Uncertainty shrinks after adding a correlated input Shared-error covariance or sign misinterpreted Inspect sensitivity coefficients and covariance matrix.
Zero-centered relative model returns zero margin Relative-only formula Record missing absolute floor and block unjustified certainty.
Explicit bounds exclude estimate Revision mismatch or incorrectly entered endpoints Hold release; inspect recorded source and model version.
Scenario preview unexpectedly persisted Method default persist=True Verify audit history; pass persist=False in authorized previews.
Comparison rank presented as certain Uncertainty contrast not computed or multiple members excluded Recheck eligibility, common uncertainties and contrast; qualify or withdraw claim.
Model accessible across workspaces Service authorization or reference validation missing Contain exposure; test every read/write and all derived projections.
Approved output changes after source revision Unpinned inputs or missing immutable snapshot Hold distribution; re-run with pinned versions and request review.

22. Staging and publication acceptance

Source-reviewed function signatures and offline tests form a developer starting point, not production acceptance. Before publishing operational instructions as verified, capture an installed-build identification, authenticated role/tenant evidence, exact model and scenario revision behavior, read-only versus write tests, export and search restrictions, publication lifecycle checks, independent uncertainty-budget evaluation, calibrated coverage where claimed, and operational rollback.

Acceptance has three separate gates: engineering (correct and secure implementation), scientific (defensible uncertainty interpretation), and editorial/publication (approved, licensed, privacy-safe claims). All gates currently remain pending for the actual deployed product.

23. Documentation, audit packet and handoff

The engineering handoff should include the reviewed source paths and commit, installed version evidence, uncertainty-model input and output schema captured from staging, canonical IDs, test log/trace, reference calculation and exact tolerance, source license, lifecycle state, data retention classification, masked or synthetic reproducer, open defects, reviewer decisions, rollback steps and a statement of what remains unverified.

Do not copy sensitive case data into a public GitHub issue, assume that a successful save means approval, or label a reproducible calculation scientific certification. Existing source code does not establish a stable public route contract; do not fabricate one to complete a documentation checklist.

24. Reviewed references and technical guidance

  1. GIC Analysis module v1.7.0 — register, apply, evaluate, sensitivity, comparison calculations
  2. GIC service layer — verified Python delegation signatures
  3. GIC uncertainty and scenario governance — scope and scientific limits
  4. GIC analysis documentation — methodology and persistence
  5. GIC Indicator Registry — versioned definitions and units
  6. GIC Unit Governance — compatible dimensions and conversions
  7. GIC Claim Governance — claims and causal boundaries
  8. GIC Publication Controls — approval and release distinction
  9. GIC v2.0.0 source release document — consolidated source version
  10. JCGM 100:2008 (GUM) — expression of measurement uncertainty and correlated input models.
  11. JCGM 101:2008 — propagation of input distributions with Monte Carlo methods.
  12. NIST Engineering Statistics Handbook — uncertainty calculation and expanded uncertainty context.

Verification notice: References to GIC are pinned to the reviewed source commit. This article does not establish installed service parity, public endpoint availability, independent statistical validation, data rights, or production readiness.

Scroll to Top