Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The questions are at the bottom of the picture. Rows: 8 , 9, 10, 11 If picture is unclear, please zoom in the window. I
The questions are at the bottom of the picture.
Rows: 8 , 9, 10, 11
If picture is unclear, please zoom in the window. I could not make it larger...
Thank you in advance
In [7]: #b) Run OLS (Ordinary Least Square) between TV, Radio, and Newspaper as predictors, and # Sales as the response. Print the summary of the Linear regression result. Sales 0.897 Model: In [21]: model = sm.OLS.from_formula('Sales ~ TV + Radio + Newspaper', df).fit() print(model.summary() OLS Regression Results Dep. Variable: R-squared: OLS Adj. R-squared: 0.896 Method: Least Squares F-statistic: 570.3 Date: Tue, 09 Mar 2021 Prob (F-statistic): 1.58e-96 22:43:04 Log-Likelihood: -386.18 No. Observations: 200 AIC: 780.4 Df Residuals: 196 190 BIC: 793.6 Df Model: 3 Covariance Type: nonrobust Time: coef std err P>It! [0.025 0.975) 9.422 Intercept TV Radio Newspaper 2.9389 0.0458 e. 1885 -0.0010 0.312 0.001 0.009 0.006 32.809 21.893 -0.177 0.000 0.000 0.000 0.860 2.324 0.043 0.172 -0.013 3.554 0.049 0.206 0.011 0.011 Omnibus: Prob(Omnibus): Skew: Kurtosis: 60.414 0.000 -1.327 6.332 Durbin-Watson: Jarque-Bera (JB): Prob(JB): Cond. No. 2.084 2.084 151.241 1.44e-33 454. Notes: [1] Standard Errors assume that the covariance matrix of the errors is correctly specified. In [8]: # c) From the result of the Ordinary Least Square (OLS) method, which advertising method is not # contributing to Sales? By reviewing the OLS result, Why do you think that method is ineffective # in terms of its coefficient, t value, and P>/t/? Answer: In [9]: # d) By removing the worst advertising method, run the OLS with the remaining two other advertising # methods and print summary of the linear regression result. In [ ]: In [10]: # e) From previous OLS result, we obtained a very good R-squared score. To get a better R-squared # score, run the OLS model again by adding variations of predictors such as interaction terms or # nonlinear terms. Print summary of the Linear regression to demonstrate a better result. In [ ]: In [11]: #f) From the previous analysis result in e), what percentages of advertising investments would # result the best sales performance between the two advertising methods? Answer: In [7]: #b) Run OLS (Ordinary Least Square) between TV, Radio, and Newspaper as predictors, and # Sales as the response. Print the summary of the Linear regression result. Sales 0.897 Model: In [21]: model = sm.OLS.from_formula('Sales ~ TV + Radio + Newspaper', df).fit() print(model.summary() OLS Regression Results Dep. Variable: R-squared: OLS Adj. R-squared: 0.896 Method: Least Squares F-statistic: 570.3 Date: Tue, 09 Mar 2021 Prob (F-statistic): 1.58e-96 22:43:04 Log-Likelihood: -386.18 No. Observations: 200 AIC: 780.4 Df Residuals: 196 190 BIC: 793.6 Df Model: 3 Covariance Type: nonrobust Time: coef std err P>It! [0.025 0.975) 9.422 Intercept TV Radio Newspaper 2.9389 0.0458 e. 1885 -0.0010 0.312 0.001 0.009 0.006 32.809 21.893 -0.177 0.000 0.000 0.000 0.860 2.324 0.043 0.172 -0.013 3.554 0.049 0.206 0.011 0.011 Omnibus: Prob(Omnibus): Skew: Kurtosis: 60.414 0.000 -1.327 6.332 Durbin-Watson: Jarque-Bera (JB): Prob(JB): Cond. No. 2.084 2.084 151.241 1.44e-33 454. Notes: [1] Standard Errors assume that the covariance matrix of the errors is correctly specified. In [8]: # c) From the result of the Ordinary Least Square (OLS) method, which advertising method is not # contributing to Sales? By reviewing the OLS result, Why do you think that method is ineffective # in terms of its coefficient, t value, and P>/t/? Answer: In [9]: # d) By removing the worst advertising method, run the OLS with the remaining two other advertising # methods and print summary of the linear regression result. In [ ]: In [10]: # e) From previous OLS result, we obtained a very good R-squared score. To get a better R-squared # score, run the OLS model again by adding variations of predictors such as interaction terms or # nonlinear terms. Print summary of the Linear regression to demonstrate a better result. In [ ]: In [11]: #f) From the previous analysis result in e), what percentages of advertising investments would # result the best sales performance between the two advertising methodsStep 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