UCD Monte Carlo inference - STAT404102019-2020 Nial FrielAssignment 4Hand-in date: Monday 25th of November, 12pm1) You are hired as a statistician to investigate absenteism in a company. You believe that absensesfollow a Poisson(λ) distribution and, before seeing any evidence, you are 75% sure that the valueof λ is less than 5 and decide to use an exponential distribution as your prior for λ. You take arandom sample of 50 students and find out the number of absences that each has had over thepast semester. You discover that HR has only recorded the precise number of absences for anyemployee if they have had 2 or more absences in the past 12 months. Therefore the data donot discriminate between those who have had 0 absences and those who have had 1 absence.The data that you are provided with are summarised below.Number of absences ≤ 1 2 3 4 5 6 7 8 9 10Frequency 18 13 8 3 4 3 0 0 0 1(a) Derive carefully an algorithm to estimate the posterior distribution of λ. [10](b) Similarly, explain STAT40410代做、代写UCD Monte Carlo、how one might explore the posterior distribution of z, the number ofemployees out of the sample of 50 who had no absences during the previous 12 months.[10](c) Write R code to implement this algorithm. [20](d) Provide suitable summaries (posterior means and variances, credible intervals, probabilitydensities etc.) to communicate your conclusions regarding λ and z. [20]2) Consider again, the example which we have examined recently in lectures. Namely, to estimatethe probability P(X > 2) where X follows a Cauchy distribution with densityf(x) = 1π(1 + x2), x ∈ R.(a) Implement an algorithm in R to estimate this probability using control variates. (You canuse the same approach developed in the lectures). [20](b) Similarly, implement an algorithm in R to estimate this probability using importance sampling(without employing control variates). (Again, using the same approach in lectures).[10](c) Compare the estimated variance resulting from the estimators in 1. and 2. above. [10]转自:http://www.daixie0.com/contents/18/4341.html
讲解:STAT40410、UCD Monte Carlo、R、RC/C++|Java
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
相关阅读更多精彩内容
- UCD Monte Carlo inference - STAT404102019-2020 Nial Friel...
- The Inner Game of Tennis W Timothy Gallwey Jonathan Cape ...
- 在一个昏沉的下午我读完了这本书,这本由杨绛先生呕心沥血所著的书。 说它呕心沥血不是因为这本书耗费了作者多少才华精力...