Troubleshooting
Troubleshoot uncertainty displays — Visualization & Graphing
Troubleshoot uncertainty displays — Visualization & Graphing Cross-application area: Visualization & Graphing Status: Initial scientific graphics guidance; platform-specific features not verified. Recognize the defect The chart fo
Application area: Visualization & Graphing
Article classification: Troubleshooting / Scientific uncertainty / Rendering integrity
Audience: Researchers, scientific programmers, visualization developers, QA engineers, data analysts, and research publication reviewers
Technical level: Intermediate to advanced
Reference environment: Python 3, NumPy, SciPy, Matplotlib, and pytest
Primary outputs: Root-cause assessment, reproducible uncertainty calculations, corrected figure, regression tests, and documented scientific review
Estimated reading time: 14–18 minutes; approximately 30–45 minutes including exercises
1. Recognize the defect
An uncertainty-display defect occurs when the figure misrepresents the numerical magnitude, statistical definition, measurement meaning, or visual extent of uncertainty.
Some errors are obvious, such as an interval that disappears from the plotting area. Others are more serious because the figure appears plausible while conveying a scientifically incorrect interpretation.
Common symptoms include:
- Confidence intervals mislabeled as prediction intervals.
- Standard deviations presented as confidence intervals.
- Error bars with no defined statistical meaning.
- Prediction intervals unexpectedly narrower than confidence intervals under the same simple normal-sample model.
- Intervals that change after filtering without corresponding changes to sample counts.
- Confidence limits that do not match the stated estimator or method.
- Upper or lower interval bounds clipped by axis limits.
- Uncertainty values displayed in different units from their estimates.
- Asymmetric intervals rendered as symmetric error bars.
- Missing observations silently treated as zero.
- Prediction bands presented as measured observations.
- Ensemble spread presented as a calibrated confidence interval without supporting evidence.
- Uncertainty bands changing between browser preview and exported figure.
- Cached intervals calculated from an outdated dataset revision.
Central diagnostic condition: Readers must be able to distinguish confidence, prediction, and measurement uncertainty, and every displayed interval must reconcile with the specified source, calculation, units, and rendering configuration.
Do not treat a plausible-looking error bar as evidence that an uncertainty calculation is valid.
2. Classify the failure before correcting it
| Failure category | Typical symptom | First diagnostic action |
|---|---|---|
| Semantic error | Wrong interval type or label | Inspect method and uncertainty metadata |
| Statistical error | Incorrect confidence limits or standard error | Recalculate from source observations |
| Source error | Unexpected records or sample size | Reconcile selected observation identifiers |
| Missing-data error | Incorrect interval after exclusions | Inspect NaN, missingness, and filtering policy |
| Unit error | Interval width inconsistent with estimate | Validate source and display units |
| Geometry error | Reversed or distorted interval | Inspect estimate, lower bound, and upper bound |
| Axis error | Uncertainty bounds invisible | Compare bounds with plotting limits |
| Rendering error | Figure differs from numerical specification | Inspect rendered mark coordinates |
| Revision error | Different results from an unchanged query | Compare dataset and analytical revisions |
| Access or export error | Missing or unauthorized figure content | Verify authorization and export state |
More than one defect can exist simultaneously. For example, a confidence interval may be calculated correctly but labeled incorrectly and clipped during rendering.
3. Establish the scientific meaning of the uncertainty
Before examining software behavior, determine what the interval is intended to represent.
| Uncertainty type | Scientific meaning | Common misinterpretation |
|---|---|---|
| Observed variability | Variation among measured observations | Assumed to represent uncertainty about the population mean |
| Standard deviation | Dispersion of observations | Presented as a confidence interval |
| Standard error | Estimated sampling variability of a statistic | Interpreted as the spread of individual observations |
| Confidence interval | Parameter interval constructed using a specified coverage procedure | Interpreted as containing a fixed proportion of future observations |
| Prediction interval | Interval for a future outcome under a model | Interpreted as uncertainty only in the population mean |
| Measurement uncertainty | Uncertainty associated with a measurement result | Assumed to equal sampling variation or instrument resolution |
| Model ensemble spread | Variation across model runs or scenarios | Presented as a calibrated probability interval without validation |
The same graphical mark may be used for several uncertainty types, but the meaning is supplied by the underlying method and metadata.
For example, an interval from 8 to 12 has no complete scientific interpretation without knowing whether it represents a confidence interval, prediction interval, measurement uncertainty, or descriptive range.
4. Follow the diagnostic sequence
- Identify the affected figure. Record its identifier, revision, scientific question, source citation, and publication status.
- Preserve the source. Retain the original numerical observations, units, metadata, revision, and checksum.
- Verify the uncertainty type. Identify the intended estimator, interval method, probability or coverage level, and assumptions.
- Reconstruct the selected dataset. Check filters, missing-data handling, duplicate records, and sample sizes.
- Recalculate independently. Compute the estimate and interval endpoints outside the visualization renderer.
- Check interval geometry. Confirm the ordering and relationship between estimates and bounds under the declared interval contract.
- Validate units. Ensure estimates and bounds use compatible dimensions and appropriate conversions.
- Inspect graphical mapping. Compare numerical bounds with mark positions, axis limits, and legends.
- Inspect exported output. Verify that the saved artifact preserves the intended numerical and graphical state.
- Document recovery. Produce a corrected figure revision, regression tests, and an appropriate scientific or publication review record.
Correct the earliest confirmed failing layer. Do not modify authoritative data to compensate for a renderer defect.
5. Diagnose confidence-interval errors
For n independent observations from a normal population with unknown variance, the conventional Student-t confidence interval for the population mean is:
mean = sum(x_i) / n
s = sqrt(
sum((x_i - mean)^2) / (n - 1)
)
SE = s / sqrt(n)
CI = mean ± t_critical * SE
For a two-sided 95% confidence interval:
t_critical = t.ppf(0.975, df=n-1)
Common errors include:
- Using sample standard deviation directly instead of the standard error in the confidence-interval calculation.
- Using an incorrect sample size.
- Using an incorrect degrees-of-freedom value.
- Using a normal critical value without justifying the approximation.
- Ignoring clustering, repeated measurements, or serial correlation.
- Applying the formula to an unsuitable distribution or sampling design.
- Labeling a confidence interval as a range containing 95% of observations.
A nominal 95% confidence interval is defined through the repeated-sampling coverage of its construction method. It is not a statement that the particular observed interval contains 95% of future individual observations.
6. Diagnose prediction-interval errors
Under the same simple independent normal-observation model, a conventional two-sided prediction interval for one additional observation is:
PI = mean ± t_critical * s * sqrt(1 + 1/n)
The prediction interval accounts for both uncertainty about the estimated mean and variation in the future observation.
Under this model, with a positive sample standard deviation and the same coverage level, the prediction interval is wider than the corresponding confidence interval for the mean.
However, this relationship is not a universal validation rule for every statistical model. Different predictive targets, transformations, parameterizations, and conditioning assumptions may require different comparisons.
Check the definition of the predicted quantity before concluding that interval widths are incorrect.
7. Diagnose measurement-uncertainty errors
Measurement uncertainty concerns the uncertainty associated with a measured result.
It may incorporate instrument calibration, repeatability, resolution, environmental conditions, reference standards, and other uncertainty components.
A typical expanded-uncertainty expression is:
U = k * u_c
where:
Uis expanded uncertainty.kis a coverage factor.u_cis combined standard uncertainty.
Do not assign a particular coverage probability to k without appropriate metrological justification.
For an affine conversion with exact constants:
y = a*x + b
u_y = |a| * u_x
For example:
Source:
1000 ± 20 grams
Converted:
1.000 ± 0.020 kilograms
A common defect is converting the measured value but leaving its uncertainty in the original units.
For nonlinear transformations or correlated uncertainty components, use an appropriate propagation method rather than assuming that all uncertainty can be scaled by a single factor.
8. Diagnose missing data and selection effects
Uncertainty calculations depend on the observations contributing to the estimate.
When filtering or excluding data, validate:
- Selected record identifiers.
- Contributing sample size.
- Missing-value policy.
- Quality-control exclusions.
- Weights and repeated-measurement structure.
- Statistical estimates and recalculated uncertainty.
- Source and analysis revisions.
A chart may appear to contain five observations while its uncertainty calculation uses a different subset.
Do not silently convert missing observations to zero. A missing measurement and a measured value of zero are scientifically distinct.
When an estimator cannot be calculated from the available data, display a defined unavailable state rather than fabricating a numerical interval.
9. Diagnose invalid interval geometry
For conventional central-estimate intervals, use:
lower <= estimate <= upper
The corresponding lower and upper graphical error extents are:
lower_error = estimate - lower
upper_error = upper - estimate
Both error extents must be nonnegative.
Do not assume that all scientific uncertainty distributions are symmetric. Asymmetric confidence, prediction, or measurement intervals require distinct lower and upper bounds.
Some scientifically valid intervals, including particular highest-density or disjoint credible regions, do not fit a simple central-estimate error-bar contract. Such cases require a representation designed for their actual mathematical structure.
10. Diagnose clipping, scale, and rendering defects
Even correct uncertainty bounds may be displayed incorrectly.
Consider:
Estimate = 10
Validated interval:
[8, 12]
Plotting limits:
[9, 11]
The figure clips both interval endpoints.
Check:
- Axis minimum and maximum.
- Linear or logarithmic transformation.
- Automatic axis scaling.
- Interval caps and line geometry.
- Rendering order and overlapping marks.
- Interactive filters.
- Missing-value and clipping policies.
- Static-export configuration.
Ordinary logarithmic axes cannot represent zero or negative bounds directly. Do not silently omit nonpositive interval portions or substitute arbitrary positive values.
A renderer may support graphical clipping for legitimate display purposes, but such clipping must not conceal scientific evidence without appropriate disclosure.
11. Create a synthetic reference fixture
The following synthetic dataset is suitable for reproducing a confidence-versus-prediction-interval labeling defect.
| Record | Response (synthetic units) |
|---|---|
| R01 | 8 |
| R02 | 9 |
| R03 | 10 |
| R04 | 11 |
| R05 | 12 |
Expected statistics:
n = 5
mean = 10
Sample standard deviation:
sqrt(2.5) ≈ 1.581139
Standard error:
sqrt(0.5) ≈ 0.707107
95% Student-t confidence interval:
[8.036757, 11.963243]
95% Student-t prediction interval:
[5.191056, 14.808944]
These results use an independent normal-observation model. The fixture is synthetic and is not empirical evidence about an actual population.
The deliberate defect in the exercise will be a prediction interval incorrectly labeled as a confidence interval.
12. Prepare the development environment
mkdir uncertainty-troubleshooting
cd uncertainty-troubleshooting
python3 -m venv .venv
source .venv/bin/activate
python -m pip install numpy scipy matplotlib pytest
python --version
python -m pip freeze > requirements-lock.txt
Retain the actual dependency versions when creating scientific acceptance evidence. For controlled research environments, use a reviewed lockfile and dependency-integrity process.
13. Implement the numerical diagnostic module
Save as uncertainty_diagnostics.py.
from dataclasses import dataclass
from hashlib import sha256
import json
import math
import numpy as np
from scipy.stats import t
SOURCE_ID = "synthetic-uncertainty-fixture"
SOURCE_REVISION = "1.0"
METHOD_VERSION = "student-t-diagnostics-1"
OBSERVATIONS = np.array(
[8.0, 9.0, 10.0, 11.0, 12.0]
)
@dataclass(frozen=True)
class Interval:
kind: str
estimate: float
lower: float
upper: float
level: float
n: int
units: str
method: str
def source_digest(values):
data = np.asarray(values, dtype=float)
payload = json.dumps(
data.tolist(),
separators=(",", ":"),
allow_nan=False
).encode("utf-8")
return sha256(payload).hexdigest()
def calculate_intervals(values, level=0.95):
data = np.asarray(values, dtype=float)
if data.ndim != 1 or data.size < 2:
raise ValueError(
"At least two observations required"
)
if not np.isfinite(data).all():
raise ValueError(
"Nonfinite observations"
)
if not (
math.isfinite(level)
and 0 < level < 1
):
raise ValueError(
"Invalid interval level"
)
n = int(data.size)
mean = float(np.mean(data))
sd = float(np.std(data, ddof=1))
critical = float(
t.ppf((1 + level) / 2, df=n - 1)
)
ci_half = critical * sd / math.sqrt(n)
pi_half = (
critical
* sd
* math.sqrt(1 + 1 / n)
)
ci = Interval(
kind="confidence_interval",
estimate=mean,
lower=mean - ci_half,
upper=mean + ci_half,
level=level,
n=n,
units="synthetic units",
method="student_t_mean_ci"
)
pi = Interval(
kind="prediction_interval",
estimate=mean,
lower=mean - pi_half,
upper=mean + pi_half,
level=level,
n=n,
units="synthetic units",
method="student_t_one_future_observation"
)
return ci, pi
def validate_interval(interval):
if interval.kind not in {
"confidence_interval",
"prediction_interval",
"measurement_uncertainty"
}:
raise ValueError(
"Unknown uncertainty type"
)
if not interval.units.strip():
raise ValueError("Missing units")
if not interval.method.strip():
raise ValueError("Missing method")
if not all(
math.isfinite(value)
for value in (
interval.estimate,
interval.lower,
interval.upper
)
):
raise ValueError(
"Nonfinite interval value"
)
if not (
interval.lower
<= interval.estimate
<= interval.upper
):
raise ValueError(
"Invalid central interval geometry"
)
if not (
math.isfinite(interval.level)
and 0 < interval.level < 1
):
raise ValueError(
"Invalid nominal level"
)
if interval.n < 2:
raise ValueError(
"Insufficient sample size"
)
return True
def validate_label(interval, displayed_kind):
validate_interval(interval)
if displayed_kind != interval.kind:
raise ValueError(
"UNCERTAINTY_TYPE_MISMATCH"
)
return True
def inspect_axis(interval, lower, upper):
validate_interval(interval)
if not all(
math.isfinite(x)
for x in (lower, upper)
):
raise ValueError(
"Nonfinite axis bounds"
)
if lower >= upper:
raise ValueError(
"Invalid axis range"
)
issues = []
if interval.lower < lower:
issues.append(
"LOWER_INTERVAL_CLIPPED"
)
if interval.upper > upper:
issues.append(
"UPPER_INTERVAL_CLIPPED"
)
return issues
def graphical_extents(interval):
validate_interval(interval)
return (
interval.estimate - interval.lower,
interval.upper - interval.estimate
)
This module separates statistical computation, scientific semantics, interval geometry, and axis validation.
Its central-interval contract is intentionally limited. More complex uncertainty structures may require distinct types and validation logic.
14. Reproduce the labeling defect
Save as run_uncertainty_diagnostics.py.
from dataclasses import asdict
from pathlib import Path
import hashlib
import json
import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt
from uncertainty_diagnostics import (
OBSERVATIONS,
SOURCE_ID,
SOURCE_REVISION,
METHOD_VERSION,
calculate_intervals,
validate_label,
inspect_axis,
graphical_extents,
source_digest
)
OUTPUT = Path("diagnostic-output")
def sha256_file(path):
return hashlib.sha256(
Path(path).read_bytes()
).hexdigest()
def render_interval(interval, title, filename):
lower_error, upper_error = (
graphical_extents(interval)
)
fig, ax = plt.subplots(
figsize=(6, 4),
dpi=160
)
ax.errorbar(
x=[0],
y=[interval.estimate],
yerr=[
[lower_error],
[upper_error]
],
fmt="o",
markersize=9,
capsize=7
)
ax.set_xlim(-0.5, 0.5)
ax.set_ylim(3, 17)
ax.set_xticks([0], ["Synthetic group"])
ax.set_ylabel(
f"Response ({interval.units})"
)
ax.set_title(title)
fig.tight_layout()
path = OUTPUT / filename
fig.savefig(path)
plt.close(fig)
return path
def main():
OUTPUT.mkdir(exist_ok=True)
ci, pi = calculate_intervals(
OBSERVATIONS
)
# Deliberate defect:
# A prediction interval is labeled as a CI.
defective_label = "confidence_interval"
try:
validate_label(pi, defective_label)
defect_detected = False
except ValueError as error:
if str(error) != "UNCERTAINTY_TYPE_MISMATCH":
raise
defect_detected = True
assert defect_detected
# Correctly validate each interval.
assert validate_label(
ci, "confidence_interval"
)
assert validate_label(
pi, "prediction_interval"
)
# Confirm the plotting range is adequate.
assert inspect_axis(ci, 3, 17) == []
assert inspect_axis(pi, 3, 17) == []
defective = render_interval(
pi,
"Incorrectly labeled 95% confidence interval",
"defective-label.png"
)
corrected_ci = render_interval(
ci,
"95% CI for population mean",
"corrected-confidence.png"
)
corrected_pi = render_interval(
pi,
"95% PI for one future observation",
"corrected-prediction.png"
)
report = {
"classification": "synthetic",
"source_id": SOURCE_ID,
"source_revision": SOURCE_REVISION,
"source_sha256": source_digest(
OBSERVATIONS
),
"method_version": METHOD_VERSION,
"defect": "UNCERTAINTY_TYPE_MISMATCH",
"confidence_interval": asdict(ci),
"prediction_interval": asdict(pi),
"artifacts": {
"defective": sha256_file(defective),
"corrected_ci": sha256_file(corrected_ci),
"corrected_pi": sha256_file(corrected_pi)
},
"numerical_reconciliation": "not_tested",
"visual_review": "not_tested",
"accessibility_review": "not_tested",
"scientific_review": "not_tested",
"publication_approval": "not_approved"
}
(OUTPUT / "report.json").write_text(
json.dumps(report, indent=2),
encoding="utf-8"
)
print(
"Defect detected:",
defect_detected
)
print(
"CI:",
round(ci.lower, 6),
round(ci.upper, 6)
)
print(
"PI:",
round(pi.lower, 6),
round(pi.upper, 6)
)
if __name__ == "__main__":
main()
14.1 Execute the reproduction
python run_uncertainty_diagnostics.py
Expected output:
Defect detected: True
CI: 8.036757 11.963243
PI: 5.191056 14.808944
Expected artifacts:
diagnostic-output/
defective-label.png
corrected-confidence.png
corrected-prediction.png
report.json
The defective figure deliberately displays a prediction interval with a confidence-interval title.
The corrected figures distinguish the two statistical meanings and use their appropriate numerical bounds.
Observe that the defect was not caused by incorrect numerical calculations. It was caused by incorrect labeling and interpretation.
This illustrates why a statistical figure can be numerically accurate but scientifically misleading.
15. Implement automated regression tests
After correcting a defect, add tests that prevent the same class of error from recurring.
Save as test_uncertainty_diagnostics.py.
from dataclasses import replace
import numpy as np
import pytest
from uncertainty_diagnostics import (
OBSERVATIONS,
calculate_intervals,
validate_interval,
validate_label,
inspect_axis,
graphical_extents,
source_digest
)
def reference():
return calculate_intervals(
OBSERVATIONS
)
def test_reference_mean():
ci, pi = reference()
assert ci.estimate == 10.0
assert pi.estimate == 10.0
def test_golden_confidence_bounds():
ci, _ = reference()
assert ci.lower == pytest.approx(
8.03675684,
abs=1e-6
)
assert ci.upper == pytest.approx(
11.96324316,
abs=1e-6
)
def test_golden_prediction_bounds():
_, pi = reference()
assert pi.lower == pytest.approx(
5.19105601,
abs=1e-6
)
assert pi.upper == pytest.approx(
14.80894399,
abs=1e-6
)
def test_prediction_wider():
ci, pi = reference()
assert (
pi.upper - pi.lower
> ci.upper - ci.lower
)
def test_correct_labels():
ci, pi = reference()
assert validate_label(
ci, "confidence_interval"
)
assert validate_label(
pi, "prediction_interval"
)
def test_mislabeled_prediction_rejected():
_, pi = reference()
with pytest.raises(
ValueError,
match="UNCERTAINTY_TYPE_MISMATCH"
):
validate_label(
pi, "confidence_interval"
)
def test_invalid_interval_geometry():
ci, _ = reference()
broken = replace(
ci,
lower=12,
upper=8
)
with pytest.raises(ValueError):
validate_interval(broken)
def test_missing_units_rejected():
ci, _ = reference()
with pytest.raises(ValueError):
validate_interval(
replace(ci, units="")
)
def test_unknown_type_rejected():
ci, _ = reference()
with pytest.raises(ValueError):
validate_interval(
replace(ci, kind="unknown")
)
def test_clipped_lower_bound():
ci, _ = reference()
issues = inspect_axis(
ci, lower=9, upper=15
)
assert "LOWER_INTERVAL_CLIPPED" in issues
def test_clipped_upper_bound():
ci, _ = reference()
issues = inspect_axis(
ci, lower=5, upper=11
)
assert "UPPER_INTERVAL_CLIPPED" in issues
def test_valid_axis_bounds():
ci, pi = reference()
assert inspect_axis(ci, 3, 17) == []
assert inspect_axis(pi, 3, 17) == []
def test_error_extents():
ci, _ = reference()
lower, upper = graphical_extents(ci)
assert lower >= 0
assert upper >= 0
assert lower == pytest.approx(upper)
def test_source_digest_stable():
first = source_digest(OBSERVATIONS)
second = source_digest(
OBSERVATIONS.copy()
)
assert first == second
def test_source_digest_changes():
modified = OBSERVATIONS.copy()
modified[0] = 99
assert source_digest(modified) != (
source_digest(OBSERVATIONS)
)
def test_empty_source_rejected():
with pytest.raises(ValueError):
calculate_intervals([])
def test_one_observation_rejected():
with pytest.raises(ValueError):
calculate_intervals([10])
@pytest.mark.parametrize(
"invalid",
[np.nan, np.inf, -np.inf]
)
def test_nonfinite_source_rejected(invalid):
with pytest.raises(ValueError):
calculate_intervals(
[8., 9., invalid, 11., 12.]
)
@pytest.mark.parametrize(
"level",
[0.0, 1.0, -0.1, 1.1]
)
def test_invalid_level_rejected(level):
with pytest.raises(ValueError):
calculate_intervals(
OBSERVATIONS,
level=level
)
Execute:
python -m pytest -v test_uncertainty_diagnostics.py
The suite defines 23 individual test cases after expanding the parameterized invalid-input tests.
It checks statistical calculations, interval semantics, clipping, source identity, invalid geometry, missing units, and invalid numerical inputs.
The tests are reference definitions, not evidence of execution against Sustainable Catalyst production services.
16. Validate the actual graphical marks
A statistical calculation can pass numerical tests while the renderer draws the wrong bounds.
Inspect the plotted mark coordinates rather than relying only on whether an image file exists.
For a conventional error bar:
expected_lower =
estimate - lower_error
expected_upper =
estimate + upper_error
Reconcile these with the validated lower and upper endpoints.
For numeric values near zero, use tolerances appropriate to the scientific precision and floating-point implementation.
Also inspect:
- Correct interval cap locations.
- Axis units and scaling.
- Group ordering.
- Legend and caption terminology.
- Missing or clipped marks.
- Color and marker distinctions.
- Consistency between interactive and static exports.
For complex or interactive renderers, the actual scene graph, SVG geometry, structured renderer specification, or browser-state evidence may be needed to establish graphical correctness.
17. Diagnose time-dependent and spatial uncertainty
17.1 Time-dependent intervals
For uncertainty bands across time, verify that each estimate and its interval are associated with the correct timestamp.
Check:
- Time zones and observation times.
- Missing or irregular time intervals.
- Interpolation and smoothing methods.
- Source and analysis revisions.
- Pointwise versus simultaneous interval coverage.
- Changes in sample size over time.
A set of pointwise 95% confidence intervals does not automatically provide 95% simultaneous coverage of an entire function.
17.2 Spatial uncertainty
For uncertainty maps and geospatial figures, validate:
- Coordinate reference systems.
- Spatial coverage and resolution.
- Observed versus interpolated locations.
- Spatial autocorrelation.
- Source observation density.
- Color-scale normalization.
- No-data and masked regions.
Do not interpret an interpolated uncertainty surface as a direct measurement at every location.
17.3 Simulation uncertainty
For simulation outputs, retain the model version, parameter distributions, random seed where applicable, ensemble size, and interval-generation procedure.
Do not interpret arbitrary scenario ranges as calibrated prediction intervals unless the statistical model justifies that meaning.
18. Diagnose caching, revisions, and permissions
An uncertainty figure may change because its analytical state changed, even when the user did not intentionally alter the chart.
Compare:
- Source dataset revision.
- Selected record identifiers.
- Filter state.
- Statistical method version.
- Uncertainty calculation parameters.
- Renderer version.
- Cache identity and invalidation policy.
- User or project authorization scope.
Cached numerical results must be associated with the correct source revision, filters, and method parameters.
Do not permit a cached interval generated from one user’s restricted data to appear in another user’s result.
Public exports should contain only authorized data and metadata.
19. Controlled recovery procedure
Once the cause of the defect has been established, recover without destroying the original research evidence.
- Preserve the original figure. Retain the source artifact, analytical configuration, rendered output, and existing publication reference.
- Identify the failing layer. Determine whether the defect is statistical, semantic, source-related, or graphical.
- Reproduce the failure. Create a small synthetic fixture or an authorized minimal case with known expected outcomes.
- Correct the responsible component. Repair the calculation, interval metadata, units, label, or rendering configuration as appropriate.
- Validate numerical equivalence. Compare corrected results with independent calculations.
- Inspect the corrected figure. Verify marks, interval bounds, axes, captions, and accessible numerical equivalents.
- Execute regression tests. Demonstrate that the original defect would now be detected.
- Create a new revision. Record the corrected source references, method version, figure artifact, and evidence.
- Assess publication impact. Identify scientific claims or decisions affected by the original figure.
- Obtain review and approval. Preserve the reviewer decision and correction history before publication.
If the original error affected a published scientific result, correct the publication transparently rather than silently replacing the figure.
20. Accessibility and communication recovery
A corrected uncertainty display must be interpretable by its intended audience.
Review:
- Explicit uncertainty type.
- Defined statistical or metrological method.
- Confidence or prediction level where relevant.
- Sample sizes.
- Measurement units.
- Accessible numerical tables.
- Extended chart descriptions.
- Color-independent distinctions.
- Keyboard accessibility for interactive controls.
- Readable interval markers and axis labels.
The accessible representation should use the same numerical values and scientific definitions as the visual figure.
WCAG 2.2 provides relevant accessibility requirements for web graphics and controls (W3C, 2024).
21. Troubleshooting acceptance matrix
| Criterion | Pass condition | Evidence |
|---|---|---|
| Source integrity | Correct authoritative source and revision preserved | Source checksum and provenance |
| Uncertainty semantics | Interval meaning explicitly defined and correct | Method and label inspection |
| Statistical calculation | Estimates and intervals reconcile independently | Golden-fixture tests |
| Contributing observations | Record membership and sample count correct | Source reconciliation |
| Missing-data handling | Exclusions and invalid values treated transparently | Negative tests |
| Interval geometry | Bounds and rendered extents correspond correctly | Data-to-mark tests |
| Unit consistency | Estimates and uncertainty use compatible units | Conversion verification |
| Scale and clipping | Relevant interval values visible or limitations disclosed | Axis-domain tests |
| Rendering | Figure matches validated numerical specification | Actual exported artifact inspection |
| Cache and revision state | Results correspond to intended source and analysis revision | State inspection |
| Authorization | Source and export rights enforced | Negative security tests |
| Accessibility | Essential interval meaning and values available accessibly | Accessibility review |
| Reproducibility | Corrected figure can be independently reconstructed | Execution receipt |
| Scientific review | Corrected interpretation is supported by data and methods | Independent assessment |
| Publication correction | Affected accepted outputs reviewed and corrected appropriately | Publication decision record |
Acceptance rule: Record applicable criteria as Pass, Fail, Not Tested, or Not Applicable. A defect is not resolved merely because a new error bar appears in the chart.
22. Evidence package and correction manifest
A complete troubleshooting record should retain:
- Incident or issue identifier.
- Affected figure and publication revision.
- Source dataset, version, and checksum.
- Original uncertainty type and method.
- Confirmed root cause.
- Original and corrected numerical intervals.
- Original and corrected labels and graphical settings.
- Source and processing code revisions.
- Renderer and dependency versions.
- Generated figure artifacts and hashes.
- Executed numerical and rendering tests.
- Accessibility and security findings.
- Scientific review and publication-correction decisions.
22.1 Illustrative correction record
{
"schema_version": "example-1.0",
"issue_id": "synthetic-uncertainty-001",
"source": {
"artifact_id": "synthetic-uncertainty-fixture",
"revision": "1.0",
"classification": "synthetic",
"sha256": null
},
"defect": {
"class": "uncertainty_semantic_mismatch",
"original_label": "confidence_interval",
"actual_interval_type": "prediction_interval"
},
"correction": {
"source_values_changed": false,
"corrected_label": "prediction_interval",
"method": "student_t_one_future_observation",
"new_figure_revision": null
},
"acceptance": {
"source_integrity": "not_tested",
"numerical_reconciliation": "not_tested",
"interval_semantics": "not_tested",
"rendering": "not_tested",
"accessibility": "not_tested",
"scientific_review": "not_tested",
"publication_impact": "not_tested"
},
"release_decision": "NO_GO"
}
This is an illustrative documentation format, not a verified Sustainable Catalyst API or persisted incident schema.
Replace placeholder statuses and identifiers only with actually recorded evidence.
23. Sustainable Catalyst integration and source audit
Uncertainty troubleshooting is relevant to the intended relationships among Sustainable Catalyst’s research, analysis, visualization, and publication areas.
| Application | Intended responsibility |
|---|---|
| Library | Preserve authoritative observations, uncertainty metadata, source revisions, and rights |
| Workbench | Reproduce statistical calculations and interval-generation methods where implemented |
| Research Lab | Assess uncertainty models, scientific assumptions, and measurement validity |
| Visualization & Graphing | Diagnose interval marks, labels, rendering adapters, scales, and exports |
| Site Intelligence | Validate spatial uncertainty displays where supported |
| Decision Studio | Check model and scenario uncertainty in decision comparisons where implemented |
| Workspace | Track issues, corrected figures, acceptance evidence, and reviewer decisions |
| Research | Identify published uncertainty figures and manage approved corrections |
23.1 Required platform source audit
Before certifying a specific Sustainable Catalyst uncertainty-display correction, attach:
- Owning repository and exact code revision.
- Implemented statistical calculation engine.
- Actual uncertainty schemas and numerical contracts.
- Renderer and adapter versions.
- Source-to-figure provenance mappings.
- Missing-data, interval, and unit-conversion behavior.
- Axis, scale, and clipping rules.
- Cache and revision behavior.
- Actual runtime screenshots and exported figures.
- Executed golden-fixture and negative-test receipts.
- Accessibility and authorization evidence.
- Independent scientific review results.
- Publication-correction approval where applicable.
The availability of an error-bar component in Matplotlib, Plotly, Vega-Lite, or another renderer does not establish that the platform correctly calculates or validates statistical uncertainty.
24. Escalation criteria
Escalate to scientific, engineering, or publication review when:
- Confidence and prediction intervals are confused.
- Source observations cannot be reconciled with displayed uncertainty.
- Uncertainty methodology is undocumented or inappropriate.
- Clustering, dependence, or repeated measurements have been ignored.
- Measurement uncertainty is mislabeled or incorrectly converted.
- Numerical bounds are invalid or cannot be reproduced.
- Relevant intervals are clipped or hidden.
- Cached figures represent outdated analytical revisions.
- Restricted research data may have been exposed.
- A published scientific conclusion depends on an incorrect uncertainty display.
Material uncertainty errors must not be treated merely as cosmetic visualization defects. They can alter the meaning of the scientific evidence itself.
25. Technical references
- Joint Committee for Guides in Metrology (JCGM) (2008). Evaluation of Measurement Data — Guide to the Expression of Uncertainty in Measurement. JCGM 100:2008. Available at: BIPM/JCGM publications.
- Joint Committee for Guides in Metrology (JCGM) (2012). International Vocabulary of Metrology — Basic and General Concepts and Associated Terms. JCGM 200:2012. Available at: BIPM/JCGM publications.
- SciPy Community (n.d.). scipy.stats.t. Available at: SciPy documentation.
- Matplotlib Development Team (n.d.). matplotlib.pyplot.errorbar. Available at: Matplotlib documentation.
- Vega-Lite Developers (n.d.). Error Bar. Available at: Vega-Lite documentation.
- Vega-Lite Developers (n.d.). Error Band. Available at: Vega-Lite documentation.
- Harris, C.R. et al. (2020). ‘Array programming with NumPy’, Nature, 585, pp. 357–362. Available at: https://doi.org/10.1038/s41586-020-2649-2.
- pytest Development Team (n.d.). pytest Documentation. Available at: https://docs.pytest.org/en/stable/.
- World Wide Web Consortium (W3C) (2024). Web Content Accessibility Guidelines (WCAG) 2.2. Available at: https://www.w3.org/TR/WCAG22/.
- W3C Web Accessibility Initiative (n.d.). Complex Images. Available at: W3C WAI guidance.
- OWASP Foundation (n.d.). Cross Site Scripting Prevention Cheat Sheet. Available at: OWASP Cheat Sheet Series.
26. Completion and verification record
| Field | Required record |
|---|---|
| Issue identifier | Unique diagnostic reference |
| Affected figure | Figure identifier and revision |
| Source integrity | Pass, Fail, or Not Tested |
| Uncertainty semantics | Pass, Fail, or Not Tested |
| Statistical calculations | Pass, Fail, or Not Tested |
| Contributing records | Pass, Fail, or Not Tested |
| Missing-data handling | Pass, Fail, or Not Tested |
| Interval geometry | Pass, Fail, or Not Tested |
| Unit consistency | Pass, Fail, or Not Tested |
| Scale and clipping | Pass, Fail, or Not Tested |
| Rendering and export | Pass, Fail, or Not Tested |
| Revision and cache state | Pass, Fail, or Not Tested |
| Authorization | Pass, Fail, or Not Tested |
| Accessibility | Pass, Fail, or Not Tested |
| Reproducibility | Pass, Fail, or Not Tested |
| Scientific review | Pass, Fail, or Not Tested |
| Publication impact | Reviewed finding and corrective action |
| Root cause | Confirmed explanation or unresolved hypothesis |
| Corrective action | Documented change and rationale |
| Reviewer | Actual reviewer and date |
| Evidence artifacts | Source data, statistical calculations, figures, hashes, and test receipts |
| Outstanding limitations | Unresolved scientific or implementation concerns |
Completion criterion: An uncertainty-display defect is resolved when its root cause has been established, the authoritative evidence remains preserved, uncertainty calculations and representations are numerically reproducible, labels and graphical marks accurately communicate the intended scientific meaning, and applicable accessibility, authorization, scientific review, and publication-correction requirements are satisfied.
Scientific limitation: Repairing an uncertainty display does not establish that the underlying statistical model, measurement process, sampling design, or causal interpretation is valid. Numerical correctness, graphical fidelity, and scientific inference remain separate validation responsibilities.
Current implementation status: Troubleshooting methodology, synthetic reference fixture, deliberate semantic-defect reproduction, corrected confidence and prediction figures, numerical regression tests, and proposed acceptance requirements documented. No particular Sustainable Catalyst uncertainty-calculation service, graphing engine, or publication-correction workflow is certified without implementation-specific source audit, executed tests, actual rendering inspection, and release acceptance evidence.
