Flips For A Guaranteed Margin
You are estimating an unknown but fixed , the probability a coin lands heads, by flipping it times and taking the sample proportion . Using the CLT approximation you want
The script has everything except the standard deviation of a single flip:
from statistics import NormalDist
eps, q = 0.01, 0.75
z = NormalDist().inv_cdf((1 + q) / 2) # 1.15035
sigma = ... # sd of one flip: depends on p, which is unknown
n_min = (z * sigma / eps) ** 2
Report the smallest integer that works for EVERY in .
Answer format: enter an integer.
Sign in to answer questions and track your progress
Sign In