Homework 3
Homework 3
5.5 420
6 380
6.5 350
6 400
5 440
6.5 380
4.5 450
5 420
Intercept 644.5161
Slope -42.58065
SUMMARY OUTPUT
According to the regression and
the relationship between price
Regression Statistics
and sales as price goes up sales
Multiple R 0.937137027 goes down
R Square 0.878225806
Adjusted R Square 0.857930108
Standard Error 12.74227575
Observations 8
ANOVA
df SS MS F Significance F
Regression 1 7025.806452 7025.806452 43.27152318 0.000592135
Residual 6 974.1935484 162.3655914
Total 7 8000
Coefficients Standard Error t Stat P-value Lower 95% Upper 95% Lower 95.0% Upper 95.0%
Intercept 644.516129 36.68873299 17.56714055 2.183434E-06 554.7420335 734.2902246 554.7420335 734.2902246
Price -42.58064516 6.473082556 -6.578109392 0.000592135 -58.41970758 -26.74158274 -58.41970758 -26.74158274
RESIDUAL OUTPUT
A D
Problem 3
Suppose we are modeling house price as depending on house size. Price is measured in
thousands of dollars and size is measured in thousands of square feet.
Suppose our model is:
(a) Given you know that a house has size s = 1:6, give a 95% predictive interval for the
price of the house.
(b) Given you know that a house has size s = 2:2, give a 95% predictive interval for the
price.
(c) In our model the slope is 50. What are the units of this number?
(e) What are the units of the the error standard deviation 15?
(f) Suppose we change the units of price to dollars and size to square feet
What would the values and units of the intercept, slope, and error standard deviation?
(g) If we plug s = 1:6 into our model equation, P is a constant plus the normal random
variables . Given s = 1:6, what is the distribution of P?
a) E N(0,15^2)
Low -30
High 30 70 < Price < 130
s 1.6
Low Interval 70
High 130
a) E N(0,15^2)
Low -30
High 30 100< Price < 160
s 2.2
Low Interval 100
High 160
c $/sq ft units
g P ~N(100,15^2)
200 100
Problem 4: The Shock Absorber Data
The data comes from a company which supplies a major automobile manufacturer with
shock absorbers. An important characteristic is the \force transferred through the shock
absorber when the shank is forced out of the cylinder". If you don't know what that really
means, don't worry, neither do I.
What we do need to understand is that the manufacturer only considers the shock to be an
acceptable part if the force measurement is between 485 and 585.
The shock manufacturer and the auto manufacturer are arguing over the following issue.
Before the shock is nally shipped, it is lled with gas. After it is lled with gas, it
becomes very dicult to measure the force characteristic we are interested in. The shock
manufacturers would like to make the measurement before the shock is lled with gas. The
auto maker is concerned that there may be a dierence in the force before and after the
shock is lled with gas and so would like to make the measurement after it is lled.
The shock maker claims that there is little dierence between the before and after measure-
ment so that the before measurement can be used.
To investigate this we have the before (column 1, reboundb) and the after (column 2,
rebounda) measurements on 35 shocks. The data for this problem is in shock.xls available
in the class website.
(a) Plot the before measurement vs. the after measurement. Does this look like the kind
of data we can use the simple linear regression model to think about? Why does it
make sense to choose the after measurement as \Y" and the before measurement as
\X"?
(b) What are 95% condence intervals for both the slope and the intercept?
(c) Test the null hypothesis Ho : 0 = 0.
(d) From the shock maker's point of view, what hypotheses would be of interest to test for
the slope and intercept. That is, what would the shock maker like the true intercept
and slope to be?
Test whether the intercept is equal to the value proposed by the shock maker.
Test whether the slope is equal to the value proposed by the shock maker.
(f) Suppose the before measurement is 550.
What is the plug-in predictive interval given x-before=550.
What does this interval suggest about the acceptability of the shock absorber?
a) Yes the data can use a simple linear regression and it make sense to use after measurement
as the Y axis because it is the dependent variable since it depends on the before measurement (x axis)
b)
c) y = 0.9495x + 18.226
Bo 0
Equation y = 0.9495x + 18.226
0.9495
it falls between the 95% confidence interval so you cannot reject it
d) ideally they would like the line to be a straight line where the before and after values
are the same. So they can conclude that the before and after test are the "same"
Slope 1 Test
Intercept 0 Test
y = 0.9495x + 18.226
Y 0.9495
You cannot reject because slope of 1 and intercept of 0 its wihin the 95% confidence interval
565
535.9 520 Predicted
545 Linear (Pre
590.22 588
525
610.21 598
556.96 544 505
510.64 519 485
532.77 533 485 505 525 545 565 585 605 625
518.93 494 reboundb
514.16 511
573.05 561
510.21 500
568.73 555
5 585 605 625
ne Fit Plot
258675829828
rebounda
Predicted rebounda
Linear (Predicted rebounda)
605 625
Problem 5
The data le for this question is available in the course website.
Consider the regression model
Applet = + SP500t + t t N(0; 2)
where Applet represents the return on Apple Computers in month t and SP500t represents
the return on the S&P 500 in month t.
(a) What is the interpretation of in terms of a measure of risk of the stock?
a) Betha is the slope of the equation which represent the change of the stock
(dependent variable) relative to the SP5000 (independent variable)
b) Alpha is the intercept which for this example represent the return or minimum return of the stock
inspite of the market movement. So if the SP500 is zero alpha is the minimum return
c) Apple
Standard Error t Stat P-value Lower 95%Upper 95%Lower 95.0%
Upper 95.0%
Intercept 1.896658027 0.830568 2.283567 0.025674 0.237899 3.555417 0.237899 3.555417
SP500 0.965954226 0.185665 5.202665 2.145E-06 0.595155 1.336753 0.595155 1.336753
Betha = 0.9659
Apple seems to have a high risk since for every change on X there is almost one unit change on Y
No, it is not the actual value it is rather a value for that specific fit.
the actual interval of betha can go from 0.5951 to 1.3367
d)
Safeway
CoefficientsStandard Error t Stat P-value Lower 95%Upper 95%Lower 95.0%
Upper 95.0%
Intercept 0.116445438 0.974943 0.119438 0.905297 -1.83065 2.063541 -1.83065 2.063541
SP500 0.861918602 0.217939 3.954866 0.000192 0.426665 1.297172 0.426665 1.297172
c) Apple
Standard Error t Stat P-value Lower 95%Upper 95%Lower 95.0%
Upper 95.0%
Intercept 1.896658027 0.830568 2.283567 0.025674 0.237899 3.555417 0.237899 3.555417
SP500 0.965954226 0.185665 5.202665 2.145E-06 0.595155 1.336753 0.595155 1.336753
Intel
CoefficientsStandard Error t Stat P-value Lower 95%Upper 95%Lower 95.0%
Upper 95.0%
Intercept 0.570552644 0.699624 0.815513 0.417757 -0.826694 1.967799 -0.826694 1.967799
SP500 0.876659698 0.156394 5.605453 4.559E-07 0.564319 1.189 0.564319 1.189
As we can see apple highest intercept it’s the highest which means that it is the safest. So even if SP500 is zero
it will yield the highest results, it is also the riskiest with the highest slope.
in other words any small change in SP500 has the biggest impact on the stock price
Regression Statistics
Multiple R 0.542216
R Square 0.293998
Adjusted R 0.283136
Standard E 6.391647
Observatio 67
ANOVA
Apple
df SS MS F Significance F
Regression 1 1105.802 1105.802 27.06772 2.145E-06 -15.000 -10.000
Residual 65 2655.455 40.85315
Total 66 3761.256
Coefficients
Standard Error t Stat P-value Lower 95%Upper 95%Lower 95.0%
Upper 95.0%
Intercept 1.896658 0.830568 2.283567 0.025674 0.237899 3.555417 0.237899 3.555417
SP500 0.965954 0.185665 5.202665 2.145E-06 0.595155 1.336753 0.595155 1.336753
RESIDUAL OUTPUT
Observation
Predicted Apple
Residuals
1 1.386392 -2.055848
2 0.598651 2.274479
3 3.891432 -1.126863
4 4.138748 3.734328
5 2.566162 7.374822
6 2.697303 -0.704258
7 6.295566 -0.538033
8 -1.507935 -9.270811
9 4.398457 -3.507078
10 4.762627 2.241052
11 6.365319 3.270175
12 4.954008 -7.102817
13 -0.998986 9.379848
14 6.888209 7.232203
15 0.606377 -12.43485
16 4.178537 -1.929149
17 3.754748 -3.738446
18 5.563676 -5.269366
19 3.125692 -5.659556
20 6.840958 -21.24554
21 2.763332 -11.84184
22 2.442275 -3.679413
23 0.136583 -10.89303
24 4.3506 -4.076567
25 4.317028 5.071461
26 3.036034 1.553883
27 5.81529 -4.73784
28 -3.899936 2.833971
29 1.249717 -3.851403
30 5.005459 5.52512
31 6.084679 12.75055
32 6.376094 6.336384
33 2.911643 3.047353
34 1.497234 -7.069877
35 12.44864 -6.30307
36 -4.809488 3.896072
37 -3.414977 1.970866
38 -0.035874 16.37888
39 0.264901 -3.760374
40 0.813444 -1.48276
41 4.694831 -4.232549
42 1.904453 -3.231428
43 5.25201 -1.150996
44 4.149973 1.049845
45 8.351029 -4.703111
46 1.896658 1.485337
47 5.590066 0.501828
48 10.55309 6.168814
49 -2.450802 -3.071544
50 8.492179 -6.221437
51 -3.104641 1.023683
52 -5.776686 4.177808
53 3.392027 7.701772
54 7.773803 7.079454
55 4.912185 1.647693
56 -1.607787 -7.255612
57 3.735465 1.649151
58 7.845259 -1.784653
59 0.042542 1.656391
60 5.31892 4.868281
61 5.467053 -2.508739
62 9.105272 5.599099
63 1.826948 3.081359
64 7.554144 0.362038
65 11.48184 8.23941
66 9.952379 7.767063
67 -8.483199 7.508382
SP500 Line Fit Plot
25.000
20.000
15.000
10.000
5.000 Apple
Apple
Predicted Apple
0.000
-15.000 -10.000 -5.000 0.000 5.000 10.000 15.000
-5.000
-10.000
-15.000
-20.000
SP500
SUMMARY OUTPUT
Safeway
Adjusted R 0.181557 10.000
Standard E 7.502683 0.000
Observatio 67 0 0 0
-10.000
0 0
0 .0 0 .0 0 .0
-2 -1 -20.000
ANOVA SP
df SS MS F Significance F
Regression 1 880.4337 880.4337 15.64096 0.000192
Residual 65 3658.866 56.29025
Total 66 4539.3
Coefficients
Standard Error t Stat P-value Lower 95%Upper 95%Lower 95.0%
Upper 95.0%
Intercept 0.116445 0.974943 0.119438 0.905297 -1.83065 2.063541 -1.83065 2.063541
SP500 0.861919 0.217939 3.954866 0.000192 0.426665 1.297172 0.426665 1.297172
RESIDUAL OUTPUT
Observation
Predicted Safeway
Residuals
1 -0.338864 0.629056
2 -1.041763 1.39121
3 1.896377 -1.222088
4 2.117057 -1.289389
5 0.713842 2.269415
6 0.830859 -1.676014
7 4.04158 15.86432
8 -2.921464 -1.174336
9 2.348794 -8.657737
10 2.673743 -2.445581
11 4.103821 4.961234
12 2.844512 21.56946
13 -2.467331 2.911578
14 4.570395 4.436869
15 -1.034869 4.699528
16 2.152561 0.001285
17 1.774415 -16.28559
18 3.388517 7.825525
19 1.213109 22.71438
20 4.528232 1.902636
21 0.889777 5.836373
22 0.603298 4.29231
23 -1.454065 2.840927
24 2.306092 1.63928
25 2.276136 -1.665448
26 1.133108 -15.45619
27 3.613031 -7.206978
28 -5.055841 -1.430008
29 -0.460818 1.053938
30 2.890421 -7.957989
31 3.853406 -6.270989
32 4.113435 0.364177
33 1.022114 4.938957
34 -0.23996 3.441466
35 9.531956 7.000597
36 -5.867432 -2.694441
37 -4.623114 -4.495427
38 -1.607948 -12.08565
39 -1.339567 -3.408059
40 -0.850104 2.423708
41 2.613248 0.69037
42 0.123401 8.290471
43 3.110418 2.345218
44 2.127073 -10.12487
45 5.875665 -7.503445
46 0.116445 0.264818
47 3.412065 4.842652
48 7.840559 5.377065
49 -3.762782 -4.72836
50 6.001613 -1.534478
51 -4.346202 -6.315144
52 -6.730461 0.527252
53 1.450759 -6.526902
54 5.360608 -5.157149
55 2.807193 8.203535
56 -3.010562 8.427229
57 1.757208 -6.680808
58 5.424368 -4.683205
59 -1.537978 14.77232
60 3.170121 0.929341
61 3.3023 -2.693781
62 6.548674 -13.58827
63 0.054243 0.96163
64 5.164606 -2.625544
65 8.669284 -10.83489
66 7.304546 2.255817
67 -9.145476 -4.477188
SP500 Line Fit Plot
30.000
20.000
Safeway
10.000 Safeway
0.000 Predicted Safeway
0 -10.000 00
0 0 0
.00 .00 0 .00 00
0 0 0 .
10 0.
-2 -1 -20.000 2
SP500
SUMMARY OUTPUT
Intel
Standard E 5.383967 0.000
-20.000 -10.000 0
Observatio 67 -10.000
-20.000
ANOVA S
df SS MS F Significance F
Regression 1 910.8068 910.8068 31.4211 4.559E-07
Residual 65 1884.162 28.98711
Total 66 2794.969
Coefficients
Standard Error t Stat P-value Lower 95%Upper 95%Lower 95.0%
Upper 95.0%
Intercept 0.570553 0.699624 0.815513 0.417757 -0.826694 1.967799 -0.826694 1.967799
SP500 0.87666 0.156394 5.605453 4.559E-07 0.564319 1.189 0.564319 1.189
RESIDUAL OUTPUT
Observation
Predicted IntelResiduals
1 0.107456 -2.542859
2 -0.607464 10.28173
3 2.380926 10.73624
4 2.60538 0.627789
5 1.178167 2.244335
6 1.297184 2.925858
7 4.562818 -2.683118
8 -2.519314 -2.968251
9 2.841081 6.058317
10 3.171586 -4.820635
11 4.626123 2.145886
12 3.345276 0.890018
13 -2.057413 -2.821727
14 5.100676 -8.766049
15 -0.600453 0.385306
16 2.641491 -0.307717
17 2.256878 7.400293
18 3.898585 0.697375
19 1.685972 -1.382021
20 5.057793 -3.042289
21 1.35711 4.035047
22 1.065732 -9.676981
23 -1.026818 -3.488391
24 2.797648 -11.5574
25 2.767179 -5.303105
26 1.604603 -5.15128
27 4.126939 -1.016388
28 -4.690194 -3.66882
29 -0.016584 1.028257
30 3.391971 1.207134
31 4.371425 -1.782699
32 4.635901 4.277241
33 1.49171 -4.147753
34 0.208052 2.240928
35 10.14709 4.81641
36 -5.515665 11.54109
37 -4.250065 -4.708163
38 -1.183333 1.943982
39 -0.910362 -0.637317
40 -0.412527 -1.593344
41 3.110057 11.59252
42 0.577627 -6.590285
43 3.61573 -2.710993
44 2.615568 -0.606881
45 6.42827 -7.021902
46 0.570553 5.801434
47 3.922536 0.513915
48 8.426769 0.237726
49 -3.37502 -10.1948
50 6.556372 -0.652973
51 -3.968418 -5.235697
52 -6.393454 0.820856
53 1.927687 0.534335
54 5.904404 2.684902
55 3.307319 3.367438
56 -2.609935 -2.294854
57 2.239377 4.014455
58 5.969255 -4.72779
59 -1.112166 -1.251471
60 3.676454 -7.354213
61 3.810894 2.520577
62 7.112789 9.2049
63 0.507286 4.735875
64 5.70505 -5.247035
65 9.269667 -4.217542
66 7.881589 10.09381
67 -8.849772 8.566753
SP500 Line Fit Plot
20.000
10.000
Intel
Intel