Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

We are interested in predicting which houses have median value greater than $30,000 using the variables in the Boston housing dataset . The dataset Boston

We are interested in predicting which houses have median value greater than $30,000 using the variables in theBoston housing dataset. The datasetBostonwill be loaded into the environment once the following command is run:library(MASS)

Please run the following code in R to learn more about the variables in the dataset: ?Boston

Create a new binary variableResultwith a value of 1 if themedv (median value of owner-occupied homes in $1000s) variable is greater than $30k and 0 otherwise. Then create a logistic regression model that uses all the variables in the Boston dataset as features, and Result as the response. Please do not forget to remove the medv variable while building the model.

Note: Create the new Result variable from medv, and use the new variable as the target variable. Remove medv from the dataset, and use the other columns as features.

Question 1: Which statement is true?

A) If chas increases by 1 unit, the natural log of the odds of the house median value being greater than $30,000 will decrease by 0.9566, holding all other variables fixed.

B) dis and nox are statistically significant at a 95% confidence interval.

C) tax and lstat have an inverse relationship with the natural log of the odds of the house median value being greater than $30,000.

D) rm is not statistically significant at a 95% confidence interval.

Question 2: What is the sensitivity of the model? (Use threshold 0.5 and consider "1" as the positive reference case in the confusion matrix)

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

Recommended Textbook for

Applied Calculus

Authors: Stefan Waner, Steven Costenoble

6th Edition

1285415310, 9781285415314

More Books

Students also viewed these Mathematics questions