Caculate the sample size of a population
Let p denote the probability that a gambler has lost more than he has won after placing 300 one-dollar bets in roulette. In order to estimate p, a computer program was written to simulate 30 one-dollar bets placed in roulette for each of 1000 gamblers. For these 1000 simulation, 799 were behind after placing 300 bets. Based on these preliminary simulation, how many simulation are required sot that the maximum error of the estimate of p in e=0.01 with 99% confidence?
This is my solution but I am not too sure:
p=799÷1000
= 0.799
p+q1
q=1-p
q=1-.0799
q=0.201
e=0.001
Z=99%
=2.58
n=Z2pq
e2
=(2.58)2x0.799x0.201
(0.0001)2
=6.6564x0.799x0.201
0.0001
=10690.111836
=10690