Sunteți pe pagina 1din 33

FINAL EXAM MA321 FIT M.

KUDINOV
YOUR NAME________________________________________________________
Answer the questions in spaces provided in this firle and submit it here.

Pr1. Time Series.


The data in the table below represent the annual revenues(in billion of dollars)
of McDonald's Corporation over the 31-year period from 1975 t0 2005.
X
Year
Coded Yr
X^2
1975
0
0
1976
1
1
1977
2
4
1978
3
9
1979
4
16
1980
5
25
1981
6
36
1982
7
49
1983
8
64
1984
9
81
1985
10
100
1986
11
121
1987
12
144
1988
13
169
1989
14
196
1990
15
225
1991
16
256
1992
17
289
1993
18
324
1994
19
361
1995
20
400
1996
21
441
1997
22
484
1998
23
529
1999
24
576
2000
25
625
2001
26
676
2002
27
729
2003
28
784
2004
29
841
2005
30
900

a) Calculate a three-year moving average to the data (add a column to the table)
(COLUMN ADDED ABOVE)

Y
Revenues
1
1.2
1.4
1.7
1.9
2.2
2.5
2.8
3.1
3.4
3.8
4.2
4.9
5.6
6.1
6.8
6.7
7.1
7.4
8.3
9.8
10.7
11.4
12.4
13.3
14.2
14.9
15.4
17.1
19
20.5

MA (3)
#NA
1.2
###
###
###
2.2
2.5
2.8
3.1
3.4333333
3.8
4.3
4.9
5.5333333
6.1666667
6.5333333
6.8666667
7.0666667
7.6
8.5
9.6
10.633333
11.5
12.366667
13.3
14.133333
14.833333
15.8
17.166667
18.866667
#NA

b) Using a smoothing coefficient of W = 0.75, exponentially smooth the series


(add a column to the table, use data analysis to smooth)
(COLUMN ADDED ABOVE)
c) Plot the results from a) and b) with the time series.

25
20
15
10
5
0
0

10

15

20

25

30

d) Compute a quadratic trend forecasting equation and plot the predicted result with the data against the coded years.
SUMMARY OUTPUT
Regression Statistics
Multiple R
R Square
Adjusted R Square
Standard Error
Observations

0.9976276133
0.9952608549
0.9949223445
0.4064369376
31

ANOVA
df
Regression
Residual
Total

Intercept
Coded Yr
X^2

2
28
30

SS
MS
F
971.3623943776 485.681197189 2940.1193
4.6253475579 0.1651909842
975.9877419355

Coefficients
1.3856304985
0.0425920214
0.018830266

Standard Error
t Stat
P-value
0.2055884436 6.7398267843 2.56E-007
0.0317212616 1.3426963268 0.1901549
0.001021779 18.4289021152 3.43E-017

Y = 1.39 + 0.043X + 0.019X^2

Quadratic Forecasting Model

35

e) Compute an exponential trend forcasting equation and plot the predicted results with the data against the coded years.
SUMMARY OUTPUT
Regression Statistics
Multiple R
R Square
Adjusted R Square
Standard Error
Observations

0.9910289055
0.9821382915
0.9815223705
0.0516420709
31

ANOVA
df
1
29
30

SS
4.2526039876
0.0773402011
4.3299441887

MS
F
4.2526039876 1594.5849
0.0026669035

Coefficients
0.1305022061
0.0414096568

Standard Error
0.0181103869
0.0010369977

t Stat
P-value
7.2059314158 6.21E-008
39.932253679 6.66E-027

Regression
Residual
Total

Intercept
Coded Yr
b0 = 10^0.13

1.350523688
Y = 1.35*1.1^X

b1 = 10^ 0.041

1.1000429872

f) Compute a second -order autoregressive model, test for the significance of the second-order
autoregressive parameter.
SUMMARY OUTPUT
Regression Statistics
Multiple R
0.9985081297
R Square
0.9970184851
Adjusted R Square
0.9967891378
Standard Error
0.3178334053
Observations
29
ANOVA
df
Regression
Residual
Total

a0 Intercept
a1 X Variable 1
a2 X Variable 2

SS
MS
2 878.291461122 439.14573
26
2.626469912 0.1010181
28 880.917931034

Coefficients
Standard Error
t Stat
0.1096454518 0.1070603712 1.024146
1.3021046826 0.1907920925 6.8247309
-0.2490376304 0.2044353569 -1.218173

p = 2 Yi = 0.11+1.30Yi-1 - 0.249Yi-2
tscore = a2/Sa2 =

