MA319-7-RT Resit Test Paper
MA319-7-RT Resit Test Paper
STOCHASTIC PROCESSES
Time allowed: You have been given a total of 1 ½ hours to complete this paper and scan and
upload your answers.
We expect this paper will take you no longer than 1 hour to complete and you have
been given an additional 30 minutes to allow for downloading the test paper and
scanning and uploading your answers.
If you are normally allowed additional time your deadline has been adjusted accordingly.
The deadline times are shown in British Summer Time (BST). Please check online for a conversion to your
local time if you will be undertaking your assessment outside the United Kingdom
Number of questions: 3
Contacts
If you believe there is an error in this paper or you experience any other difficulties please email
maths@essex.ac.uk.
▪ Type your registration number clearly at the top of the first page. Do not add your name as these will be
marked anonymously.
▪ Number your answers clearly
▪ Save your document as your registration number.
▪ We recommend you check your submission after you have uploaded to ensure you have uploaded the correct
document, and retain your email receipt from FASER.
▪ We do not anticipate any problems with FASER but if you do experience any difficulties uploading your
answers, you can email them to maths@essex.ac.uk with [MA319 test] in the subject. You will still need to
upload to FASER but you can do this when you can access the system. This is just a back-up, please do not
email your answers if you are able to submit to FASER.
▪ Only your latest submission (within the deadline) will be marked.
Extenuating circumstances
We know that students are working under different conditions at the moment. If you encounter any difficulties with
your test that you believe has affected your performance you can inform the Exam Board of this by submitting an
Extenuating Circumstances form https://www1.essex.ac.uk/students/exams-and-coursework/ext-circ.aspx
Academic Offences
You are reminded that copying from textbooks, articles or any online or offline sources is plagiarism, which is an
academic offence. Your work must be entirely your own and collaborating with other students is collusion, which is
also an academic offence. Any student suspected of committing an academic offence will be interviewed in person
to determine whether the work they have submitted is entirely their own. More information about academic
offences can be found at https://www.essex.ac.uk/student/exams-and-coursework/about-academic-offences
1
MA319 Stochastic Process Test Resit 20/21 - PG
Before you start the questions, ensure you have included the following commands in
RStudio:
library(markovchain)
library(diagram)
where Xt are independently and identically distributed (i.i.d.) random variables with probability
mass function (
0.3, if x = +1,
P (Xt = x) = for all, t = 1, 2, 3 . . .
0.7, if x = −1
(a) Given that S0 = 10, generate 20 values for this random walk process Sn . [5 marks]
(b) Plot the values from part (a), ensuring you label the axes. [5 marks]
Total [10 marks]
(a) By creating a function in ‘R’, generate a random sequence of m = 150 consecutive observa-
tions from the following moving average (MA) series of order 1
yt = et + 0.4et−1 ; t = 2, 3, . . . , m, m + 1
where: et ∼ N (0; 1.52 ) are independently and identically distributed Normal random vari-
ables. You may use the code provided in the lecture notes.
[10 marks]
(b) Plot the as a time series the observations generated in (a), giving it a title with appropriate
meanings. The horizontal axis of your plot should be time.
[5 marks]
(c) By editing the code in part (a), write a function which will generate a random sequence of
observations that follows a MA series of order 2. Use the code to generate a random sequence
of m = 150 consecutive observations from the following moving average (MA) series of order
2
yt = et + 0.4et−1 − 0.5et−2 ; t = 3, . . . , m, m + 1, m + 2
where: et ∼ N (0; 1.52 ) are independently and identically distributed Normal random vari-
ables.
Plot the time series of the observations generated. [15 marks]
(d) Explain, referencing functions in ‘R’, how you would check for a linear trend in time series
data and how you would subsequently attempt to remove such a trend. Give an example of
a process which you would expect to have a linear trend.
[5 marks]
Total: [35 marks]
2
Question 3: Discrete-time Markov Chain
(a) Determine the transition matrix for this diagram and save it as P in ‘R’, ensuring that you
correctly label the states. [10 marks]
(b) Find and classify all the classes for P . Is the process irreducible? By using the diagram in
(a) or otherwise, determine and justify the periods for all states. [10 marks]
(c) Given that the chain is currently in state A, how long would we expect until the chain reached
a recurrent class? Without any calculations or using any code, state and explain the mean
recurrence time for state D. [5 marks]
(d) Given that the initial distribution of states is
Find and state the distributions of: (i) X10 , (ii) X50 , (iii) X100 , that is the 10, 50 and 100
step distributions.
Plot these as separate bargraphs.
Based only on these bargraphs, do you think a single steady state distribution, π, exists?
Why? Give this steady state distribution. [15 marks]
(e) Download the data file “Test Q3e.txt” from Moodle in the ‘Materials for Test (Postgraduate)’
section. The data is thought to have come from the transition matrix, P , as described in (a).
By determining the best fitting transition matrix for the data, comment whether you think
the data is likely to have come from the transition matrix P . [15 marks]