later sampling the density at a given point, we first take a specified minimum of samples. From that we estimate the (unbiased) variance of our sampling at this point. We continue sampling until a pre-defined (95%) confidence interval for the sampling mean is smaller than the prespecified accuracy.

Living with Cancellation {#subsubsec:cancellation}
------------------------

Some geometries, like the “cylinders with sidewalls” geometry studied in [@2008PhRvA..77c0101R], show a high degree of symmetry. While perfect symmetry helps to reduce the computational effort as the calculation can be restricted to a fundamental domain, slightly non-symmetric configurations often are a problem if we want to compute the force on an object that gets pulled in different (perhaps opposing) directions: most of the contributions cancel, giving rise to a small residual force.

A naive approach would compute the contribution at both sides of the object separately and then add up. This, however, would yield a huge variance for a comparably small resulting value. Fortunately, the force contribution of a loop and its mirrored image are highly correlated in these situations. Often, one is the negative value of the other. So we have a better way of estimating the contribution by estimating the expectation of the following 