Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

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 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 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.

Answered Same Day Nov 05, 2021

Solution

Sudharsan.J answered on Nov 07 2021
157 Votes
Prediction of Resturant Inspection Results
Question-1:
R-Output:
There was a negative relation found 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 co
ectly 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