9

I wanted to solve the problem with the Central Limit Theorem.

Analyzing the question, I modeled the situation with a random variable :

$$\begin{cases} 1 & \text{with probability } 1/2; \\ 0 & \text{with probability } 1/2; \end{cases} $$

Calculating the mean $\mu = \frac{1}{2}$ and the variance $\sigma^2 = \frac{1}{4}$.

Then, I thougt that since the number of repetitions is >> 30 I tried to fit the probability function to a Gaussian normal $N(400\mu,400\sigma) = N(200,100)$.

Calculating and "normalizing"...

$$\begin{align} & P(160 < x < 190)\\ &= P\left( \frac{160-200}{20 \times 100} < z < \frac{190-200}{20 \times 100}\right) \\ &= P(-0.02 < z < -0.005). \end{align}$$

And here I'm stuck because I wanted to use the relation

$$ P(160 < x < 190) = \Phi(-0.005) - \Phi(-0.02) $$

That result negative..

Do you see any error in my strategy?

BlacK
  • 217
  • what is $\phi$?? – Ragnar Jan 02 '14 at 17:43
  • @Ragnar ϕ is the probability in the Gaussian normal – BlacK Jan 02 '14 at 17:46
  • 1
    In the title of your question you say $[160, 200]$, but in the body you use $190$. Which one do you mean? Also, make sure you're using the cumulative distribution function (capital $\Phi$) and not the probability density function (lowercase $\phi$). Modulo those, your approach is correct. – ShreevatsaR Jan 02 '14 at 17:52

2 Answers2

7

With $n = 400$ trials, the exact probability distribution for the number of heads $X$ observed is given by $X \sim {\rm Binomial}(n = 400, p = 1/2)$, assuming the coin is fair. Since calculating $\Pr[160 \le X \le 200]$ requires a computer, and $n$ is large, we can approximate the distribution of $X$ as ${\rm Normal}(\mu = np = 200, \sigma^2 = np(1-p) = 100)$. Thus $$\begin{align*} \Pr[160 \le X \le 200] &\approx \Pr[159.5 \le X \le 200.5] \\ &= \Pr\left[\frac{159.5 - 200}{\sqrt{100}} \le \frac{X - \mu}{\sigma} \le \frac{200.5 - 200}{\sqrt{100}} \right] \\ &= \Pr[-4.05 \le Z \le 0.05] \\ &= \Phi(0.05) - \Phi(-4.05) \\ &\approx 0.519913. \end{align*}$$ Note that we employed continuity correction for this calculation. The exact probability is $0.5199104479\ldots$.

A similar calculation applies for $\Pr[160 \le X \le 190]$. Using the normal approximation to the binomial, you would get an approximate value of $0.171031$. Using the exact distribution, the probability is $0.17103699497659\ldots$.

heropup
  • 135,869
  • Why do you add a little delta for calculating the probability? And why down to the denominator there is that sqrt(100) and not sqrt(400)*σ^2? – BlacK Jan 02 '14 at 17:59
  • 1
    Continuity correction is required when approximating a discrete distribution (binomial) with a continuous distribution (normal), and when one or more endpoints of the cumulative probability occurs with relatively high density (in this case, at $X = 200$). This is because the discrete distribution takes on integer values, but integrating over the same interval may include or exclude half of the discrete probability mass at the endpoint. Since the endpoint $X = 200$ is included, we must compute the CDF up to $X = 200.5$, or else half the probability mass at 200 will be lost. – heropup Jan 02 '14 at 18:05
  • $X$ follows a binomial distribution with mean parameters $n = 400$ and $p = 1/2$, so its mean is $np = 200$ and its variance is $np(1-p) = 100$. We approximate this with a normal distribution with the same mean and variance, namely $\mu = 200$, $\sigma^2 = 100$. Standardizing this normal distribution simply involves computing $Z = (X - \mu)/\sigma$. The standard deviation is $\sigma = \sqrt{100} = 10$. – heropup Jan 02 '14 at 18:07
  • Using the CLT, in the formula appear the sqrt(number_of_experiment). http://formulas.tutorvista.com/math/central-limit-theorem-formula.html , why in your solution no? (even if your result is exact!) – BlacK Jan 02 '14 at 18:21
  • In your own posting, you already correctly stated $X \approx {\rm Normal}(\mu = 200, \sigma^2 = 100)$. You are then using some other formula to standardize $X$ without understanding what it means. Note that the formula in your link is a statement about the SAMPLE MEAN, not the TOTAL NUMBER OF SUCCESSES. $\bar X = X/n$. – heropup Jan 02 '14 at 18:27
  • Okay so let's use the CLT to solve this question. Let $\bar X = X/n$ be the observed proportion of successes in 400 trials. Then $\bar X$ is approximately normal with parameters $\mu_{\bar X} = p = 1/2$, and $\sigma_{\bar X}^2 = p(1-p)/n = 1/1600$. Note the underlying distribution here is Bernoulli with parameter $p = 1/2$ and $\sigma^2 = p(1-p) = 1/4$. Then we want to compute $\Pr[160 \le X \le 190] = \Pr[0.39875 \le \bar X \le 0.47625]$, and we standardize as before. You get the same result. – heropup Jan 02 '14 at 18:35
  • Why did you solve the problem for $\Pr[160 \le X \le 200]$ and not directly $\Pr[160 \le X \le 190]$? – user441848 Apr 21 '18 at 20:11
1

While I was typing, an answer was given by heropup. So the stuff below Old, though correct, can be disregarded.

We address only the question about $\Phi(-0.005) - \Phi(-0.02)$, which in the OP is said to be negative. The expression is not the correct answer to the question, but it is not negative.

The usual tables do not give $\Phi(z)$ for negative $z$. This information is felt to be unnecessary, since by symmetry if $z$ is negative, then $\Pr(Z\le z)=\Pr(Z\ge -z)=1-\Phi(-z)$. Thus $$\Phi(-0.005) - \Phi(-0.02)=(1-\Phi(0.005))-(1-\Phi(0.02))=\Phi(0.02)-\Phi(0.005),$$ and the last expression is positive, and can be found from standard tables.

Old:

We will use the continuity correction. Our probability is the probability that the binomial is $\le 200$ minus the probability that the binomial is $\le 159$.

Let $Y$ be a normal with mean $200$ and variance $100$. Our approximation is $$\Pr(Y\le 200.5)-\Pr(Y\le 159.5).$$ This is $$\Pr\left(Z\le \frac{0.5}{\sqrt{100}}\right)-\Pr\left(Z\le \frac{-40.5}{\sqrt{100}}\right),$$ where $Z$ is standard normal. The first number is directly available from the usual tables. The second usually is not, but by symmetry it is equal to $1-\Phi(4.05)$. For all practical purposes, this is $0$. So our required probability is approximately $\Phi(0.05)$.

André Nicolas
  • 507,029