$30
You may submit on paper or electronically via Blackboard. Please make sure your name is on every page of the assignment, and it is clearly marked which question you are answering. Your response will be graded for correctness and clarity. Points may be deducted if you do not provide information on how you arrived at your answer. Please submit your R code either as a separate attachment on Blackboard or in your main submission.
1. This problem continues analysis of the automobile traffic data from Assignment 3. Transforming the arrival times to counts of cars in each 15-second interval gives the following table of counts:
Number of Cars
Number of Occurrences
0
3
1
5
2
7
3
3
4
3
5 or more
0
• Assume a Poisson likelihood and a uniform[1] prior distribution for the unknown rate Λ. Find the posterior distribution for Λ.
• Find the mean, standard deviation, median and mode of the posterior distribution.
• Find a 95% symmetric tail area posterior credible interval for Λ.
• Compare your results with the results from Assignment 3. (Solutions to Assignment 3 will be posted by Wednesday and will be visible to everyone who has turned in Assignment 3.)
2. Suppose a highway engineer provided the following prior judgments about the rate of traffic on the stretch of highway (before seeing the data).
• The rate is equally likely to be above or below 15 cars per minute (or 3.75 cars every 15 seconds).
• There is a 90% chance that the rate is fewer than 28 cars per minute (or 7 cars every 15 seconds).
• There is a 90% chance that the rate is greater than 6 cars per minute (or 1.5 cars every 15 seconds).
Find a Gamma prior distribution that matches these judgments reasonably well. What are the parameters of this Gamma distribution? How well does it match the engineer’s judgments? Comment on whether you think it is reasonable to use this Gamma distribution as a prior distribution for the Poisson rate parameter.
3. Repeat Problem 1 using the prior distribution from Problem 2. Compare your results with Problem 1.
4. Make a triplot of the prior distribution, normalized likelihood and posterior distribution for Problem
3. Discuss the plot.
[1] Note: a uniform prior distribution gu(l) would assign equal density to all values of l. Actually, because integrating any positive constant over the real line yields ¥, there is no such distribution. Still, it is convenient to use a prior distribution that is nearly uniform on the range of values where the likelihood is non-negligible. The uniform distribution is the limit as the scale b tends to ¥ of a Gamma(1, b) distribution. In R, you can set the prior scale parameter to the constant Inf, which means infinity. Alternatively, you can use a very large value, such as 10$%, for the prior scale parameter.