Write an R function compare(n,p,k) that computes (exactly) P(X =k) P(Y= k), where Y~Pois(np).

Suppose X ~ Binom(n, p). Write an R function compare(n,p,k) that computes (exactly) P(X =k) P(Y= k), where Y~Pois(np).
Try your function on numbers where you expect the Poisson probability to be a good pproximation of the binomial. Also try it on numbers where you expect the approximation to be poor.

Hello Picasso,

please visit the homework policies of RStudio Community (FAQ: Homework Policy - meta / Guides & FAQs - RStudio Community) and provide a reprex (reproducible example) of your thoughts on how to solve this question.

As a hint: You might want to read about the R build in function for the density of a Binomial (dbinom()) and Poission (dpois()) respectively.

Kind regards

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.