﻿# Mitsuba moment images: distinguish sample variation from uncertainty of the rendered mean

Interpret Mitsuba first and second moment channels without confusing sample variance, estimator uncertainty, reconstruction effects and errors from biased rendering settings.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/fg2-mitsuba-moment-integrator-sample-estimator-variance/
Language: en

## Identify the random quantity

A renderer's moment output can help diagnose noisy training images, but its numbers require a defined interpretation. Variation among path contributions, variation of a pixel average across renders and variation of scene appearance across a dataset are different quantities. Decide which one matters to the application. A confidence map used to weight a learning loss should not silently substitute one meaning of variance for another.

## Decode the channels correctly

The [moment integrator documentation](https://mitsuba.readthedocs.io/en/latest/src/generated/plugins_integrators.html) describes first and second moments of nested-integrator samples and additional channels named with the `m2` prefix. A second moment measures squared values before centering; variance requires subtracting the squared mean under the appropriate estimator convention. Floating-point cancellation can affect this subtraction when the signal is large and noise small. Preserve adequate precision and inspect the numerical range before interpreting small differences.

## Account for the sampling design

For independent, identically distributed observations, uncertainty of an average depends on the number of observations as well as their variance. The [sampler reference](https://mitsuba.readthedocs.io/en/latest/src/generated/plugins_samplers.html) also includes stratified and correlated constructions, so an independence formula should not be applied indiscriminately. Use repeated randomized renders when assessing the actual variability of an image estimator. Record effective sampling configuration rather than deriving confidence solely from a nominal sample-count label.

## Consider reconstruction and systematic error

The [filter reference](https://mitsuba.readthedocs.io/en/latest/src/generated/plugins_rfilters.html) explains reconstruction from samples into pixels. Filtering changes the quantity observed at an edge and can introduce dependencies between neighboring outputs. Meanwhile, a truncated transport model or mismatched material can be consistently wrong with little Monte Carlo noise. A small moment-derived variance does not validate scene physics or establish that an image matches a real camera's measurement process.

## Check the interpretation empirically

Keep a scene fixed, vary randomization and compare observed pixel variation across repeats with the proposed uncertainty calculation. Inspect bright rare contributions separately from ordinary regions. Read [path-termination expectation](/journal/learn-path-tracing-russian-roulette/) and [mixed-precision gradients](/journal/mixed-precision-loss-scaling-gradients/) for adjacent numerical concerns. The useful output is a documented interpretation and an empirical calibration, not a heatmap labeled uncertainty merely because an integrator produced squared-value channels. Preserve the raw moments so later analysis can revisit the calculation.
