0
$\begingroup$

Suppose I have a random variable $X$ with unknown mean $\mu$ and I can draw $n$ random samples (possibly from a Monte Carlo method, but I believe that's beside the point) from its distribution. I wish to determine $n$ as to keep my relative error $\left |\frac{\mu - \overline{X}}{\mu}\right|$ within a certain margin, say $1\%$ about $95\%$ of the times I draw those samples.

I have a few problems determining $n$ since I don't know the distribution of $\left |\frac{\mu - \overline{X}}{\mu}\right|$ and thus I can't compute the odds of it being within a margin. Is there a way to do this? Also how would that method change in case I didn't have $\sigma^2$ and had instead to rely on the sample variance $s^2$?

$\endgroup$
0

1 Answer 1

0
$\begingroup$

$\bar X$ has mean $\mu$ and variance $\frac1n\sigma^2$

Using Chebyshev's inequality, you can say $P(|\mu -\bar X| \le t) \ge 1-\frac{\sigma^2}{nt^2}$ for $t>0$

You want to consider $t=0.01 |\mu|$ so you want $1-\frac{10000\sigma^2}{n |\mu|}\ge 0.95$, i.e. $n \ge \frac{200000\sigma^2}{|\mu|}$, which is a problem, since you do not know $\mu$ and if it is close to $0$ then there may be no satisfactory $n$ that you can discover.

$\endgroup$
5
  • $\begingroup$ I knew about using Chebyshev's here. Isn't there really any way to do better than this? $\endgroup$ May 8, 2021 at 13:46
  • $\begingroup$ @RodrigoMeireles Chebyshev's inequality is usually loose, but provides you a guarantee. Make some assumption about the distribution and you can get a much tighter bound $\endgroup$
    – Henry
    May 8, 2021 at 13:52
  • $\begingroup$ How bad is it to pick $\overline{X}$ over $\mu$ to solve the inequality? $\endgroup$ May 8, 2021 at 14:11
  • $\begingroup$ @RodrigoMeireles Very bad if $\mu$ is $0$ but usually much less of an issue if $(\bar X)^2$ is much larger than $\frac{\sigma^2}{n}$ $\endgroup$
    – Henry
    May 8, 2021 at 14:19
  • $\begingroup$ I'm gonna wait a couple of days to see if anyone has anything else to contribute before flagging your answer as correct, ok? Thank you very much for your time. $\endgroup$ May 8, 2021 at 15:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .