1
$\begingroup$

I have a random variable X of which I sample N values [$x_{1}$...$x_{N}$]. From these values I calculate the estimate P of function H(x) using Importance Sampling, i.e. $P = \sum_{i=1}^{N} w_{i}H(x_{i})$
( $H(x_{i})$ gives as output either 0 or 1) .
This is done for T trials and for each trial ' $t$ ', I have two output vectors -

  1. [$P_{0}$, $P_{1}$, ..., $P_{t}$] , and
  2. [$Pavg_{0}$, $Pavg_{1}$, ..., $Pavg_{t}$] where $Pavg_{i}$ is the average of all P's upto trial t i.e. $Pavg_{i}= 1/t*\sum_{k=1}^{t}P_{k}$

Question is what is the variance of $Pavg_{t}$. I want this value so that I can know how close my simulation results are to the actual case. Should I just calculate the variance($Pavg_{t}$) from the vector(2)?

I also came across the formula to calculate variance of estimate in Monte Carlo, given as $Var(P_{MC}) = P_{MC}(1-P_{MC})/N$, where $P_{MC}$ is the monte-carlo estimate. Do I use this to calculate $Var(Pavg_{t})$?

$\endgroup$
6
  • $\begingroup$ You might find this answer of some value. Note that the variance with importance sampling is different from vanilla Monte-Carlo sampling. $\endgroup$
    – Glen_b
    Commented Apr 13, 2013 at 23:55
  • $\begingroup$ Yes, I read your answer for that question. For importance sampling, weights also go into the equation. I have with me the full expression of variance in case of importance sampling. For now I am calculating $var(Pavg_{t})$ as $\sum_{i=0}^{t}var(P_{i})$. Assuming that the variance of average is equal to the sum of individual variance values. $\endgroup$
    – manu
    Commented Apr 14, 2013 at 0:21
  • $\begingroup$ Looking at your item 2, how is a sum of P's an average of P's? I suspect there's something I am not understanding. $\endgroup$
    – Glen_b
    Commented Apr 14, 2013 at 0:39
  • $\begingroup$ aah sorry, I mean assuming that the variance of avg is equal to avg of indivisual variance $\endgroup$
    – manu
    Commented Apr 14, 2013 at 0:40
  • $\begingroup$ 1. Haven't you forgot to divide your average by the number of trials? 2. How are your Pavg different from each other? Your formula doesn't have i in it. 3. Is this (extended to t dimensions) what you are looking for? stats.stackexchange.com/questions/55999/… $\endgroup$
    – sashkello
    Commented Apr 14, 2013 at 1:16

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.