Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

This exercise involves the Boston housing data set. (a) To begin, load in the Bo

ID: 3071793 • Letter: T

Question

This exercise involves the Boston housing data set. (a) To begin, load in the Boston data set. The Boston data set is part of the MASS library in R. > library(MASS) Now the data set is contained in the object Boston. > Boston Read about the data set: > ?Boston How many rows are in this data set? How many columns? What do the rows and columns represent? (b) Make some pairwise scatterplots of the predictors (columns) in this data set. Describe your findings. (c) Are any of the predictors associated with per capita crime rate? If so, explain the relationship. (d) Do any of the suburbs of Boston appear to have particularly high crime rates? Tax rates? Pupil-teacher ratios? Comment on the range of each predictor. (e) How many of the suburbs in this data set bound the Charles river?

Explanation / Answer

Solutoa:

> dim(Boston)
[1] 506 14

506 rows

14 columns

Clumns names are:

names(Boston)
"crim" "zn" "indus" "chas" "nox" "rm" "age" "dis" "rad"   
] "tax" "ptratio" "black" "lstat" and "medv"

b) Make some pairwise scatterplots of the predictors (columns) in this data set.

pairs(Boston[, -1], gap = 0, pch = ".")

Solutionc:

library(GGally)
ggcorr(Boston, palette = "RdBu", label = TRUE)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote