IT100 Session 8: Trends and seasonal effects
5 Sept 2017
Uses mathematical models:
Assumes that the content does not change
\[ b = \bar y - m \bar x \] \[ m = { \sum_{i=1}^n (x_i -\bar x)(y_i - \bar y)\over \sum_{i=1}^n (x_i -\bar x)^2 } \]
Use the Down Jones Industrial Average
\[ \begin{array}{lrrrrr} Year & Qtr1 & Qtr2 & Qtr3 & Qtr4 & Total\\ 1972 & 317.0 & 230.5 & 152.1 & 336.2 & 1035.8\\ 1973 & 371.4 & 240.1 & 158.5 & 355.4 & 1125.4\\ 1974 & 449.9 & 286.6 & 179.3 & 403.4 & 1319.2\\ 1975 & 491.5 & 321.8 & 177.7 & 409.8 & 1400.8\\ 1976 & 593.9 & 329.8 & 176.1 & 483.5 & 1583.3\\ 1977 & 584.3 & 395.4 & 187.3 & 485.1 & 1652.1\\ 1978 & 669.2 & 421.0 & 216.1 & 509.1 & 1815.4\\ 1979 & 827.7 & 467.5 & 209.7 & 542.7 & 2047.6\\ 1980 & 840.5 & 414.6 & 217.7 & 670.8 & 2143.6\\ 1981 & 848.5 & 437.0 & 209.7 & 701.2 & 2196.4\\ 1982 & 925.3 & 443.4 & 214.5 & 683.6 & 2266.8\\ 1983 & 917.3 & 515.5 & 224.1 & 694.8 & 2351.7\\ 1984 & 989.4 & 477.1 & 233.7 & 730.0 & 2430.2\\ 1985 & 1087.0 & 534.7 & 281.8 & 787.6& 2691.1\\ 1986 & 1163.9 & 613.1 & 347.4 & 782.8& 2907.2\\ \end{array} \]
\[ \begin{array}{lrrrr} Yr & Q1 & Q2 & Q3 & Q4\\ 1972 & 0.306043638 & 0.222533308 & 0.146843020 & 0.324580035\\ 1973 & 0.330015994 & 0.213346366 & 0.140838813 & 0.315798827\\ 1974 & 0.341040024 & 0.217252881 & 0.135915706 & 0.305791389\\ 1975 & 0.350870931 & 0.229725871 & 0.126856082 & 0.292547116\\ 1976 & 0.375102634 & 0.208299122 & 0.111223394 & 0.305374850\\ 1977 & 0.353671085 & 0.239331760 & 0.113370861 & 0.293626294\\ 1978 & 0.368623995 & 0.231904814 & 0.119037127 & 0.280434064\\ 1979 & 0.404229342 & 0.228316077 & 0.102412581 & 0.265042000\\ 1980 & 0.392097406 & 0.193412950 & 0.101558127 & 0.312931517\\ 1981 & 0.386313968 & 0.198961938 & 0.095474413 & 0.319249681\\ 1982 & 0.408196577 & 0.195606141 & 0.094626787 & 0.301570496\\ 1983 & 0.390058256 & 0.219203130 & 0.095292767 & 0.295445848\\ 1984 & 0.407126985 & 0.196321290 & 0.096164925 & 0.300386799\\ 1985 & 0.403924046 & 0.198691985 & 0.104715544 & 0.292668426\\ 1986 & 0.400350853 & 0.210890204 & 0.119496423 & 0.269262521\\ Mean & 0.374511049 & 0.213586522 & 0.113588438 & 0.298313991\\ \end{array} \]
Correlation coefficent
\( \large R^2 \)
Analysis of Variance
\[ \huge MAD = \sum_{i=1}^n {|obs_i - est_i| \over n} \]
Year | Obs | Predict | Abs Dev |
---|---|---|---|
1972 | 1035.8 | 1048.109 | 12.309167 |
1973 | 1125.4 | 1174.252 | 48.851667 |
1974 | 1319.2 | 1300.394 | 18.805833 |
1975 | 1400.8 | 1426.537 | 25.736667 |
1976 | 1583.3 | 1552.679 | 30.620833 |
1977 | 1652.1 | 1678.822 | 26.721667 |
1978 | 1815.4 | 1804.964 | 10.435833 |
1979 | 2047.6 | 1931.107 | 116.493333 |
1980 | 2143.6 | 2057.249 | 86.350833 |
1981 | 2196.4 | 2183.392 | 13.008333 |
1982 | 2266.8 | 2309.534 | 42.734167 |
1983 | 2351.7 | 2435.677 | 83.976667 |
1984 | 2430.2 | 2561.819 | 131.619167 |
1985 | 2691.1 | 2687.962 | 3.138333 |
1986 | 2907.2 | 2814.104 | 93.095833 |
Model | \( \large R^2 \) | \( MAD \) |
---|---|---|
Linear Model: | 0.9855 | 5.106 |
Exponental Model: | 0.9899 | 5.074 |
Use the Air Passenger Data