Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The binomial distribution bin(n, p) can be approximated by a Poisson distributio

ID: 2933898 • Letter: T

Question

The binomial distribution bin(n, p) can be approximated by a Poisson distribution with mean = np. To explore this, suppose we compute the probability q = P(X 8), where X is a Poisson random variable with mean = 10. Then we should have qn,p q where qn,p = P(Y 8), for Y bin(n, p) with p = /n, provided n is large enough. To get a sense of how large n should be, using R, construct a plot of qn,p against n, for n = 10, 11, . . . , 199, 200, in each case setting p = /n. Superimpose on the plot a horizontal line at q. Then find the smallest n for which |qn,p q| 0.01.

Explanation / Answer

#

#cdf of poisson with lambda = 10.

pLambda=10;

# pr(X<=8)

Prpois=ppois(q=8,lambda=pLambda)

#Calculate the binomial probability for Y<=8 and for differen n

YBinom={}

for (n in 10:200) {

p=pLambda/n

PrBinom=pbinom(8,size=n,prob=p)

YBinom=cbind(YBinom,PrBinom)

}

plot(c(10:200),YBinom,type="l",col="blue",xlab="n",ylab="Probability of x<=8")

abline(h=Prpois,col="red")

## finding the smallest n at which |Prpois-PrBinom|<=0.01

n=10

while (TRUE) {

p=pLambda/n

PrBinom=pbinom(8,size=n,prob=p)

if (abs(Prpois-PrBinom)<=0.01){

print(paste("The value of n where |Prpois-PrBinom|<=0.01 is ",n))

break;

}

n=n+1;

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote