You are on page 1of 3

Business Analytics CIA 4

Aryan Garg
19212016

Question 1- Open a new R script file.


a) Import Advertising dataset into RStudio (2.5 Marks)
b) Plot the relationship between advertising expenditure through Newspaper and the sales
of
the product (2.5 Marks).
c) Does the advertising expenditure through newspaper significantly impacts sales? (2.5
Marks)
d) What is the adjusted R2 value of the relationship? (2.5 Marks)
Answer 1-

D. The adjusted R-squared is a modified version of R-squared that has been adjusted for the
number of predictors in the model. The adjusted R-squared increases only if the new term
improves the model more than would be expected by chance. It decreases when a predictor
improves the model by less than expected by chance.
Question 2- Open a new R script file.
a) Call appropriate library/libraries (2 Marks)
b) Call “mtcars” dataset(2Marks)
c) Group the data by “carb”, summarize by calculating mean of “HP” (4Marks)
d) Create a plot between carb and HP using ggplot (2 Marks)
e) Save the plot, copy the plot and paste it on the word answer file (2 Marks)
Answer 2-
Question 3- Open a new R script file
a) Create a histogram for “mpg” in dataset “mtcars” (1 Marks)
b) Adjust the binwidth to 5(1 Marks)
c) Adjust line color of histogram to blue and fill to yellow (1 Marks)
Answer 3-

You might also like