Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

you might need an Accidents data, if you do then i will send it to you via email. Problem 8.2 Automobile Accidents. The file Accidentscsv

you might need an Accidents data, if you do then i will send it to you via email.

image text in transcribed
Problem 8.2 Automobile Accidents. The file Accidentscsv contains information on 42,183 actual automobile accidents in 2001 in the United States that involved one of three levels of injury: NO INJURY, INIURY, or FATALITY. For each accident, additional information is recorded, such as day of week, weather conditions, and road type. A rm might be interested in developing a system for quickly classifying the severity of an accident based on initial reports and associated data in the system (some of which rely on CPSassisted reporting}. Our goal here is to predict whether an accident just reported will involve an injury MAXjEVJR = 1 or 2) or will not (MAX_SEV_IR = 0). For this purpose, create a dummy variable called INJURY that takes the value \"yes\" if MAX_SEV_IR = 1 or 2, and otherwise \"no.\" a. Using the information in this dataset, if an accident has just been reported and no further information is available, what should the prediction be? [INIURY = Yes or No?) Why? b. Select the rst 12 records in the dataset and look only at the response {IN]URY) and the two predictors WEATHER_ R and TRAF \"CON R. i. Create a pivot table that examines lNIURY as a function of the two predictors for these 12 records. Use all three variables in the pivot table as rowsicolumns. ii. Compute the exact Bayes conditional probabilities of an injury (INJURY = Yes] given the six possible combinations of the predictors. iii. Classify the 12 accidents using these probabilities and a cutoff of 0.5. iv. Compute manually the naive Bayes conditional probability of an injury given WEATHEILR = 1 and 'I'RAF_CON_R = 1. v. Run a naive Bayes classifier on the 12 records and two predictors using R. Check the model output to obtain probabilities and classications for all 12 records. Compare this to the exact Bayes classification. Are the resulting classications equivalent? Is the ranking (= ordering} of observations equivalent

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

Students also viewed these Mathematics questions

Question

Explain the strength of acid and alkali solutions with examples

Answered: 1 week ago

Question

Introduce and define metals and nonmetals and explain with examples

Answered: 1 week ago