Monte Carlo simulations, such as a Gaussian centered about x . For simplicity, we shall first treat the case where the number of replicas is fixed at two. One replica samples from π ( x ) and the other samples from an auxiliary distribution ˜ π ( x ) (which has the auxiliary integral ˜ Z = ∫ $_{Ω}$dx ˜ π ( x )). The density ˜ π ( x ) is arbitrary and may be π ( x ) itself, but usually corresponds to π ( x ) at a different temperature. In this case, a generalization of the second replica gas identity [3] is, where the expectation 〈O ( x, x $^{′}$) 〉$_{f,g}$ of an observable O ( x, x $^{′}$) means that x and x ′ are sampled from the distributions f and g , respectively. In the numerator of the equation above, x is sampled from ˜ π ( x ), x ′ is sampled using transition function, and π ( x $^{′}$) is evaluated. In the denominator, x is also sampled from ˜ π ( x ), but x ′ is drawn from the replica with density π ( x $^{′}$), and T ( x $^{′}$| x ) is evaluated. The identity also includes an arbitrary weighting function α ≡ α ( x $^{′}$, x ); any function is valid as long as the denominator is nonzero. The choice α = 1 reduces the expression to Adib’s original identity. The replica gas identity can be made into an estimator by replacing the expectations with sample means. While many choices of α will yield statistically consistent expressions, some choices will lead to more efficient estimators than others. Here, we will optimize α by minimizing the asymptotic variance in estimates of ζ ≡ ln Z , which we shall denote by ¯ ζ . Our procedure will closely follow that of Bennett [4], who minimized the error in an estimator for the ratio of partition functions, and yield an analogous estimator. In the large sample limit, ¯ ζ will be Gaussian about the true value of ζ . Using error propagation based on a first-order Taylor series expansion, the asymptotic variance is, where N$_{T}$ and N$_{π}$ are the number of independent samples used to estimate 〈O ( x, x $^{′}$) 〉$_{˜}$ π,T and 〈O ( x, x $^{′}$) 〉$_{˜}$ $_{π,π}$, respectively. The second line is obtained by writing both expectations in terms of 〈O ( x, x $^{′}$) 〉$_{˜}$ π,π and combining terms. Z = ∫ $_{Ω}$dx [˜ π ( x ) / ˜ Z ] ∫ $_{Ω}$dx $^{′}$T ( x $^{′}$| x ) · α ( x $^{′}$, x ) π ( x $^{′}$) ∫ $_{Ω}$dx [˜ π ( x ) / ˜ Z ] ∫ $_{Ω}$dx $^{′}$[ π ( x $^{′}$) /Z ] · α ( x $^{′}$, x ) T ( x $^{′}$| x ) ≡ 〈 α π ( x $^{′}$) 〉$_{˜}$ π,T 〈 α T ( x $^{′}$| x ) 〉$_{˜}$ π,π , (2) σ $^{2}$[ ¯ ζ ] = 〈 α $^{2}$π ( x $^{′}$) $^{2}$〉$_{˜}$ π,T N$_{T}$ 〈 α π ( x $^{′}$) 〉 2 ˜ π,T + 〈 α $^{2}$T ( x $^{′}$| x ) $^{2}$〉$_{˜}$ π,π N$_{π}$ 〈 α T ( x $^{′}$| x ) 〉 2 ˜ π,π − 1 N$_{T}$ − 1 N$_{π}$ = 〈 α $^{2}$T ( x $^{′}$| x ) ( π ( x $^{′}$) e $_{−}$ζ N$_{T}$ + T ( x $^{′}$| x ) N$_{π}$ )〉 ˜ π,π 〈 α T ( x $^{′}$| x ) 〉 2 ˜ π,π − 1 N$_{T}$ − 1 N$_{π}$ , (3) 3