Answered step by step
Verified Expert Solution
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
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 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 distributionStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started