changing the distribution of $s$, we also have to transform the weight attributed to each sample accordingly. Taking the logarithm of $s$ to be uniformly distributed, rather than $s$ itself, each value $s$ will be $1/s$ times as likely as before. To still get the same expectation, we have to multiply each value by $s$. Hence, we are finally left with estimating the expectation of the following process:

> Chose $\sigma=\ln s$ uniformly at random in the interval $[\ln(a),\ln(b)]$. Randomly generate a loop of size $e^\sigma$ and count $(1-n)e^{-4\sigma}=(1-n)s^{-4}$ if loop hits $n\geq 2$ elements, and $0$ otherwise.

Symbolic Integration over the Scaling Factor {#sec:scaling}
--------------------------------------------

It makes sense to try to perform at least part of the integration needed to evaluate eq. \[eq:effective-action\] symbolically, for two independent reasons. While this may on the one hand help to simplify the problem, it also gives us a much more useful handle on problems that involve changing geometries. As we are much more interested in Casimir forces (and moments) than just energies, this is obviously desirable.

In particular, we can, as in [@Gies:2006cq], typically perform the integration over the loop scaling factor $\int_{s=0}^\infty \frac{ds}{s^5} \Theta(sy,x)$ symbolically.

If we have sampled a loop 