Answered step by step
Verified Expert Solution
Question
1 Approved Answer
##Question 2 Use the following commands to install the marketing dataset and load the datarium package into your session. #install.packages(datarium) library(datarium) data(marketing, package = datarium)
##Question 2
Use the following commands to install the marketing dataset and load the datarium package into your session.
#install.packages("datarium") library(datarium) data("marketing", package = "datarium") str(marketing) ## 'data.frame': 200 obs. of 4 variables: ## $ youtube : num 276.1 53.4 20.6 181.8 217 ... ## $ facebook : num 45.4 47.2 55.1 49.6 13 ... ## $ newspaper: num 83 54.1 83.2 70.2 70.1 ... ## $ sales : num 26.5 12.5 11.2 22.2 15.5 ...
- Find the covariance between the Sales and the advertising budget of newspaper. Comment on the output, in terms of the strength and direction of the relationship.
#INSERT YOUR ANSWER HERE
- Plot the Sales as a function of the Youtube variable using a scatterplot, then graph the least-square line on the same plot. Hint: You may use the ggplot() function from ggplot2 package.
#INSERT YOUR ANSWER HERE
- Use the regression line to predict the Sales amount when newspaper budget is $136.80K. Comment on the difference between the output and the expected value.
#INSERT YOUR ANSWER HERE
- Use newspaper and facebook variables to build a linear regression model to predict sales. Display a summary of your model indicating Residuals, Coefficients, ..., etc. What conclusion can you draw from this summary?
#INSERT YOUR ANSWER HERE
- Use the regression line to predict the Sales amount when newspaper budget is $136.80K and facebook is $43.92K.
#INSERT YOUR ANSWER HERE
- What is the difference between the output in (e) and the output in (c)
#INSERT YOUR ANSWER HERE
- Display the correlation matrix of the variables: youtube, facebook, newspaper and sales. What conclusion can you draw?
#INSERT YOUR ANSWER HERE
- In your opinion, which statistical test should be used to discuss the relationship between youtube and sales? Hint: Review the differnce between Pearson and Spearman tests.
#INSERT YOUR ANSWER HERE
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started