Part XXXXXXXXXXpoints). A state is considering an overhaul of its restaurant health-inspection protocol. The data in columns A through E resulted from inspections done (“Pass” or “Fail” using the...

1 answer below »


Part 1 (120 points).A state is considering an overhaul of its restaurant health-inspection protocol. The data in columns A through E resulted from inspections done (“Pass” or “Fail” using the proposed protocol) on a large number of small (seating cap.



  1. Using your first 200 observations as a training sample, formulate (and summarize) a logistic regression model that would allow you to predict whether a particular location will pass the inspection. How do those predictors that you use in your model influence the likelihood of a location’s passing? Are all predictors "significant"?

  2. Having decided on a model, use it to estimate the likelihood of your 100 held-out restaurants passing the inspection (use this rule … if the estimated probability of passing is less than or equal to 0.45, forecast that restaurant as a “fail”; if the estimated probability is greater than or equal to 0.55, forecast that restaurant as a “pass”). Summarize how well this fitted model works with a confusion matrix.




Part 2 (80 points).Using the same 200 observations you used to formulate your logistic regression model, develop (and prune, if appropriate) a classification tree to predict a restaurant’s inspection result. Draw a picture of this tree and summarize how well it predicts results in your hold-out sample with a confusion matrix.




Sheet1 RESULTEXPERAGECHAINREGION PASS1061B FAIL13111A PASS1861B FAIL13110B FAIL591C FAIL13110A PASS1551C FAIL1090A PASS1661C PASS8120B PASS1120B FAIL10101C PASS1460B FAIL1190B PASS1261C FAIL2091C FAIL13101C FAIL1270A FAIL1150C FAIL1361A PASS8120B PASS1061B FAIL13101C FAIL1190B PASS1261C PASS1551C FAIL13111A PASS1661C FAIL2091C PASS1460B FAIL591C PASS1120B FAIL1090A FAIL1361A PASS1861B FAIL13110A FAIL13110B FAIL1270A FAIL10101C FAIL1150C PASS1061B FAIL13111A PASS1861B FAIL13110B FAIL591C FAIL13110A PASS1551C FAIL1090A PASS1661C PASS8120B PASS1120B FAIL10101C PASS1460B FAIL1190B PASS1261C FAIL2091C FAIL13101C FAIL1270A FAIL1150C FAIL1361A PASS8120B PASS1061B FAIL13101C FAIL1190B PASS1261C PASS1551C FAIL13111A PASS1661C FAIL2091C PASS1460B FAIL591C PASS1120B FAIL1090A FAIL1361A PASS1861B FAIL13110A FAIL13110B FAIL1270A FAIL10101C FAIL1150C PASS1061B FAIL13111A PASS1861B FAIL13110B FAIL591C FAIL13110A PASS1551C FAIL1090A PASS1661C PASS8120B PASS1120B FAIL10101C PASS1460B FAIL1190B PASS1261C FAIL2091C FAIL13101C FAIL1270A FAIL1150C FAIL1361A PASS8120B PASS1061B FAIL13101C FAIL1190B PASS1261C PASS1551C FAIL13111A PASS1661C FAIL2091C PASS1460B FAIL591C PASS1120B FAIL1090A FAIL1361A PASS1861B FAIL13110A FAIL13110B FAIL1270A FAIL10101C FAIL1150C PASS1061B FAIL13111A PASS1861B FAIL13110B FAIL591C FAIL13110A PASS1551C FAIL1090A PASS1661C PASS8120B PASS1120B FAIL10101C PASS1460B FAIL1190B PASS1261C FAIL2091C FAIL13101C FAIL1270A FAIL1150C FAIL1361A PASS8120B PASS1061B FAIL13101C FAIL1190B PASS1261C PASS1551C FAIL13111A PASS1661C FAIL2091C PASS1460B FAIL591C PASS1120B FAIL1090A FAIL1361A PASS1861B FAIL13110A FAIL13110B FAIL1270A FAIL10101C FAIL1150C PASS1061B FAIL13111A PASS1861B FAIL13110B FAIL591C FAIL13110A PASS1551C FAIL1090A PASS1661C PASS8120B PASS1120B FAIL10101C PASS1460B FAIL1190B PASS1261C FAIL2091C FAIL13101C FAIL1270A FAIL1150C FAIL1361A PASS8120B PASS1061B FAIL13101C FAIL1190B PASS1261C PASS1551C FAIL13111A PASS1661C FAIL2091C PASS1460B FAIL591C PASS1120B FAIL1090A FAIL1361A PASS1861B FAIL13110A FAIL13110B FAIL1270A FAIL10101C FAIL1150C PASS1061B FAIL13111A PASS1861B FAIL13110B FAIL591C FAIL13110A PASS1551C FAIL1090A PASS1661C PASS8120B PASS1120B FAIL10101C PASS1460B FAIL1190B PASS1261C FAIL2091C FAIL13101C FAIL1270A FAIL1150C FAIL1361A PASS8120B PASS1061B FAIL13101C FAIL1190B PASS1261C PASS1551C FAIL13111A PASS1661C FAIL2091C PASS1460B FAIL591C PASS1120B FAIL1090A FAIL1361A PASS1861B FAIL13110A FAIL13110B FAIL1270A FAIL10101C FAIL1150C PASS1061B FAIL13111A PASS1861B FAIL13110B FAIL591C FAIL13110A PASS1551C FAIL1090A PASS1661C PASS8120B PASS1120B FAIL10101C PASS1460B FAIL1190B PASS1261C FAIL2091C FAIL13101C FAIL1270A FAIL1150C FAIL1361A PASS8120B PASS1061B FAIL13101C FAIL1190B PASS1261C PASS1551C FAIL13111A PASS1661C FAIL2091C PASS1460B FAIL591C PASS1120B FAIL1090A FAIL1361A PASS1861B FAIL13110A FAIL13110B FAIL1270A FAIL10101C FAIL1150C PASS1061B FAIL13111A PASS1861B FAIL13110B FAIL591C FAIL13110A PASS1551C FAIL1090A PASS1661C PASS8120B PASS1120B FAIL10101C PASS1460B FAIL1190B PASS1261C FAIL2091C FAIL13101C FAIL1270A FAIL1150C FAIL1361A
Answered Same DayNov 05, 2021

Answer To: Part XXXXXXXXXXpoints). A state is considering an overhaul of its restaurant health-inspection...

Sudharsan.J answered on Nov 07 2021
169 Votes
Prediction of Resturant Inspection Results
Question-1:
R-Output:
There was a negative relation fo
und between EXPER, AGE in comparison with results in passing the inspection, and positive relation with CHAIN and REGION-B and C in comparison to results in passing inspection. There was a statistically significant difference noted between Results and AGE. Other than AGE variable none of the variables found to have significant difference.
Based on the model fitted with Trained data (200 observation) and predicted values found using Test data (100 observation),     the estimated probabilities of Passing is less than 0.45 is coded as FAIL and greater than 0.45 is recoded as PASS. At the end of the result, 90% of the outcome is predicted correctly and just 10% results wrongly predicted.
Question-2:
> table_mat <- table(Test_data$RESULT, prediction_of_Restaurant)
> table_mat
prediction_of_Restaurant
FAIL PASS
FAIL ...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here