Worked Examples
Create uncertainty displays — Visualization & Graphing
Create uncertainty displays — Visualization & Graphing Cross-application area: Visualization & Graphing Status: Initial scientific graphics guidance; platform-specific features not verified. Goal Show intervals, distributions or d
Application area: Visualization & Graphing
Article classification: Practical guide / Scientific uncertainty / Statistical visualization
Audience: Researchers, scientific programmers, data analysts, visualization developers, and research reviewers
Technical level: Intermediate to advanced
Reference environment: Python 3, NumPy, SciPy, Matplotlib, and pytest
Scientific methods: Descriptive statistics, confidence intervals, prediction intervals, and measurement uncertainty
Primary outputs: Reproducible uncertainty figures, statistical definitions, numerical validation tests, source references, and scientific acceptance evidence
Estimated reading time: 14–18 minutes, excluding exercises
1. Goal and expected outcome
The goal is to create scientific graphics in which uncertainty is represented according to its actual meaning, rather than through generic error bars or visually attractive shading.
At the end of this exercise, the reader should be able to:
- Distinguish observed variability from uncertainty about a population parameter.
- Explain the difference between confidence intervals, prediction intervals, and measurement uncertainty.
- Choose graphical marks appropriate to each uncertainty type.
- Calculate reference uncertainty intervals from a synthetic dataset.
- Display raw observations alongside relevant statistical summaries.
- Validate numerical bounds before rendering.
- Document assumptions, sample sizes, units, and source provenance.
- Preserve reproducible figures and numerical evidence.
- Recognize when statistical or scientific review is required.
Primary acceptance condition: Readers must be able to distinguish the types of uncertainty represented in the figure, identify their numerical definitions and assumptions, and trace graphical bounds to validated calculations.
2. Understand what the uncertainty represents
Different forms of uncertainty answer different scientific questions.
| Type | What it describes | Typical representation |
|---|---|---|
| Observed variability | Variation among actual observations | Raw points, distributions, box plots, or descriptive intervals |
| Standard deviation | Dispersion of measured values around their mean | Numerical summary or explicitly labeled mean ± SD |
| Standard error | Estimated sampling variability of a statistic such as the sample mean | Numerical summary or explicitly labeled uncertainty interval |
| Confidence interval | Interval produced by a procedure with a stated repeated-sampling coverage probability for an unknown population parameter | Point estimate with a labeled confidence interval |
| Prediction interval | Range for a future observation under a specified predictive model | Point-interval plot or appropriately labeled prediction band |
| Measurement uncertainty | Uncertainty associated with the reported result of a measurement | Measurement with appropriately defined uncertainty bounds |
| Model uncertainty | Uncertainty arising from parameters, model structure, inputs, or predictive assumptions | Model-dependent intervals, ensembles, or distribution summaries |
These concepts must not be used interchangeably. A standard deviation does not become a confidence interval simply because it is shown as an error bar.
Similarly, an interval indicating uncertainty in the estimated population mean is not automatically a prediction interval for a future individual observation.
3. Define the scientific question
Start with the claim or comparison that the figure is intended to support.
Examples:
- How variable are the measurements within each experimental group?
- How precisely is the population mean estimated?
- What range might contain a future individual observation under a given model?
- How uncertain is a measurement due to instrument calibration or resolution?
- How much uncertainty exists in model predictions across scenarios?
- How does uncertainty change over time or geographic location?
Each question requires different data, assumptions, calculations, and graphical annotations.
For the worked example, the questions are:
How do the sample distributions of two synthetic groups differ, and how do their confidence intervals for the population means differ from prediction intervals for individual future observations?
The exercise does not test for a causal treatment effect or establish statistical significance.
4. Select an appropriate graphical form
| Scientific objective | Candidate representation | Important limitation |
|---|---|---|
| Inspect individual observations | Raw-point or strip plot | Large datasets may produce overplotting |
| Describe variation | Box plot, histogram, or empirical distribution | Summary definitions and sample sizes matter |
| Compare estimated means | Point estimates with confidence intervals | Intervals are conditional on statistical assumptions |
| Predict future individual values | Point estimates with prediction intervals | Predictive model and population must be defined |
| Display measurement uncertainty | Observation with measurement-uncertainty bars | Must define uncertainty type and coverage factor |
| Display time-dependent uncertainty | Line with confidence or prediction band | Distinguish observations, estimates, and interpolated values |
| Display spatial uncertainty | Uncertainty map or coordinated spatial panels | Spatial dependence and scale normalization matter |
| Display simulation ensembles | Ensemble trajectories, quantile bands, or density summaries | Ensemble spread is not automatically a calibrated probability interval |
The graphic should not imply more precision, certainty, or observational coverage than the source data and statistical method support.
5. Understand the statistical calculations
5.1 Arithmetic mean
For n observations:
mean = sum(x_i) / n
5.2 Sample standard deviation
For n greater than one:
s = sqrt(
sum((x_i - mean)^2) / (n - 1)
)
The sample standard deviation describes dispersion among observations. Its interpretation depends on the sample and measurement process.
5.3 Standard error of the mean
For independent, identically distributed observations with finite variance:
SE_mean = s / sqrt(n)
Repeated measurements from the same experimental unit, spatial autocorrelation, and temporal dependence can invalidate the simple independent-sample calculation.
5.4 Student-t confidence interval for a population mean
Under the relevant assumptions, a two-sided confidence interval is:
CI_lower = mean - t_critical * s / sqrt(n)
CI_upper = mean + t_critical * s / sqrt(n)
For a conventional 95% confidence interval, the critical value is the 97.5th percentile of a Student-t distribution with n − 1 degrees of freedom.
This interval procedure has nominal 95% repeated-sampling coverage under the model assumptions. It does not mean that the fixed population mean has a 95% probability of lying within the particular observed interval.
5.5 Prediction interval for one future observation
Under an independent, normally distributed observation model with an unknown mean and variance, a conventional two-sided prediction interval for one additional observation is:
PI_lower =
mean - t_critical * s * sqrt(1 + 1/n)
PI_upper =
mean + t_critical * s * sqrt(1 + 1/n)
The prediction interval is generally wider than the confidence interval for the mean because it accounts for variation in an individual future observation as well as uncertainty in the estimated mean.
These formulas are educational references. They are not appropriate for every study design or distribution.
6. Construct a synthetic example
Use two synthetic groups, each containing five observations.
| Record | Group | Response (synthetic units) |
|---|---|---|
| C01 | Control | 8 |
| C02 | Control | 9 |
| C03 | Control | 10 |
| C04 | Control | 11 |
| C05 | Control | 12 |
| T01 | Treatment | 11 |
| T02 | Treatment | 12 |
| T03 | Treatment | 13 |
| T04 | Treatment | 14 |
| T05 | Treatment | 15 |
The groups have:
Control:
n = 5
mean = 10
Treatment:
n = 5
mean = 13
Both groups:
sample standard deviation = sqrt(2.5)
approximately 1.5811 synthetic units
The standard errors are approximately 0.7071 synthetic units.
These are synthetic values, not empirical research findings. The exercise assumes independence and an underlying normal distribution solely to demonstrate Student-t confidence and prediction intervals.
7. Prepare the Python environment
Create a directory for the example.
mkdir uncertainty-display-example
cd uncertainty-display-example
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
For controlled scientific research, use reviewed dependency versions, preserve the analytical environment, and record relevant source and artifact checksums.
8. Implement the statistical calculation layer
Save as uncertainty_analysis.py.
from dataclasses import dataclass
import numpy as np
from scipy.stats import t
SOURCE_ID = "synthetic-uncertainty-groups"
SOURCE_REVISION = "1.0"
ANALYSIS_VERSION = "reference-t-intervals-1"
OBSERVATIONS = {
"Control": np.array(
[8., 9., 10., 11., 12.]
),
"Treatment": np.array(
[11., 12., 13., 14., 15.]
)
}
@dataclass(frozen=True)
class IntervalSummary:
n: int
mean: float
sample_sd: float
standard_error: float
ci_lower: float
ci_upper: float
pi_lower: float
pi_upper: float
confidence_level: float
def summarize(values, confidence_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 (0 < confidence_level < 1):
raise ValueError(
"Invalid confidence level"
)
n = len(data)
mean = float(np.mean(data))
sd = float(np.std(data, ddof=1))
se = sd / np.sqrt(n)
alpha = 1.0 - confidence_level
critical = float(
t.ppf(1 - alpha / 2, df=n - 1)
)
ci_half_width = critical * se
pi_half_width = (
critical
* sd
* np.sqrt(1 + 1 / n)
)
return IntervalSummary(
n=n,
mean=mean,
sample_sd=sd,
standard_error=float(se),
ci_lower=float(mean - ci_half_width),
ci_upper=float(mean + ci_half_width),
pi_lower=float(mean - pi_half_width),
pi_upper=float(mean + pi_half_width),
confidence_level=confidence_level
)
def analyze_groups(groups):
if not groups:
raise ValueError("No groups supplied")
return {
name: summarize(values)
for name, values in groups.items()
}
def convert_affine_uncertainty(
value,
standard_uncertainty,
factor,
offset=0.0
):
parameters = np.asarray(
[
value,
standard_uncertainty,
factor,
offset
],
dtype=float
)
if not np.isfinite(parameters).all():
raise ValueError(
"Nonfinite conversion parameter"
)
if standard_uncertainty < 0:
raise ValueError(
"Negative standard uncertainty"
)
return (
factor * value + offset,
abs(factor) * standard_uncertainty
)
The module calculates descriptive statistics and two statistical intervals using explicitly documented formulas.
It does not automatically test normality, independence, representativeness, or the suitability of the statistical model.
9. Generate three scientific uncertainty displays
The reference implementation generates three separate figures rather than combining uncertainty concepts into one ambiguous set of error bars.
9.1 Figure A — observed variability
Individual observations show the actual recorded distribution.
For this example, each of the five observations in each group is displayed directly.
9.2 Figure B — confidence intervals for the means
Each point represents an estimated population mean, with a 95% Student-t confidence interval.
9.3 Figure C — prediction intervals
Each point represents the sample mean, accompanied by a model-based 95% prediction interval for one additional individual observation from the corresponding population.
These figures answer different questions and must have different captions.
10. Implement the rendering script
Save as render_uncertainty.py.
from pathlib import Path
from dataclasses import asdict
import hashlib
import json
import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt
import numpy as np
from uncertainty_analysis import (
OBSERVATIONS,
SOURCE_ID,
SOURCE_REVISION,
ANALYSIS_VERSION,
analyze_groups
)
OUTPUT = Path("uncertainty-output")
OUTPUT.mkdir(exist_ok=True)
def sha256_file(path):
digest = hashlib.sha256()
with Path(path).open("rb") as handle:
for block in iter(
lambda: handle.read(1024 * 1024),
b""
):
digest.update(block)
return digest.hexdigest()
def render_raw_observations(groups):
fig, ax = plt.subplots(
figsize=(7, 4.5)
)
styles = {
"Control": ("o", "#174a67"),
"Treatment": ("s", "#a43b28")
}
for index, (group, values) in enumerate(
groups.items()
):
marker, color = styles[group]
# Fixed offsets for a deterministic
# display of individual records.
offsets = np.linspace(
-0.12, 0.12, len(values)
)
ax.scatter(
np.full(len(values), index) + offsets,
values,
marker=marker,
color=color,
s=55,
label=group
)
ax.set_xticks(
range(len(groups)),
list(groups)
)
ax.set_ylabel(
"Observed response (synthetic units)"
)
ax.set_title(
"Synthetic observations: raw variability"
)
ax.set_ylim(5, 18)
ax.legend()
fig.tight_layout()
path = OUTPUT / "raw-variability.png"
fig.savefig(path, dpi=180)
plt.close(fig)
return path
def render_intervals(summaries, interval_type):
if interval_type not in {
"confidence", "prediction"
}:
raise ValueError(
"Unsupported interval type"
)
fig, ax = plt.subplots(
figsize=(7, 4.5)
)
for index, (group, result) in enumerate(
summaries.items()
):
if interval_type == "confidence":
lower = result.ci_lower
upper = result.ci_upper
else:
lower = result.pi_lower
upper = result.pi_upper
assert lower <= result.mean <= upper
ax.errorbar(
x=index,
y=result.mean,
yerr=[
[result.mean - lower],
[upper - result.mean]
],
fmt="o" if index == 0 else "s",
color=(
"#174a67"
if index == 0
else "#a43b28"
),
capsize=6,
markersize=8
)
ax.set_xticks(
range(len(summaries)),
list(summaries)
)
ax.set_ylabel(
"Response (synthetic units)"
)
if interval_type == "confidence":
ax.set_title(
"95% confidence intervals for population means"
)
ax.set_ylim(5, 18)
else:
ax.set_title(
"95% prediction intervals for future observations"
)
ax.set_ylim(3, 20)
fig.tight_layout()
path = OUTPUT / (
f"{interval_type}-intervals.png"
)
fig.savefig(path, dpi=180)
plt.close(fig)
return path
def main():
summaries = analyze_groups(
OBSERVATIONS
)
raw_path = render_raw_observations(
OBSERVATIONS
)
confidence_path = render_intervals(
summaries,
"confidence"
)
prediction_path = render_intervals(
summaries,
"prediction"
)
report = {
"source": {
"dataset_id": SOURCE_ID,
"revision": SOURCE_REVISION,
"classification": "synthetic"
},
"analysis_version": ANALYSIS_VERSION,
"assumptions": [
"independent_observations",
"normal_population",
"unknown_population_variance"
],
"units": "synthetic_units",
"interval_level": 0.95,
"uncertainty_definitions": {
"confidence": (
"Student-t confidence interval "
"for population mean"
),
"prediction": (
"Student-t prediction interval "
"for one future observation"
)
},
"statistics": {
name: asdict(result)
for name, result in summaries.items()
},
"artifacts": {
"raw_variability": sha256_file(
raw_path
),
"confidence_intervals": sha256_file(
confidence_path
),
"prediction_intervals": sha256_file(
prediction_path
)
},
"numerical_tests": "not_tested",
"visual_review": "not_tested",
"accessibility_review": "not_tested",
"scientific_review": "not_tested",
"publication_approval": "not_approved"
}
report_path = OUTPUT / "report.json"
report_path.write_text(
json.dumps(report, indent=2),
encoding="utf-8"
)
for name, result in summaries.items():
print(
name,
"mean =", result.mean,
"CI =", (
result.ci_lower,
result.ci_upper
),
"PI =", (
result.pi_lower,
result.pi_upper
)
)
if __name__ == "__main__":
main()
10.1 Execute the figures
python render_uncertainty.py
The script should generate:
uncertainty-output/
raw-variability.png
confidence-intervals.png
prediction-intervals.png
report.json
For these synthetic observations, the expected numerical results, rounded to three decimal places, are:
| Group | Mean | Sample SD | 95% CI for mean | 95% prediction interval |
|---|---|---|---|---|
| Control | 10.000 | 1.581 | 8.037–11.963 | 5.191–14.809 |
| Treatment | 13.000 | 1.581 | 11.037–14.963 | 8.191–17.809 |
The numerical values are conditional on the stated statistical assumptions. They are not empirical evidence and do not constitute a hypothesis test comparing the groups.
11. Validate the uncertainty calculations
Scientific figures require independent checks of their numerical inputs.
Save as test_uncertainty.py.
import numpy as np
import pytest
from uncertainty_analysis import (
OBSERVATIONS,
summarize,
analyze_groups,
convert_affine_uncertainty
)
def test_group_means():
results = analyze_groups(
OBSERVATIONS
)
assert results["Control"].mean == 10.0
assert results["Treatment"].mean == 13.0
def test_sample_standard_deviation():
result = summarize(
OBSERVATIONS["Control"]
)
assert result.sample_sd == pytest.approx(
np.sqrt(2.5)
)
def test_standard_error():
result = summarize(
OBSERVATIONS["Control"]
)
assert result.standard_error == (
pytest.approx(np.sqrt(0.5))
)
def test_reference_confidence_interval():
result = summarize(
OBSERVATIONS["Control"]
)
assert result.ci_lower == pytest.approx(
8.0367568,
abs=1e-6
)
assert result.ci_upper == pytest.approx(
11.9632432,
abs=1e-6
)
def test_prediction_wider_than_confidence():
result = summarize(
OBSERVATIONS["Control"]
)
ci_width = (
result.ci_upper - result.ci_lower
)
pi_width = (
result.pi_upper - result.pi_lower
)
assert pi_width > ci_width
def test_intervals_centered_on_mean():
result = summarize(
OBSERVATIONS["Treatment"]
)
assert (
result.ci_lower + result.ci_upper
) / 2 == pytest.approx(result.mean)
assert (
result.pi_lower + result.pi_upper
) / 2 == pytest.approx(result.mean)
def test_single_observation_rejected():
with pytest.raises(ValueError):
summarize([10.0])
def test_empty_source_rejected():
with pytest.raises(ValueError):
summarize([])
@pytest.mark.parametrize(
"invalid",
[np.nan, np.inf, -np.inf]
)
def test_nonfinite_rejected(invalid):
with pytest.raises(ValueError):
summarize([8.0, invalid, 10.0])
@pytest.mark.parametrize(
"level",
[0.0, 1.0, -0.1, 1.1]
)
def test_invalid_confidence_level(level):
with pytest.raises(ValueError):
summarize(
[8.0, 9.0, 10.0],
confidence_level=level
)
def test_uncertainty_unit_conversion():
value, uncertainty = (
convert_affine_uncertainty(
1000.0,
20.0,
0.001
)
)
assert value == pytest.approx(1.0)
assert uncertainty == pytest.approx(0.02)
def test_temperature_offset():
value, uncertainty = (
convert_affine_uncertainty(
0.0,
0.5,
1.0,
273.15
)
)
assert value == pytest.approx(273.15)
assert uncertainty == pytest.approx(0.5)
def test_negative_uncertainty_rejected():
with pytest.raises(ValueError):
convert_affine_uncertainty(
1000.0,
-20.0,
0.001
)
def test_nonfinite_conversion_rejected():
with pytest.raises(ValueError):
convert_affine_uncertainty(
np.inf,
20.0,
0.001
)
Execute:
python -m pytest -v test_uncertainty.py
The suite defines nineteen individual test cases after expanding the parameterized invalid-input tests.
The tests cover group statistics, confidence intervals, prediction-interval width, numerical bounds, missing or invalid data, confidence-level validation, and unit conversion.
These are reference test definitions, not claims of tests executed against a deployed Sustainable Catalyst service.
12. Represent measurement uncertainty correctly
Measurement uncertainty is associated with the measurement process, instrument, calibration, or estimation model. It is distinct from sample dispersion and from uncertainty about a population parameter.
For example, a synthetic instrument reading may be expressed as:
1000 g
Standard measurement uncertainty: 20 g
When converted to kilograms:
1.000 kg
Standard measurement uncertainty: 0.020 kg
If expanded uncertainty is reported:
U = k * u
where u is the relevant combined standard uncertainty and k is the documented coverage factor.
Do not assign a 95% coverage interpretation to an arbitrary value of k without supporting distributional or metrological assumptions.
For actual scientific measurements, use an appropriate uncertainty budget and refer to metrological guidance such as the JCGM Guide to the Expression of Uncertainty in Measurement.
13. Distinguish distributions and intervals
A distribution summarizes variation among possible or observed values. An interval summarizes a defined subset or range associated with a statistic or predictive procedure.
A histogram, violin plot, box plot, and interval plot can communicate different properties of the same source data.
For small samples:
- Raw observations often provide the most transparent view of recorded values.
- Box plots require careful interpretation of quartiles and whisker conventions.
- Kernel-density or violin plots may imply a smooth distribution not supported by limited observations.
- Confidence intervals should be calculated from a justified statistical procedure.
Do not interpret a confidence interval as the range of the observed measurements.
Similarly, a 95% prediction interval should not be described as an interval containing 95% of the existing observations unless that statement is separately justified by the model and analysis.
14. Time-dependent and spatial uncertainty
14.1 Temporal uncertainty bands
A time-series uncertainty band may show uncertainty in a model estimate at each time point.
Validate:
- The definition of the central estimate.
- The interval type and nominal level.
- Actual observation timestamps.
- Whether bounds refer to pointwise or simultaneous coverage.
- Interpolation and smoothing rules.
- Time-dependent sample sizes.
- Model calibration and validation evidence.
Pointwise 95% intervals do not automatically form a simultaneous 95% confidence band over an entire curve.
Where a band is generated from model predictions, distinguish predicted values from actual observations.
14.2 Spatial uncertainty
Geospatial uncertainty may arise from measurement error, location error, interpolation, sampling limitations, or model estimation.
Validate:
- Coordinate reference systems.
- Spatial extent and resolution.
- Source observation density.
- Interpolation or spatial model method.
- Spatial autocorrelation.
- Masking and no-data regions.
- Color normalization and unit definitions.
A spatial uncertainty heat map should not be interpreted as a measured uncertainty field unless the values actually originate from a defined measurement or estimation process.
15. Simulation and ensemble uncertainty
Scientific models may generate uncertainty displays using repeated simulations, ensemble members, probability distributions, or parameter sampling.
Examples include:
- Monte Carlo uncertainty analysis.
- Scenario ensembles.
- Bootstrap intervals.
- Bayesian posterior distributions.
- Sensitivity analysis.
- Probabilistic forecasts.
For these outputs, record the relevant model, data revisions, uncertainty sources, random-number generation configuration, and numerical convergence evidence.
An ensemble spread is not automatically a statistically calibrated prediction interval.
Do not present arbitrary scenario ranges or parameter extremes as formal probability intervals without an appropriate probabilistic interpretation.
16. Scientific captioning and interpretation
A research-quality uncertainty caption should identify the statistical meaning of the graphic.
For the reference confidence-interval figure:
Points show the sample means of two synthetic groups (n = 5 per group). Vertical intervals are nominal 95% Student-t confidence intervals for the population means, calculated under independent normal-observation assumptions with unknown variance. Values are expressed in synthetic units. The figure is an educational calculation, not empirical evidence of a treatment effect.
For the prediction-interval figure:
Points show the sample means of two synthetic groups. Vertical intervals are nominal 95% Student-t prediction intervals for one additional observation from each corresponding population, conditional on the stated normal independent-observation model. The intervals are not confidence intervals for the population means.
Avoid generic captions such as “error bars show uncertainty” when the actual uncertainty definition is known or required for interpretation.
17. Accessibility and numerical alternatives
Uncertainty graphics should remain interpretable without relying exclusively on visual perception.
Provide:
- Descriptive chart titles.
- Variable names and measurement units.
- Explicit interval type and nominal coverage.
- Relevant sample sizes.
- Numerical tables of estimates and bounds.
- Descriptions of important relationships.
- Non-color-only group distinctions.
- Readable line, marker, and interval encodings.
- Accessible controls for interactive figures where applicable.
For complex graphics, provide an extended description and accessible numerical representation consistent with WCAG 2.2 guidance (W3C, 2024).
A graphical interval with correct numerical bounds can still fail the communication objective if readers cannot determine what those bounds mean.
18. Validate the rendered uncertainty marks
Numerical correctness should be tested independently of renderer behavior.
Check:
- Point-estimate coordinates.
- Lower and upper interval bounds.
- Axis scales, limits, and unit labels.
- Whether any intervals are clipped.
- Correct category or temporal ordering.
- Distinction between measured and estimated values.
- Appropriate interval legend and caption.
- Consistency between interactive and exported figures.
Matplotlib’s errorbar function supports separate lower and upper numerical extents. These should be derived from validated interval endpoints rather than invented graphical widths.
For example:
lower_error = estimate - lower_bound
upper_error = upper_bound - estimate
assert lower_error >= 0
assert upper_error >= 0
When using shaded bands or error intervals in Plotly or Vega-Lite, verify equivalent numerical properties through the corresponding renderer specification.
19. Scientific acceptance matrix
| Criterion | Pass condition | Evidence |
|---|---|---|
| Source identity | Authoritative dataset and version identified | Source reference and checksum |
| Variable semantics | Scientific quantities and units defined | Dataset metadata |
| Uncertainty definition | Each uncertainty representation explicitly identified | Method specification |
| Statistical assumptions | Method assumptions justified and limitations disclosed | Scientific method review |
| Sample count | Contributing observations correctly counted | Record reconciliation |
| Numerical calculations | Estimates and interval bounds independently reproducible | Golden-fixture tests |
| Unit consistency | Values and uncertainty use compatible units | Dimensional validation |
| Missing-data handling | Exclusions and missingness documented | Source review |
| Interval rendering | Marks correspond to validated estimates and bounds | Renderer inspection |
| Axis integrity | Scales do not conceal or distort relevant intervals | Scale and clipping tests |
| Provenance | Uncertainty calculation resolves to source data and method | Analytical lineage record |
| Accessibility | Intervals and their meaning available accessibly | Accessibility review |
| Reproducibility | Figures and statistics reconstruct under documented conditions | Execution receipt |
| Scientific review | Uncertainty interpretation supports the intended claim | Independent assessment |
| Publication approval | Accepted outputs reference an approved revision | Release and review record |
Decision rule: Record each applicable criterion as Pass, Fail, Not Tested, or Not Applicable. A figure is not scientifically accepted merely because the error bars render correctly.
20. Reproducibility and evidence package
Retain:
- Authoritative source dataset or immutable artifact reference.
- Dataset version, checksum, schema, units, and citation.
- Source observations and any exclusions.
- Statistical estimators and uncertainty formulas.
- Confidence, prediction, or coverage levels.
- Statistical assumptions and limitations.
- Numerical interval endpoints.
- Rendering engine, version, and configuration.
- Scale, color, and mark definitions.
- Accessible numerical tables and descriptions.
- Original and exported figure artifacts.
- Artifact hashes and executed test receipts.
- Scientific reviewer and publication decision.
20.1 Illustrative uncertainty manifest
{
"schema_version": "example-1.0",
"figure_id": "synthetic-uncertainty-comparison",
"source": {
"dataset_id": "synthetic-uncertainty-groups",
"revision": "1.0",
"classification": "synthetic",
"sha256": null
},
"analysis": {
"method": "student_t",
"confidence_level": 0.95,
"assumptions": [
"independent_observations",
"normal_population",
"unknown_variance"
],
"sample_size_per_group": 5
},
"representations": [
{
"type": "raw_observations",
"meaning": "observed_sample_variability"
},
{
"type": "confidence_interval",
"meaning": "population_mean"
},
{
"type": "prediction_interval",
"meaning": "one_future_observation"
}
],
"units": "synthetic_units",
"validation": {
"source_integrity": "not_tested",
"statistical_method": "not_tested",
"numerical_bounds": "not_tested",
"rendering": "not_tested",
"accessibility": "not_tested",
"scientific_review": "not_tested"
},
"publication_approval": "not_approved"
}
This is a proposed documentation structure, not an implemented Sustainable Catalyst API contract. Populate actual evidence and review states only after performing the relevant checks.
21. Sustainable Catalyst cross-application integration
Uncertainty visualization is relevant to Sustainable Catalyst’s intended scientific research and analytical workflows.
The following table describes proposed responsibilities, not verified production integrations.
| Application | Intended responsibility |
|---|---|
| Library | Preserve observations, uncertainties, units, source versions, rights, and provenance |
| Workbench | Perform reproducible statistical calculations, uncertainty propagation, and figure preparation where implemented |
| Research Lab | Evaluate statistical assumptions, measurement methods, and uncertainty models |
| Visualization & Graphing | Render validated uncertainty marks, intervals, distributions, and numerical equivalents |
| Site Intelligence | Represent spatial uncertainty and geographic coverage where supported |
| Decision Studio | Compare model scenarios, sensitivity, and decision uncertainty where implemented |
| Workspace | Track analytical revisions, review evidence, ownership, and publication approvals |
| Research | Publish accepted scientific figures with methods, uncertainty definitions, and source citations |
21.1 Proposed research workflow
Authoritative source data
|
v
Statistical or measurement model
|
v
Calculated uncertainty values
|
v
Numerically validated artifacts
|
v
Scientific uncertainty visualization
|
v
Independent scientific review
|
v
Approved research figure
|
v
Research publication
Do not assume that analytical computation, uncertainty validation, figure rendering, and publication review currently share a verified persistence or authorization contract.
21.2 Platform source audit
Before certifying Sustainable Catalyst uncertainty-display functionality, verify:
- Owning repository and exact code revision.
- Implemented statistical engines and dependencies.
- Actual uncertainty and interval schemas.
- Supported calculation methods and assumptions.
- Source-to-estimate provenance relationships.
- Renderer adapters and supported mark types.
- Unit and coordinate handling.
- Persistence and export behavior.
- Numerical, negative, and integration test results.
- Actual rendered figure evidence.
- Accessibility and scientific review outcomes.
- Known unsupported uncertainty types.
Supporting an error-bar feature in a plotting library does not establish that the platform can calculate, interpret, or scientifically validate the uncertainty it displays.
22. Scientific limitations and escalation
Escalate for scientific or engineering review when:
- The interval type is unknown or incorrectly labeled.
- Confidence intervals are confused with prediction intervals.
- Standard deviation is interpreted as uncertainty about the estimated mean.
- Source observations cannot be reconciled with the calculation.
- Statistical assumptions are unsupported.
- Repeated or correlated observations are treated as independent without justification.
- Measurement uncertainties lack a defensible uncertainty model.
- Unit conversions produce incorrect interval widths.
- Relevant interval bounds are clipped or hidden.
- Ensemble spread is mislabeled as a calibrated probability interval.
- Published scientific conclusions depend on an incorrect uncertainty representation.
Do not silently replace a previously published uncertainty figure when the correction affects the scientific interpretation. Preserve the original evidence and document the appropriate correction and review.
23. 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.
24. Completion and verification record
| Field | Required record |
|---|---|
| Figure identifier | Figure and revision |
| Source artifact | Dataset, revision, provenance, and checksum |
| Uncertainty type | Explicit scientific or statistical definition |
| Statistical method | Estimator, assumptions, and method revision |
| Source integrity | Pass, Fail, or Not Tested |
| Sample and coverage validation | Pass, Fail, or Not Tested |
| Numerical bounds | Pass, Fail, or Not Tested |
| Unit consistency | Pass, Fail, or Not Tested |
| Interval interpretation | Pass, Fail, or Not Tested |
| Renderer verification | Pass, Fail, or Not Tested |
| Clipping and scales | 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 approval | Approved, Not Approved, or Not Applicable |
| Reviewer | Actual reviewer and review date |
| Evidence artifacts | Source data, numerical tests, methods, figure files, and hashes |
| Outstanding limitations | Unresolved statistical, scientific, or software concerns |
Completion criterion: An uncertainty display is accepted when its statistical or measurement meaning is clearly defined, the numerical calculations and bounds are reproducible, graphical marks accurately encode the intended quantities, relevant assumptions are disclosed, and applicable scientific, accessibility, and publication requirements have been satisfied.
Scientific limitation: Correct uncertainty visualization does not establish that a sample is representative, the statistical model is appropriate, measurement errors have been fully characterized, or a causal conclusion is justified. Uncertainty displays are conditional on the data and methods used to construct them.
Current implementation status: Practical methodology, synthetic reference dataset, Student-t confidence- and prediction-interval calculations, numerical test definitions, illustrative figures, and proposed acceptance requirements documented. No particular Sustainable Catalyst uncertainty-calculation service, figure renderer, measurement-uncertainty registry, or publication integration is certified without implementation-specific source audit, executed tests, actual rendering inspection, and release acceptance.
