title: “ASSIGNMENT #2 PART 3” author: “RAVI TEJA VASAMSETTI” date: “7/22/2017” output: html_document —

Part 3

Using the USArrestsCoasts data, is the East Coast states suffer more violent crime than all other states? Perform one tail t tests for murder, assault, and rape

library(readr)
USArrests_Coasts <- read_csv("~/Downloads/USArrests_Coasts.csv")
## Warning: Missing column names filled in: 'X1' [1]
## Parsed with column specification:
## cols(
##   X1 = col_character(),
##   Murder = col_double(),
##   Assault = col_integer(),
##   UrbanPop = col_integer(),
##   Rape = col_double(),
##   `East Coast` = col_character(),
##   `West Coast` = col_character(),
##   `Any Coast` = col_character()
## )

Filtering data

plotting the DATA and T-test

## 
##  Welch Two Sample t-test
## 
## data:  newdata1$Murder and newdata1$Assault
## t = -7.3225, df = 14.092, p-value = 3.634e-06
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -219.2286 -119.9447
## sample estimates:
## mean of x mean of y 
##    7.6800  177.2667

## 
##  Welch Two Sample t-test
## 
## data:  newdata1$Rape and newdata1$Assault
## t = -6.8674, df = 14.206, p-value = 7.142e-06
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -209.0718 -109.6616
## sample estimates:
## mean of x mean of y 
##   17.9000  177.2667

## 
##  Welch Two Sample t-test
## 
## data:  newdata1$Murder and newdata1$Rape
## t = -4.283, df = 24.46, p-value = 0.0002485
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -15.139965  -5.300035
## sample estimates:
## mean of x mean of y 
##      7.68     17.90