I'm aware there are similar questions, but I haven't been able to find what I'm asking.
Say we have an n-sided die, labeled with 1 thru n and roll it N times.
We take the average, call it m.
The die is fair, so the expectancy for the die roll is E=n+12.
How large must N be for the average to be within ϵ from E with a probability, say, p?
For example, 20-sided die:
E=10.5, choose ϵ=0.01, and p=0.99.
So how many times do I have to roll the 20-sided die for the average to lie in the interval [10.49,10.51] with 99% probability?
Answer
The variance of a single roll is n2−112 so the standard deviation of the average of N rolls is √n2−112N.
For a normal distribution, the probability of being within Φ−1(p+12) standard deviations of the mean is p, where Φ−1 is the inverse of the cumulative distribution of a standard normal.
For large N you can use the central limit theorem as an approximation, so you want √n2−112NΦ−1(p+12)≤ϵ, i.e. N≥(n2−112)(Φ−1(p+12)ϵ)2.
So in your numerical example (p+12)=0.995, Φ−1(p+12)≈2.5758, ϵ=0.01 and n=20 so N≥2206103.1
No comments:
Post a Comment