Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

How would I code this using Python? Thank you in advance! Exercise 3.14 Define a function for the Poisson distribution and use it to plot

image text in transcribedHow would I code this using Python? Thank you in advance!

Exercise 3.14 Define a function for the Poisson distribution and use it to plot P(r; 1) for 1 = 4, 1 = 9, 1 = 25, and 1 = 100. Confirm that the range of r where the probability is nonzero is roughly given by i to + v. Discuss in words how the shape of the Poisson distribution changes as I becomes large. Hints: Use the factorial function in scipy.misc. For large 1, the factor \" becomes too large for python to deal with. The trick is to take advantage of the fact that r" = eln z" = en in x to combine this term with the e-) which is becoming very small, like so l'e-1 = er Ine -1 = exp(r In 1 1) You should write your function using this form. Recall that the natural log in python is np.log We have seen that as becomes large, the probability is spread over a large range of r values. This suggests that in the large / limit we can treat r as a continuous variable, which simplifies things considerably. In this limit we can also simplify our expression for the Poisson distribution. Exercise 3.14 Define a function for the Poisson distribution and use it to plot P(r; 1) for 1 = 4, 1 = 9, 1 = 25, and 1 = 100. Confirm that the range of r where the probability is nonzero is roughly given by i to + v. Discuss in words how the shape of the Poisson distribution changes as I becomes large. Hints: Use the factorial function in scipy.misc. For large 1, the factor \" becomes too large for python to deal with. The trick is to take advantage of the fact that r" = eln z" = en in x to combine this term with the e-) which is becoming very small, like so l'e-1 = er Ine -1 = exp(r In 1 1) You should write your function using this form. Recall that the natural log in python is np.log We have seen that as becomes large, the probability is spread over a large range of r values. This suggests that in the large / limit we can treat r as a continuous variable, which simplifies things considerably. In this limit we can also simplify our expression for the Poisson distribution

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Online Market Research Cost Effective Searching Of The Internet And Online Databases

Authors: John F. Lescher

1st Edition

0201489295, 978-0201489293

More Books

Students also viewed these Databases questions

Question

Perform an Internet search. Discuss a company that uses EPLI.

Answered: 1 week ago