Monday, 1 May 2017

STA 411/STA 418: TIME SERIES ANALYSIS

Instructions
The assignment is to be undertaken in groups of a maximum of 6 individuals. Where applicable the analysis should be carried out using the R software

Q1
Explain the meaning of the following terms
a)      State-space models                                                                                      (3 marks)
b)     Kalman filter                                                                                                 (3 marks)
c)      ARCH models                                                                                              (2 marks)
d)     Stochastic volatility models                                                                       (2 marks)

Q2
Refer to the attached data.
a)      Make a plot the data and comment on it.
(10 marks)
b)     Perform trend estimation with yearly running means and show its plot
(5 marks)
c)      Obtain the monthly seasonal effect and display the associated plot
(5 marks)
d)     Compute the estimates of the error term and create its plot.
(5 marks)
e)      Draw the correlogram up to lag 100
(5 marks)
f)       Fit an MA(5) and use it to forecast sales for 2015, 2016 and 2017
(5 marks)
g)     Fit an AR(3) and use it to forecast sales for 2015, 2016 and 2017
(5 marks)
h)     Fit an ARMA(3,5) and use it to forecast sales for 2015, 2016 and 2017
(5 marks)

i)       Compare the adequacy of fit of the 3 models above.

STA 421: STATISTICAL COMPUTING

The task is to be undertaken in groups of a maximum of 6 individuals.  Copying will result in the final mark being divided by the number of similar copies

Q1
Consider the dataset format in the table below that depicts the final mark of students taking three common units; SAS 102, BAS 202 and SOC 222.  The students were drawn from BA (Community Development), BA (Criminology) and BA (Sociology). The age of the students were recorded. Further the students were asked the number of hours they studied in a week. Use R for this question giving the command used in each case.

Sno
Course
Age
SAS102
BAS202
SOC222
Sex
Study Hours
1







2







3








a)      Use R  to generate the data having 30 records as follows:
Course: A uniform random number between 1 and 3 with 1 representing Community Development, 2- Criminology and 3- Sociology
Age: A uniform random number between 18 and 28
SAS102: A normal random number with mean 62 and standard deviation 5.5
BAS202: A normal random number with mean 52 and standard deviation 8.6
SOC222: A normal random number with mean 57 and standard deviation 3.9
Sex: A uniform random number between 0 and 1 with 0 representing female and 1 representing male
Study Hours: A uniform random number between 3.2 and 18.6
Submit the generated dataset

b)     Present the appropriate summaries for the data
c)      Did male students perform better than their female counterparts in the three units?
d)     Compare the performance in the three units
e)      Are the mean marks of the three units the same for the courses the students were drawn from?
f)       Using the usual grade classification, determine whether the grades for the three units are independent of the course.
g)     Obtain the regression equation for the relationship between study hours and the final mark for the three units. Interpret your finding
 (30 marks)
Q2
Discuss the process of Monte–Carlo simulation
                                                                                                                                    (10 marks)
Q3
Generate 20 N(0,1) random numbers in Ms Excel using the Box-Muller Algorithm                                                                                                                                                (5 marks)
Q4
Explain the following methods of testing the randomness of a sequence of numbers and perform the test for the data generate in Q3 above
a)      Frequency Test                                                                                             (7 marks)
Run Test                                                                                                        (8 marks