# Accurate way for computing a ratio coming from Monte Carlo simulation

I am seeking recommendations on how to compute the Binder ratio numerically accurate when doing Monte Carlo simulation on spin models. Binder ratio is defined as:

$$B = \frac{\langle M^4\rangle}{\langle M^2\rangle^2}.$$

Given a safe method to compute $M$ per metropolis sweep, one can get directly $M^2$ and $M^4$. If we take $N$ samples of these values, we can then get the average ones; $\langle M\rangle$, $\langle M^2\rangle$ and $\langle M^4\rangle$.

Then one can compute the Binder ratio. But near the critical temp, the results are not so precise. Am I having too much floating point error in $\langle M^2\rangle$ and $\langle M^4\rangle$?

An example of how the Binder ratio looks, it was a very short simulation. A proper simulation generates the very smooth curve, with little standard error, but the spike remains.

Edit: It is a parallel tempering simulation, it might be possible that the cause for the unexpected Binder Ratio could be related to measuring too early when replicas are not thermalized properly.

• Why would rounding error be a suspect here? I think it's more likely that the variance of sample averages becomes too high. – Kirill Mar 23 '15 at 17:39
• It came to my mind after I saw that starting from a certain lattice size the curve got somehow different to what it ussually is. Now that you mention, It is possible that the variance might be too high, making $\langle M^4 \rangle$ be inferior or superior to the denominator, in cases where it should be the opposite. In that case, is there something one can do to redice it for these kind of Simulations? – Cristobal Navarro Mar 23 '15 at 17:50
• Can you post more information (plots, data, etc.)? I think that would make the question easier to understand and answer, as well as give it more context. – Kirill Mar 23 '15 at 17:53
• Sure, I will look for some data and pictures, in the meanwhile I added that the simulation is through a parallel tempering method. By the way, thanks for improving the format of the mathematical expressions. – Cristobal Navarro Mar 23 '15 at 18:02