-1.2181729919

t critical : 29-2*2-1

2.064
t= - 1.218

critical value
-2.064
Since t score of the a2 - 1.218 is less than the critical value - 2.064 the initial assumption is
accepted. The third-order autoregressive parameter is not significantly large
and the contribution of its term to the model is not significant
g) Compute a first-order autoregressive model, test for the significance of the first-oder
autoregressive parameter, and plot the predicted results with the data against the coded years.
SUMMARY OUTPUT
Regression Statistics
Multiple R
0.9985040355
R Square
0.9970103088
Adjusted R Square
0.9969035342
Standard Error
0.3148924195
Observations
30
ANOVA
df
Regression
Residual
Total

SS
MS
1 925.882264063 925.88226
28 2.7764026039 0.0991572
29 928.658666667

Coefficients
Standard Error
t Stat
0.1348599686 0.0995939216 1.3540984
1.0701507079
0.011074631 96.630823

a0 Intercept
a1 X Variable 1
p=1 Yi = 0.135+1.07Yi-1
tscore = a1/Sa1 =

96.630822601

t critical : 30-2*1-1

2.052

critical value
-2.052

critical value
-2.052

Since t score of the a1 96.63 is more than the critical value 2.052 the initial assumption is
rejected. The first-order autoregressive parameter is significantly large
and the contribution of its term to the model is significant

Pr2 Simple Linear Regression.


The owner of a chain of ice cream store would like to study
the effect of atmosperic temperature on sales during the summer season.
A sample of 21 consecutive days is selected, with the results stored in the table below
X
Y
Temperature, in degrees Sales, in thousand of $ Yhat = -2.534 + 0.061X
63
1.52
1.2908772318
70
1.68
1.7159731358
73
1.8
1.8981570947
75
2.05
2.0196130673
80
2.36
2.3232529987
82
2.25
2.4447089713
85
2.68
2.6268929302
88
2.9
2.8090768891
90
3.14
2.9305328616
91
3.06
2.9912608479
92
3.24
3.0519888342
75
1.92
2.0196130673
98
3.4
3.416356752
100
3.28
3.5378127246
92
3.17
3.0519888342
87
2.83
2.7483489028
84
2.58
2.5661649439
88
2.86
2.8090768891
80
2.26
2.3232529987
82
2.14
2.4447089713
76
1.98
2.0803410536

a) Construct a scatter diagram


4

dS $

3.5
3

ei = Y - Yhat
0.2291227682
-0.0359731358
-0.0981570947
0.0303869327
0.0367470013
-0.1947089713
0.0531070698
0.0909231109
0.2094671384
0.0687391521
0.1880111658
-0.0996130673
-0.016356752
-0.2578127246
0.1180111658
0.0816510972
0.0138350561
0.0509231109
-0.0632529987
-0.3047089713
-0.1003410536

Sales in ThousandS $

3.5
3
2.5
2
1.5
1
0.5
0
60

65

70

75

80
85
90
Temperature in Degrees

95

100

b) Using Data Analysis/Regression, find the regression coefficients b0 and b1.


SUMMARY OUTPUT
Regression Statistics
Multiple R
0.9695343118
R Square
0.9399967817
Adjusted R Square
0.9368387176
Standard Error
0.1461075997
Observations
21
ANOVA
df
Regression
Residual
Total

b0 Intercept
b1 Temperature, in degrees
Yhat = -2.534 + 0.061X

1
19
20

SS
MS
6.3540559599 6.354056
0.4056011829 0.0213474
6.7596571429

Coefficients
Standard Error
t Stat
-2.5349859046 0.2952232662 -8.586674
0.0607279863 0.0035199474 17.252527

105

c) Graph the regression line on the scatter diagram


(GRAPHED IN SCATTER PLOT ABOVE)

d) Interpret the meaning of b0 and b1 in this problem.


b1 = 0.061
When the temperature outside increases by a degree the sales that day increase by 0.061 thousand dollars
b0 = -2.535
When the temperature outside is 0 degrees the sales for that day is -2.535 thousand dollars
(this statement doesn't make sense)

e) Predict the sales per store for a day in which the temperature is 83F.
Yhat = -2.534 + 0.061X
for X = 83

Yhat =

2.5054369576

f) determine the coefficient of determination and interpret its meaning.


R^2 = 93.99%
93.99% of the variation in daily sales is explained by the variability in temperature.
In other words, the daily sales of the shop is determined 93.99% by the temperature outside.
There must be other variables that influence sales, if all of them were included the percent would be 100%

