  One of the big challenges in astrophysics is the comparison of complex
simulations to observations. As many codes do not directly generate observables
(e.g. hydrodynamic simulations), the last step in the modelling process is
often a radiative-transfer treatment. For this step, the community relies
increasingly on Monte Carlo radiative transfer due to the ease of
implementation and scalability with computing power. We consider simulations in
which the number of photon packets is Poisson distributed, while the weight
assigned to a single photon packet follows any distribution of choice. We show
how to estimate the statistical uncertainty of the sum of weights in each bin
from the output of a single radiative-transfer simulation. Our Bayesian
approach produces a posterior distribution that is valid for any number of
packets in a bin, even zero packets, and is easy to implement in practice. Our
analytic results for large number of packets show that we generalise existing
methods that are valid only in limiting cases. The statistical problem
considered here appears in identical form in a wide range of Monte Carlo
simulations including particle physics and importance sampling. It is
particularly powerful in extracting information when the available data are
sparse or quantities are small.
