# Thread: To make a normal approximation for a binomial distribution

1. ## To make a normal approximation for a binomial distribution

So we have a weapon with probability $\displaystyle p=0.95$ of working succesfully. We test $\displaystyle n$ weapons and the stockpile is replaced if the number of failures $\displaystyle X$ is at least one. How large must n be to have $\displaystyle P[X\geq 1]=0.99$?

a)Use exact binomial
$\displaystyle P[X\geq 1]=1-P[X=0]=0.99$ so $\displaystyle P[X=0]=0.01=$$\displaystyle \binom {n}{0}0.95^n*0.05^0=0.95^n \rightarrow n= \frac{log(0.01)}{log(0.95)}=90$

b)Use normal approximation
I know we can use $\displaystyle Norm(np,np(1-p))$...
And then normalise this distribution to the standard normal form something like:

$\displaystyle P[X\geq 1]=1-P[X\leq 0.99] =1-\phi(\frac{(0.99-n0.95)}{\sqrt(n*0.95* 0.05)})=0.99$
If that is correct I have to solve that for n,.... how?

Also I doubt that rewriting $\displaystyle P[X\geq 1]=1-P[X\leq 0.99]$ is smart...

2. $\displaystyle P(X\geq 1)=P(X>0.5)=P(Z>\frac{0.5-np}{\sqrt(np(1-p))})=0.99$

$\displaystyle \phi(\frac{np-0.5}{\sqrt(np(1-p))})=0.99$
$\displaystyle \phi(\frac{0.95n-0.5}{\sqrt(0.95n*(1-0.95))})=0.99$

Let $\displaystyle A=\frac{0.95n-0.5}{\sqrt(0.95n*0.05)}$

$\displaystyle \phi(A)=0.99$

$\displaystyle A=\phi^(-1)(0.99)$

A=2.326
$\displaystyle \frac{0.95n-0.5}{\sqrt(0.95n*0.05)}=2.326$

Solve this equation and find n.

3. Originally Posted by Ithaka
$\displaystyle P(X\geq 1)=P(X>0.5)$
Why is that?
[quote]

4. [QUOTE=CSM;610438]Why is that?
Whenever you want to approximate a discrete distribution (i.e. your initial Binomial Distribution) by a continuous one (i.e. the Normal Distribution), you have to do a continuity correction - that is, the variable X in the Binomial distribution can take only the values 0, 1, 2, 3, ... (natural numbers)as the X in the Normal Distribution can take any REAL value above 0.

The continuity correction is "filling up" the gaps between 0,1, 2, ...

This is why P(X>=1) becomes P(X>0.5) ( the integer value 1 moves into a rectangle starting 0.5 until 1.5, the integer value 2 moves into a rectangle starting 1.5 ending 2.5, etc)

5. Ah merci. I get it