I am going through the great tutorial on Stochastic Programming by Shapiro and Philpott. When talking about Monte Carlo techniques, I get confused by the way they calculate the sample variance (page 13, equation (2.8)).
In short:
- Given a solution $x$, we approximate the recourse function $Q(x)=\Bbb E_{\xi}[Q(x,\xi)]$ by taking an i.i.d. sample of $\xi$, and thus obtaining $$\hat{q}_N(x)=\frac1N\sum\limits_{i=1}^NQ(x,\xi^i).$$
- The sample variance is then calculated as $$\hat{\sigma}^2_N(x)=\dfrac{1}{N(N-1)}\sum\limits_{i=1}^N[Q(x,\xi^i)-\hat{q}_N(x)]^2.$$
Since the mean is estimated from the sample itself ($\hat{q}_N(x)$), I would have expected to divide by $N-1$ (as in, e.g. Homem-de-Mello & Bayaraksan 2014 page 67, before formula (21)). Instead I find $N(N-1)$. I would be grateful if someone could help me understand this formula.