1

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})$?

kjetil b halvorsen
  • 63,378
  • 26
  • 142
  • 467
manu
  • 23
  • 5
  • You might find [this answer](http://stats.stackexchange.com/a/55893/805) of some value. Note that the variance with importance sampling is different from vanilla Monte-Carlo sampling. – Glen_b Apr 13 '13 at 23:55
  • 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. – manu Apr 14 '13 at 00:21
  • 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. – Glen_b Apr 14 '13 at 00:39
  • aah sorry, I mean assuming that the variance of avg is equal to avg of indivisual variance – manu Apr 14 '13 at 00:40
  • 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? http://stats.stackexchange.com/questions/55999/is-it-possible-to-find-the-combined-standard-deviation/56000#56000 – sashkello Apr 14 '13 at 01:16
  • @manu - there's a problem with that notion as well, but this problem is more central. Look at your item (2) again. It doesn't mention variances at all. In ITEM 2 of your post, how is a sum of P's an average of P's – Glen_b Apr 14 '13 at 01:27

0 Answers0