Question

In: Statistics and Probability

Click the block of code below and hit the Run button above. In [6]: from statsmodels.formula.api...

Click the block of code below and hit the Run button above.

In [6]:

from statsmodels.formula.api import ols

# create the multiple regression model with mpg as the response variable; weight and horsepower as predictor variables.
model = ols('mpg ~ wt+hp', data=cars_df).fit()
print(model.summary())
                            OLS Regression Results                            
==============================================================================
Dep. Variable:                    mpg   R-squared:                       0.825
Model:                            OLS   Adj. R-squared:                  0.813
Method:                 Least Squares   F-statistic:                     63.86
Date:                Thu, 13 Feb 2020   Prob (F-statistic):           5.81e-11
Time:                        23:12:29   Log-Likelihood:                -70.042
No. Observations:                  30   AIC:                             146.1
Df Residuals:                      27   BIC:                             150.3
Df Model:                           2                                         
Covariance Type:            nonrobust                                         
==============================================================================
                 coef    std err          t      P>|t|      [0.025      0.975]
------------------------------------------------------------------------------
Intercept     37.1892      1.627     22.862      0.000      33.851      40.527
wt            -3.8068      0.653     -5.831      0.000      -5.146      -2.467
hp            -0.0322      0.010     -3.348      0.002      -0.052      -0.012
==============================================================================
Omnibus:                        4.159   Durbin-Watson:                   2.250
Prob(Omnibus):                  0.125   Jarque-Bera (JB):                3.028
Skew:                           0.772   Prob(JB):                        0.220
Kurtosis:                       3.202   Cond. No.                         563.
==============================================================================

Warnings:
[1] Standard Errors assume that the covariance matrix of the errors is correctly specified.

Is at least one of the two variables (weight and horsepower) significant in the model? Run the overall F-test and provide your interpretation at 5% level of significance. Include the following in your analysis:

  1. Define the null and alternative hypothesis in mathematical terms and in words.
  2. Report the level of significance.
  3. Include the test statistic and the P-value. (Hint: F-Statistic and Prob (F-Statistic) in the output).
  4. Provide your conclusion and interpretation of the test. Should the null hypothesis be rejected? Why or why not?

Solutions

Expert Solution

From Given output we can

a) Define the null and alternative hypothesis in mathematical terms and in words.

Answer -

H0 : both variables (weight and horsepower) insignificant in the model

Ha :  least one of the two variables (weight and horsepower) significant in the model

b) Report the level of significance

Answer-

level of significance = 5% = 0.05

c) Include the test statistic and the P-value. (Hint: F-Statistic and Prob (F-Statistic) in the output).

Answer -

test statistic = 63.86

P-value = 5.81e-11

  

d) Provide your conclusion and interpretation of the test. Should the null hypothesis be rejected? Why or why not?

Answer -

Decision Rule : we reject Ho if p-value is less than level of significance.

Conclusion : p -value < 0.05 so we reject H0 hypothesis

Interpretation : There is  least one of the two variables (weight and horsepower) significant in the model

-----------------------------------------------------------------------------------------------------------------------------------------------

Dear student,
I am waiting for your feedback. I have given my 100% to solve your queries. If you are satisfied by my given answer please help me out by giving thumbs up.
  
Thank You!!!


Related Solutions

Fill in the missing information from the statements below sothat the entire code block fulfills...
Fill in the missing information from the statements below so that the entire code block fulfills the program requirements from the last step and prints the desired output. You only need to supply the parts of each statement that are not shown below.Fill in the Blanks — Fill in the blanksnumber1 = int(_________ ("Enter the first number: "))number2 = __________ (input("Enter the second number: "))the_sum = _________print(  )_____________
Sample Code and Models Run each of the models below and explain the code function and...
Sample Code and Models Run each of the models below and explain the code function and your findings for each system, do they agree/disagree with what you understand and why ?? Matlab Code % Winter 2018 Control Engineering % Lab No.3 - Root Locus problems % Mark Clarke clear s = tf('s') K = 1150; %Proportional Controller Gain, May need to be altered? % Enter Model 1 % This is a model of a simple 2nd order with no zeros...
Compile and run the following code then answer the following questions: a.) Run this command from...
Compile and run the following code then answer the following questions: a.) Run this command from the shell prompt: ./a.out ls -F Explain, in your own words, why you see the screen output you do and how that output relates to both the content of the program AND the nature of the shell command used to invoke it. Be sure to comment on the pointer arithmetic done inside the line: execvp(*(argv+1), argv+1); b.) Run this command from the shell prompt:...
A system of two blocks connected by a light rope is released from rest with the 12.0 kg block 2.00 m above the floor as shown below.
A system of two blocks connected by a light rope is released from rest with the 12.0 kg block 2.00 m above the floor as shown below. Ignore friction and mass of the pulley. (a) Find the speed with which the 12.0 kg block strikes the floor; (b) How high will the 4.0 kg block travel upward with respect to the floor?
Below is my source code for file merging. when i run the code my merged file...
Below is my source code for file merging. when i run the code my merged file is blank and it never shows merging complete prompt. i dont see any errors or why my code would be causing this. i saved both files with male names and female names in the same location my source code is in as a rtf #include #include #include using namespace std; int main() { ifstream inFile1; ifstream inFile2; ofstream outFile1; int mClientNumber, fClientNumber; string mClientName;...
True/false. In the long-run, if price is above average fixed cost but below average total cost...
True/false. In the long-run, if price is above average fixed cost but below average total cost a firm should stay in the market. True/false. Total cost divided by output is marginal cost. True/false. In the long-run, firms in a competitive market earn zero profit and the market price is set such that each individual firms' average total cost is minimized. True/false. The average fixed cost curve never increases as quantity increases. True/false. The marginal cost curve passes through the minimum...
A 15.0 kg block is released from rest at point A in the figure below. The...
A 15.0 kg block is released from rest at point A in the figure below. The track is frictionless except for the portion between points B and C, which has a length of 6.00 m. The block travels down the track, hits a spring of force constant 2,300 N/m, and compresses the spring 0.200 m from its equilibrium position before coming to rest momentarily. Determine the coefficient of kinetic friction between the block and the rough surface between points B...
Q (actual): 4 6 7 10 13 Q*: 5 6 6 8 10 From the above...
Q (actual): 4 6 7 10 13 Q*: 5 6 6 8 10 From the above table, What is SSE? What is TSS? What is R-squared?
A 10-kg block A is released from rest 2 m above the 5-kg plate P, which...
A 10-kg block A is released from rest 2 m above the 5-kg plate P, which can slide freely along the smooth vertical guides BC and DE. Determine the velocity of the block and plate just after impact. The coefficient of restitution between the block and the plate is e = 0.75. Also, find the maximum compression of the spring due to impact.The spring has an unstretched length of 600 mm The spring with the 5 kg plate are stationary...
Sketch the region bounded above the curve of y=(x^2) - 6, below y = x, and...
Sketch the region bounded above the curve of y=(x^2) - 6, below y = x, and above y = -x. Then express the region's area as on iterated double integrals and evaluate the integral.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT