0.1 Intro

In this assignment we are using the USArrests data set.

1 Create a scatterplot matrix for the data.

2 Create a numerical summary of the data.

##     State               Murder          Assault         UrbanPop    
##  Length:50          Min.   : 0.800   Min.   : 45.0   Min.   :32.00  
##  Class :character   1st Qu.: 4.075   1st Qu.:109.0   1st Qu.:54.50  
##  Mode  :character   Median : 7.250   Median :159.0   Median :66.00  
##                     Mean   : 7.788   Mean   :170.8   Mean   :65.54  
##                     3rd Qu.:11.250   3rd Qu.:249.0   3rd Qu.:77.75  
##                     Max.   :17.400   Max.   :337.0   Max.   :91.00  
##       Rape      
##  Min.   : 7.30  
##  1st Qu.:15.07  
##  Median :20.10  
##  Mean   :21.23  
##  3rd Qu.:26.18  
##  Max.   :46.00

3 Sort the data by population and call the new data “sortedUSAArrests”

4 Change the variable name “UrbanPop” to “UrbanPopulation” without changing the dataset name.

5 Make a subset from the sorted data that only includes the top 10 states with the highest murder rates, then

6 Create a visual of the murder rate for the 10 states.

7 Create a subset from the original data such that the subset only contains the observations with population greater than 80 and the murder rate greater than 10.