Note: Because the stock market data is continuous and related to

advertisement
Note: Because the stock market data is continuous and related to each other, a “Residual Analysis” is
meaningful here since we are dealing with a “Time Series”.
Question 1:
In order to reach the frequency distribution table and the histogram, we ordered “Megastat” to do a
regression analysis of Nortel and TSE and give us the output residuals. The result was “Table 1”. Then we
ordered “Megastat” to do a descriptive statistics and quantitative frequency distribution of the
“Residual” column; the results were “Table 2”, “Table 3” and the “Histogram”.
Table 1:
Observation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
TSE
0.09339
0.04638
0.07249
-0.00505
-0.00642
0.01844
0.07903
-0.00760
-0.01999
-0.22523
-0.01056
0.06536
-0.03114
0.05043
0.03814
0.00913
-0.02405
0.06329
-0.01719
-0.02266
0.00314
0.03576
-0.02662
0.03351
0.06972
-0.01117
0.00650
0.01525
0.02632
0.01873
0.05769
0.01255
-0.01282
-0.00412
0.00895
Predicted
0.08488
0.00554
-0.01378
0.00988
-0.00831
0.02257
0.00925
0.02125
-0.01801
-0.07328
-0.04505
0.03738
0.01580
0.02275
-0.01344
-0.02261
-0.01015
0.02363
-0.00982
-0.01208
0.01498
-0.01010
-0.03081
0.00357
-0.02462
0.00222
-0.01518
0.05707
0.00411
0.00760
0.03933
0.03536
-0.01094
0.01917
-0.01184
Residual
0.00850
0.04084
0.08626
-0.01493
0.00189
-0.00413
0.06978
-0.02885
-0.00198
-0.15195
0.03448
0.02798
-0.04694
0.02768
0.05158
0.03173
-0.01390
0.03966
-0.00736
-0.01058
-0.01185
0.04586
0.00419
0.02994
0.09434
-0.01339
0.02169
-0.04182
0.02221
0.01113
0.01836
-0.02281
-0.00188
-0.02329
0.02079
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
0.01099
-0.06530
-0.00257
-0.00855
-0.08061
0.07579
-0.00608
0.00678
-0.05715
-0.05203
-0.02259
0.02615
0.03894
0.00669
0.06107
0.01394
-0.00537
0.02684
-0.01784
0.02291
-0.00348
-0.03311
0.03911
-0.01654
0.02369
0.01819
0.01298
0.01251
-0.00069
-0.01553
0.06408
-0.00199
-0.01113
-0.04154
-0.00659
0.04728
-0.00738
0.03037
-0.00153
0.01757
0.02418
0.03882
0.02288
-0.01075
0.03496
-0.00043
-0.00696
0.01864
0.02051
0.01646
-0.00720
-0.07828
-0.01508
-0.00786
-0.06508
0.01171
-0.00409
0.01791
-0.01562
-0.04543
-0.06987
0.03353
0.00856
0.00821
0.04350
-0.01024
-0.04420
0.00397
-0.00710
-0.01205
-0.00306
-0.02615
0.02047
-0.03705
0.00723
Table 2:
cumulative
Residual
lower
-0.16000
-0.14000
-0.12000
-0.10000
-0.08000
-0.06000
-0.04000
-0.02000
0.00000
0.02000
0.04000
0.06000
0.08000
upper
<
<
<
<
<
<
<
<
<
<
<
<
<
-0.14000
-0.12000
-0.10000
-0.08000
-0.06000
-0.04000
-0.02000
-0.00000
0.02000
0.04000
0.06000
0.08000
0.10000
midpoint
-0.15000
-0.13000
-0.11000
-0.09000
-0.07000
-0.05000
-0.03000
-0.01000
0.01000
0.03000
0.05000
0.07000
0.09000
width
0.02000
0.02000
0.02000
0.02000
0.02000
0.02000
0.02000
0.02000
0.02000
0.02000
0.02000
0.02000
0.02000
frequency
1
0
0
0
3
4
5
18
11
11
4
1
2
60
percent
1.7
0.0
0.0
0.0
5.0
6.7
8.3
30.0
18.3
18.3
6.7
1.7
3.3
100.0
frequency
1
1
1
1
4
8
13
31
42
53
57
58
60
percent
1.7
1.7
1.7
1.7
6.7
13.3
21.7
51.7
70.0
88.3
95.0
96.7
100.0
Table 3:
count
mean
sample variance
sample standard deviation
Residual
60
-0.0000000
0.0015593
0.0394881
Histogram:
Histogram
35
30
Percent
25
20
15
10
5
0
Residual
Now we can clearly see that the residuals are normally distributed with a mean equal to zero.
Question 2:
Thanks to “Table 3” of “Question 1” we can see that the Standard deviation of errors is constant
throughout the residuals.
To obtain a plot residual Vs predicted Y &X respectively we order “Megastat” to conduct a regression
analysis of Nortel and TSE, choosing the “Plot residual by Predicted Y &X” option. This will give us 2
charts: “Chart 1” and “Chart 2”.
Chart 1:
Residuals by Predicted
Residual (gridlines = std. error)
0.11948
0.07965
0.03983
0.00000
-0.03983
-0.07965
-0.11948
-0.15931
-0.19914
-0.1
-0.05
0
Predicted
0.05
0.1
Chart 2:
Residuals by Nortel
Residual (gridlines = std. error)
0.11948
0.07965
0.03983
0.00000
-0.03983
-0.07965
-0.11948
-0.15931
-0.19914
-0.3000 -0.2000 -0.1000 0.0000 0.1000 0.2000 0.3000
Nortel
In both charts we did not see any explosion in data, this concur with the fact that standard deviation of
the errors is constant. A case of “Homoscedasticity” is observed in “Chart 1 &2”.
Question 3:
The “Durbin-Watson” is a test tool in regression analysis that allows us to detect autocorrelation in
residuals. In order to obtain a “Durbin-Watson” test result all we have to do is choose regression
analysis from “Megastat” then check the “Durbin-Watson” box. “Megastat” will give us the result.
Durbin-Watson= 2.08
In general d= 2 indicates no autocorrelation between residuals, d > 2 negative serial correlation, d < 2
positive serial correlation. In our case we detected a very weak presence of autocorrelation in residuals,
it does not warrant any doubt about the sample being studied.
Question 4:
We can calculate “studentized deleted residual” by using “Megastat”, we order it to do a regression
analysis of Nortel and TSE, and we check the box named “Diagnostics and Influential Residuals”. That
will give us “Table 4”, please not that this option also gives “Leverage”.
The studentized deleted residual is the residual that would be obtained if the regression was re-run
omitting that observation from the analysis. This is useful because some points are so influential that
when they are included in the analysis they can pull the regression line close to that observation making
it appear as though it is not an outlier.
Table 4:
Observation
1
2
3
4
5
6
7
8
9
10
11
TSE
0.09339
0.04638
0.07249
-0.00505
-0.00642
0.01844
0.07903
-0.00760
-0.01999
-0.22523
-0.01056
Predicted
0.08488
0.00554
-0.01378
0.00988
-0.00831
0.02257
0.00925
0.02125
-0.01801
-0.07328
-0.04505
Residual
0.00850
0.04084
0.08626
-0.01493
0.00189
-0.00413
0.06978
-0.02885
-0.00198
-0.15195
0.03448
Leverage
0.163
0.017
0.026
0.017
0.022
0.023
0.017
0.022
0.031
0.167
0.080
Studentized
Residual
0.233
1.034
2.195
-0.378
0.048
-0.105
1.767
-0.732
-0.050
-4.181
0.902
Studentized
Deleted
Residual
0.232
1.035
2.272
-0.375
0.048
-0.104
1.801
-0.730
-0.050
-4.959
0.901
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
0.06536
-0.03114
0.05043
0.03814
0.00913
-0.02405
0.06329
-0.01719
-0.02266
0.00314
0.03576
-0.02662
0.03351
0.06972
-0.01117
0.00650
0.01525
0.02632
0.01873
0.05769
0.01255
-0.01282
-0.00412
0.00895
0.01099
-0.06530
-0.00257
-0.00855
-0.08061
0.07579
-0.00608
0.00678
-0.05715
-0.05203
-0.02259
0.02615
0.03894
0.00669
0.06107
0.01394
-0.00537
0.02684
-0.01784
0.02291
-0.00348
-0.03311
0.03911
-0.01654
0.02369
0.03738
0.01580
0.02275
-0.01344
-0.02261
-0.01015
0.02363
-0.00982
-0.01208
0.01498
-0.01010
-0.03081
0.00357
-0.02462
0.00222
-0.01518
0.05707
0.00411
0.00760
0.03933
0.03536
-0.01094
0.01917
-0.01184
0.01819
0.01298
0.01251
-0.00069
-0.01553
0.06408
-0.00199
-0.01113
-0.04154
-0.00659
0.04728
-0.00738
0.03037
-0.00153
0.01757
0.02418
0.03882
0.02288
-0.01075
0.03496
-0.00043
-0.00696
0.01864
0.02051
0.01646
0.02798
-0.04694
0.02768
0.05158
0.03173
-0.01390
0.03966
-0.00736
-0.01058
-0.01185
0.04586
0.00419
0.02994
0.09434
-0.01339
0.02169
-0.04182
0.02221
0.01113
0.01836
-0.02281
-0.00188
-0.02329
0.02079
-0.00720
-0.07828
-0.01508
-0.00786
-0.06508
0.01171
-0.00409
0.01791
-0.01562
-0.04543
-0.06987
0.03353
0.00856
0.00821
0.04350
-0.01024
-0.04420
0.00397
-0.00710
-0.01205
-0.00306
-0.02615
0.02047
-0.03705
0.00723
0.040
0.019
0.023
0.026
0.037
0.023
0.024
0.023
0.025
0.018
0.023
0.050
0.017
0.039
0.017
0.028
0.078
0.017
0.017
0.043
0.037
0.024
0.021
0.025
0.020
0.018
0.018
0.018
0.028
0.096
0.018
0.024
0.071
0.021
0.056
0.021
0.030
0.018
0.020
0.024
0.042
0.023
0.024
0.036
0.018
0.021
0.020
0.021
0.019
0.717
-1.190
0.703
1.312
0.812
-0.353
1.008
-0.187
-0.269
-0.300
1.165
0.108
0.758
2.417
-0.339
0.552
-1.093
0.562
0.282
0.471
-0.583
-0.048
-0.591
0.529
-0.183
-1.983
-0.382
-0.199
-1.658
0.309
-0.104
0.455
-0.407
-1.153
-1.806
0.851
0.218
0.208
1.103
-0.260
-1.134
0.101
-0.180
-0.308
-0.077
-0.664
0.519
-0.940
0.183
0.714
-1.194
0.700
1.321
0.809
-0.350
1.008
-0.185
-0.267
-0.298
1.169
0.107
0.755
2.527
-0.336
0.549
-1.095
0.559
0.280
0.468
-0.580
-0.047
-0.587
0.525
-0.181
-2.036
-0.379
-0.197
-1.684
0.307
-0.103
0.452
-0.404
-1.156
-1.843
0.849
0.217
0.206
1.105
-0.258
-1.137
0.100
-0.179
-0.306
-0.077
-0.660
0.516
-0.939
0.182
Any observation that has absolute value of standard residual l standard residual l > 2 is suspected to be
an outlier which will distort the regression line.
The following observations are most probably outliers for fulfilling “l standard residual l > 2” criteria: 3,
10, 25 and 37.
Question 5:
Download