Suppose we have a biased coin, with a probability p of coming up heads and q=1-p of coming up tails on any given toss, but we are not given what p or q are. We know from class that the expected value of the number of heads in
n tosses is E(X) =np. If we repeatedly flip the coin and record the results, the number of heads that actually turn up,
call it E' can be divided by the number of tosses,n, to give an estimate, p'=E'/n, of p. The problem is that we're likely to have to be pretty lucky for p'=p, so the real question is how likely it is that p' is close to p.
Let us suppose, for the sake of argument, that we know that 0.5≤p≤0.6 (so 0.4≤q= 1-p≤.5) for our biased coin and that we have the time and patience to toss it any finite number of times n that we want. Further, let us suppose that we desire to get an estimate of p that is within 5% of the real value,i.e 0.95≤p≤p'1.05p
How many time do we need to toss the coin, keeping track of the number of tosses and the number of success, to ensure that P(0.95≤p≤p'1.05p)≥0.95?