Solution (source code)

= Solution

Let $X_i$ be the head <indicator random variable> for toss $i$. These are <independent and identically distributed random variables> with a <Bernoulli distribution> of parameter $1/2$, so $\mu=1/2$, $\sigma=1/2$, and $W=N/n$. Taking $h=1/5$ makes $h\sigma=1/10$. The preceding <Chebyshev's inequality> bound gives
$$
\boxed{\mathbb P\left(0.4\leq\frac Nn\leq0.6\right)
\geq1-\frac{25}{n}\geq\frac34,\qquad n\geq100.}
$$
The endpoints are included because this event is exactly $|W-1/2|\leq1/10$.