g) Graph the residuals in this model and determine

ei = Y - Yhat

the adequacy of the model (linearity).


0.3
Linear model is appropriate to use for this
relationship because there is no pattern on the residual plot..0.2
0.1
0
-0.1

60

65

-0.2
-0.3
-0.4

h) At the 0.05 level of significance, is there evidence


of a linear relationship between sales and temperature?
(based on t-test or p-value)
t= b1/Sb1

t=

17.2525268385

70

75

80

85

90

alpha 0.025
21-2=19

t critical -= 2.093

t=17.25

0
critical value
-2.093

critical value
2.093

since t score of the slope 17.25 is greater then the critical value 2.093 the initial assumption is
rejected. The slope is significantly larger than zero. Relationship is strong. Linear model is approp

Pr3. Anova one factor


In order to test the strength of four brands of trash bags,
one-pound weights were placed into bags, one at a time
until the bag broke.
A total of 40 bags, 10 of each brand, were used. The data in the table below
gives the weight required to break the trash bag.
KROGER

Sample Mean X bar =

GLAD

HEFTY

34
30
40
38
36
30
30
42
36
38

32
42
34
36
32
40
36
43
30
38

33
34
32
40
40
34
36
34
32
34

35.4

36.3

34.9

TUFFSTUFF
26
18
20
15
20
20
17
18
19
20
19.3

a) Using Data analysis/Anova, test at the level of significance 0.05 for the evidence
of the differences in the mean strength of the four brands of trash bags .
SSW
KROGER

(x - xbar1)^2
34
30

GLAD
1.96
29.16

32
42

(x - xbar2)^2
18.49
32.49

40
38
36
30
30
42
36
38

21.16
6.76
0.36
29.16
29.16
43.56
0.36
6.76
168.4

Total

HEFTY

(x - xbar3)^2
33
34
32
40
40
34
36
34
32
34

3.61
0.81
8.41
26.01
26.01
0.81
1.21
0.81
8.41
0.81
76.9

Total
SSW =

34
36
32
40
36
43
30
38

5.29
0.09
18.49
13.69
0.09
44.89
39.69
2.89
176.1

TUFFSTUFF (x - xbar4)^2
26
44.89
18
1.69
20
0.49
15
18.49
20
0.49
20
0.49
17
5.29
18
1.69
19
0.09
20
0.49
74.1
495.5

SSA
xbar
1
2
3
4

35.4
36.3
34.9
19.3
31.475

X Doublebar

MSW = SSW/n-c

nj*(xbar-xdbar)^2
154.05625
232.80625
117.30625
1482.30625
1986.475

MSA = SSA/c-1

MSW =

13.7638888889

MSA =

662.1583333333

F = MSA / MSW

F=

48.1083753784

column c-1
row n-c

4-1=3
40-4=36

2.86

Fu = 2.86

0
Fu = 2.86

Since F calculated is more than Fu the MSA is significantly larger than M


That is the differences among group means are significant
(not random but due to the actual differences in quality ).
Anova: Single Factor
SUMMARY
Groups
KROGER
GLAD
HEFTY
TUFFSTUFF

Count

Sum
10
10
10
10

ANOVA
Source of Variation
Between Groups
Within Groups

SS

Total

354
363
349
193

df

Average
35.4
36.3
34.9
19.3

Variance
18.711111
19.566667
8.5444444
8.2333333

1986.475
495.5

MS
F
3 662.158333333 48.108375
36 13.7638888889

2481.975

39

b) If appropriate, determine which brands differ in mean strength


Use Tukey-Kramer procedure.
Absolute
Pair Difference
Pairs
12
13
14
23
24
34

column = c

Means X bar
1
35.4
0.9
0.5
16.1
1.4
17
15.6

2
36.3

3
34.9

rows = n-c
Qu studentized
critical range

40-4 = 36
3.81
4.469876816

16.1
17
15.6

0.9
0.5
1.4

differences
c.r.=4.47
Conclusion
There are several significant differences : between the fourth sample and all other samples (1,2,3). All other samples have
means which do not significantly differ one from another.

_____________

ES (0.75)
1
1.15
1.3375
1.609375
1.827344
2.106836
2.401709
2.700427
3.000107
3.300027
3.675007
4.068752
4.692188
5.373047
5.918262
6.579565
6.669891
6.992473
7.298118
8.04953
9.362382
10.3656
11.1414
12.08535
12.99634
13.89908
14.64977
15.21244
16.62811
18.40703
19.97676

