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

SS 220.08Analy. Dec.-Making for BUS&MGMT;)-SPRING 2018 omework: Homework # 2 cor

ID: 3728098 • Letter: S

Question

SS 220.08Analy. Dec.-Making for BUS&MGMT;)-SPRING 2018 omework: Homework # 2 core: 0 of 2 pts x3.6.49-T Troy Robinson&1 3/11/18 10:57 PM ll of 19 (18compete) Hw Score: 70%, 28 of 40 pts Sopose te gover mert woud ike to mestgate t erelaborship between te engresm of sedans and t" mies per galon (MR)hey get The Kerparyngtable sh selection of sedans Complete parts a through e below care ion to view the data table sthe "gre natchn.d 'Id nin galn fra Caloulate the sample covaance Round to hawo decimal places as needed) Engine Sce vesus Mpo Car Engine Siee MPG 28 25 Print e 2 8

Explanation / Answer

##R code to calculate covarience

##store car numbers in car dataframe
##put car numbers in a sequence
car<-seq(1:9)

##Store car numbers and mpg
engine_size<-c(2.5,2.0,2.5,3.3,3.1,2.3,2.5,2.1,3.2)
mpg<-c(31,29,28,22,21,31,24,25,21)

##Calculate covarience and round covarience to two decimal places
covarience<-round(cov(engine_size,mpg),2)

##print covarience
covarience

[1] -1.45