A fair coin is tossed 10,000 times. Find a number m such that the chance of the number of heads being between 5, 000 − m and 5, 000 + m is approximately 2/ 3.
My attempt is to use the normal approximation, then convert into the z score.
$Heads ~ Bin(10 000, \frac{1}{2})$
$P(X \in [5000 - m, 5000 + m]) = 2/3$
$P(Z \in \frac{5000 - m - 5000}{50}, \frac{5000 + m - 5000}{50}) = \frac{2}{3}$ (unsure about this line)
$P(Z \in [-\frac{m}{50}, \frac{m}{50}]) = \frac{2}{3}$
The I'm not sure where to go from here.
Any help is greatly appreciated. Thank you.
Let $X$ be the random number of heads, thus $$X \sim \operatorname{Binomial}(n = 10^4, p = 1/2).$$ We want to find $m > 0$ such that $$\Pr[5000 - m \le X \le 5000 + m] \approx 2/3.$$ To this end, a normal approximation to the binomial distribution is as follows. Let $$Y \sim \operatorname{Normal}(\mu = np = 5000, \sigma^2 = np(1-p) = 2500).$$ Then $Y$ has the same mean and variance as $X$, and we compute $$\begin{align*} \frac{2}{3} &= \Pr[5000 - m \le X \le 5000 + m] \\ &\approx \Pr[5000 - m \le Y \le 5000 + m] \\ &= \Pr\left[\frac{5000 - m - \mu}{\sigma} \le \frac{Y - \mu}{\sigma} \le \frac{5000 + m - \mu}{\sigma}\right] \\ &= \Pr\left[-\frac{m}{50} \le Z \le \frac{m}{50}\right], \end{align*}$$ where $Z \sim \operatorname{Normal}(0,1)$ is a standard normal random variable. Because $Z$ is symmetric about $0$, we may also write the above as $$\frac{1}{6} = \Pr\left[Z \le -\frac{m}{50}\right] = \Phi(-m/50)$$ where $\Phi$ is the CDF of the standard normal distribution. Why? Because if the probability in between $[-m/50, m/50]$ is $2/3$, then the complement is $1/3$, but the tails are equal on each side, so we divide by $2$. Another way to think about it is $$\Pr[Z < -m/50] + \Pr[-m/50 \le Z \le m/50] + \Pr[Z > m/50] = 1,$$ but the first and last terms are equal, and the middle term is $2/3$. Now we can look up $z$-scores in a table, looking for a value as close to $1/6$ as possible; or we can use a computer or calculator. In Wolfram Alpha, we type
Quantile[NormalDistribution[0,1], 0.16666667]which returns $-0.967422$, meaning $$-\frac{m}{50} \approx -0.967422,$$ or $$m \approx 48.3711.$$ Rounding gives $m = 48$.Using a computer to calculate the binomial distribution directly, the probability for $m = 48$ is $$\Pr[4952 \le X \le 5048] \approx 0.667953269213495176619538346781\ldots,$$ which overshoots a bit. But if we choose $m = 47$, we get $$\Pr[4953 \le X \le 5047] \approx 0.657887354638670318462884597981\ldots,$$ which is farther away from $2/3$ than when we used $m = 48$.
To be accurate, we should use continuity correction, namely $$\frac{2}{3} \approx \Pr\left[\frac{5000-m-\mu-0.5}{\sigma} \le \frac{Y - \mu}{\sigma} \le \frac{500+m-\mu+0.5}{\sigma}\right],$$ which gives $m \approx 47.87$, which when rounded gives $m = 48$ as before.