R^2 = 99.49%
Quadratic
1.3856305
1.44705279
1.54613561
1.68287896
1.85728284
2.06934725
2.3190722
2.60645768
2.931503691
3.29421023
3.69457731
4.13260491
4.60829305
5.12164172
5.67265093
6.26132066
6.88765093
7.55164172
8.25329305
8.99260491
9.76957731
10.5842102
11.4365037
12.3264577
13.2540722
14.2193473
15.2222828
16.262879
17.3411356
18.4570528
19.6106305

log (Y)
0
0.079181
0.146128
0.230449
0.278754
0.342423
0.39794
0.447158
0.491362
0.531479
0.579784
0.623249
0.690196
0.748188
0.78533
0.832509
0.826075
0.851258
0.869232
0.919078
0.991226
1.029384
1.056905
1.093422
1.123852
1.152288
1.173186
1.187521
1.232996
1.278754
1.311754

R^2 = 98.15%
Exponential Lag 1
1.35052369
#N/A
1.48563411
1
1.63426139
1.2
1.79775778
1.4
1.97761084
1.7
2.17545693
1.9
2.39309614
2.2
2.63250863
2.5
2.89587266
2.8
3.18558441
3.1
3.50427979
3.4
3.8548584
3.8
4.24050995
4.2
4.66474324
4.9
5.13141809
5.6
5.64478048
6.1
6.20950118
6.8
6.83071823
6.7
7.51408369
7.1
8.26581506
7.4
9.0927519
8.3
10.002418
9.8
11.0030897
10.7
12.1038717
11.4
13.3147792
12.4
14.6468295
13.3
16.112142
14.2
17.7240489
14.9
19.4972156
15.4
21.4477753
17.1
23.5934749
19

Lag 2
#N/A
#N/A
1
1.2
1.4
1.7
1.9
2.2
2.5
2.8
3.1
3.4
3.8
4.2
4.9
5.6
6.1
6.8
6.7
7.1
7.4
8.3
9.8
10.7
11.4
12.4
13.3
14.2
14.9
15.4
17.1

Revenues
MA (3)
ES (0.75)

30

35

gainst the coded years.

25
20
15
10
Significance F
2.9E-033

5
0

Lower 95%
0.964502
-0.02239
0.016737

casting Model

Upper 95% Lower 95.0%Upper 95.0%


1.80675933 0.964502 1.80675933
0.10757008 -0.02239 0.10757008
0.02092329 0.016737 0.02092329

10

15

20

a against the coded years.

25
20
15
10

Significance F
6.7E-027

5
0
0

Lower 95% Upper 95% Lower 95.0%Upper 95.0%


0.093462 0.16754211 0.093462 0.16754211
0.039289 0.04353056 0.039289 0.04353056

Exponential Model

F
Significance F
4347.2 1.4712E-033

P-value
0.315201
3.0E-007
0.234098

Lower 95% Upper 95%Lower 95.0%Upper 95.0%


-0.11042029 0.329711 -0.11042029 0.329711
0.90992592 1.694283 0.90992592 1.694283
-0.66926052 0.171185 -0.66926052 0.171185

10

15

20

0
critical value
2.064

F
Significance F
9337.516 6.8212E-037

P-value Lower 95% Upper 95%Lower 95.0%Upper 95.0%


0.186534 -0.06914893 0.338869 -0.06914893 0.338869
6.8E-037 1.04746535 1.092836 1.04746535 1.092836

t = 96.63

critical value
2.052

critical value
2.052

100

105

F
Significance F
297.6497 4.5881E-013

P-value Lower 95% Upper 95%Lower 95.0%Upper 95.0%


5.8E-008 -3.1528953 -1.91708 -3.1528953 -1.91708
4.6E-013 0.05336065 0.068095 0.05336065 0.068095

usand dollars

ei = Y - Yhat

80

85

90

95

100

105

t=17.25

093 the initial assumption is


strong. Linear model is appropriate.

TUFFSTUFF
c=4
nj = 10
n = 40

(x - xbar2)^2

(x - xbar4)^2

F = 48.108

MSA is significantly larger than MSW


ans are significant
ences in quality ).

P-value
F crit
1.1E-012 2.86626555

4
19.3

2,3). All other samples have

Revenues
Quadratic

10

15

20

25

30

35

Revenues
Quadratic
Exponentia
l

15

20

25

30

35

S-ar putea să vă placă și