###Question 1.1 : What is the mean and standard deviation of mpg of the mtcars data?

mean(mtcars$mpg)
## [1] 20.09062
sd(mtcars$mpg)
## [1] 6.026948

Answer: Therefore, the mean of mpg of the mtcars is equal to 20.09062 and its standard deviation is equal to 6.026948.

###Question 1.2: Is there sufficient evidence that the population mean score of the mtcars data exceeds 19 miles per gallon?

Answer: Yes.

###Question 1.3: Refer to Question 1.2, state your null and alternative hypothesis.

Answer: H_a: The population mean score of the mtcars data exceeds 19 miles per gallon. H_a: mu > 19 miles per gallon H_0: The population mean score of the mtcars data does not exceed 19 miles per gallon. H_0: mu <= 19 miles per gallon

t.test(mtcars$mpg, mu = 19, alternative = "greater")
## 
##  One Sample t-test
## 
## data:  mtcars$mpg
## t = 1.0237, df = 31, p-value = 0.157
## alternative hypothesis: true mean is greater than 19
## 95 percent confidence interval:
##  18.28418      Inf
## sample estimates:
## mean of x 
##  20.09062

###Question 1.4: Is there sufficient evidence that mean difference of miles per gallon between automatic and manual cars differ statiscally?

Answer: Yes.

###Question 1.5: Refer to Question 1.4, state your null and alternative hypothesis.

Answer: H_a: The mean difference of miles per gallon between automatic and manual cars differ statistically. H_0: The mean difference of miles per gallon between automatic and manual cars does not differ statistically.

aggregate(mtcars$mpg, list(mtcars$am), mean)
##   Group.1        x
## 1       0 17.14737
## 2       1 24.39231