Computer Science > QUESTIONS & ANSWERS > Southern New Hampshire University DAT 610 - Module 8 Exercise (All)
DAT 610 – Exercise 8 1.Average Loss Frequency drawn from Poisson distribution using R. > IIHS_Data= read.csv("C:/Users/n0207280/Personal/SNHU/DAT 610 Optimization and Risk Assessment/Data/DAT 610... IIHS Data for EX 8.csv") > View(IIHS_Data) > table(IIHS_Data$YEAR) 2009 2010 2011 2012 28 29 27 26 > table(IIHS_Data$YEAR)*mean(IIHS_Data$Collision.)# take note of these values 2009 2010 2011 2012 2945.855 3051.064 2840.645 2735.436 > yearMean <- mean(table(IIHS_Data$YEAR)) > rpois(10, yearMean) [1] 31 34 23 24 29 36 34 17 29 23 > rpois(1, yearMean) [1] 28 2. Find the average and standard deviation of the “Collision” loss amount. > m <- mean(IIHS_Data$Collision.) > s <- sd(IIHS_Data$Collision.) > mu <- log(m^2/sqrt(s+m^2)) # mean lognormal distribution > sigma <- sqrt(log(1+s/m^2)) 3. Average Loss Severity drawn from Lognormal distribution using R > rlnorm(10,mu,sigma) # 10 samples [1] 111.34060 104.43148 113.25147 104.55559 105.54698 104.59153 99.10056 103.67344 109.86846 [10] 107.70272 > rlnorm(1,mu,sigma) # 1 sample [1] 114.3093 [Show More]
Last updated: 2 years ago
Preview 1 out of 4 pages
Buy this document to get the full access instantly
Instant Download Access after purchase
Buy NowInstant download
We Accept:
Can't find what you want? Try our AI powered Search
Connected school, study & course
About the document
Uploaded On
Jul 31, 2021
Number of pages
4
Written in
This document has been written for:
Uploaded
Jul 31, 2021
Downloads
0
Views
49
In Scholarfriends, a student can earn by offering help to other student. Students can help other students with materials by upploading their notes and earn money.
We're available through e-mail, Twitter, Facebook, and live chat.
FAQ
Questions? Leave a message!
Copyright © Scholarfriends · High quality services·