diff --git a/Homeworks/homework1.Rmd b/Homeworks/homework1.Rmd index 149a7bc..31765be 100644 --- a/Homeworks/homework1.Rmd +++ b/Homeworks/homework1.Rmd @@ -1,6 +1,6 @@ --- title: "Homework 1" -author: "Name1, Name2 and Name3" +author: "Jie Chen" date: '2018-09-21' output: html_document --- @@ -11,21 +11,31 @@ knitr::opts_chunk$set(echo = TRUE) ## Question 1 (Chapter 2, #1, 8 marks) -(a) +(a) -(b) +(b) -(c) +(c) -(d) +(d) ## Question 2 (Chapter 2, #2, 6 marks) -(a) +(a) -(b) +(b) -(c) +(c) ## Question 3 (Chapter 2, #9, 8 marks) @@ -35,9 +45,10 @@ data(Auto) head(Auto) ``` -(a) +(a) -(b) +(b) < ```{r} # Hints: @@ -73,6 +84,8 @@ meansd <- function(x) { AutoSubset <- Auto[c(1:9,86:nrow(Auto)),1:7] ``` -(e) +(e)The variables 'cylinders', 'displacement', 'housepower' +and 'weight' are positively correlated with each other +and negatively correlated with "mpg'. -(f) +(f) Mpg associated with all of the quantitative variables.