首页 >
> 详细

Auckland University of Technology: STAT600 Probability – Assignment 3 Semester 2, 2019

STAT600 Probability

Semester 2, 2019

Assignment 3

Instructions

• Due date: Submit to Blackboard by Tuesday 15th October, 11pm

• This assignment is worth 15% of your final grade and will be marked out of 100 marks.

• Assignments should be submitted as a single PDF file.

• If you use additional data (other than that provided), submit the data as a csv file.

• Do not upload your submission as a zip file.

• Your submission should contain relevant explanations, mathematical notation, R code, and workings.

Answers which do not include appropriate notation and/or workings will be penalised.

• Where you need to include some R code, a copy of the code and output should be provided in the

PDF. Note, the code should not be included as an image or screenshot. Code submitted should

be in a fixed-width font such as Courier New. It is strongly recommended that you use the

R package knitr with Rmarkdown or LaTeX to incorporate both R code and maths symbols (see

example file on Blackboard). If you use Rmarkdown, submit a PDF file and the corresponding

.Rmd file.

• Your assignment file should include the Individual Assignment Coversheet:

Blackboard/ Assessment Policies, Regulations, Guides and Forms/ Forms and Coversheets/ Individual

Assignment Coversheet

• Late Assignments: Failure to submit the assignment on time will result in a penalty in accordance

with the policy outlined in the STAT600 Study Guide.

item Special Consideration: If extenuating circumstances (e.g. illness) prevent the timely submission

of your assignment you can apply for special consideration. You may also apply for special consideration

if such circumstances result in your submission being incomplete. Applications for special consideration

should be submitted via Blackboard.

• Originality: This assignment is an individual piece of work. You are encouraged to discuss the

assignment with your lecturers and classmates, however, the work you submit must be your own.

Assignments that show similarities to work submitted by other students will be investigated for

plagiarism and treated very seriously. Plagiarism software, such as TurnItIn, may be used to electronically

compare submissions to those of other students and to documents on the internet.

Question: 1 2 3 4 Total

Marks: 10 35 40 15 100

Score:

Page 1 of 3 V: 23rd September 2019

Auckland University of Technology: STAT600 Probability – Assignment 3 Semester 2, 2019

In this assignment you will investigate the application of Markov chains to one of the following areas.

• Stock market

– The daily percentage change in the Air NZ stock price can be classified e.g. ≥ −3%, (-3%, -1%],

etc.

– Data: STAT600_2019_AirNZ.csv

– Variable name: PercentChangeCat

• All Blacks results

– The results of All Blacks games can be classified based on weather they won, drew or lost, and

the points differential, e.g. “won by more than 14 points”, “won by 14 or fewer points”, etc.

– Data: STAT600_2019_rugby.csv

– Variable name: ResultType

• Weather

– The weather in Auckland can be classified by the predominant weather in a given hour, e.g.

"rain" or "cloudy" etc.

– Data: STAT600_2019_auckland_weather.csv

– Variable name: description

• A topic of your choice (5 marks (bonus))

– If you choose your own topic, it is recommended that you discuss your topic and data with

the lecturer.

– Data: You will need to source your own data.

Choose one of the topics listed above and answer the following questions.

1. Markov Chain Definition Total for Question 1: 10 marks

(a) For your chosen topic, specify the states of the Markov chain and provide a table showing the (5 marks)

number of times that each state occurs within the dataset.

Hint 1: Each of the datasets has a categorical variable matching the variable name and description

above. The states will be the unique values of this variable.

Hint 2: Commands such as unique(x) and table(x) may be useful.

(b) Estimate the transition matrix from the data provided. State the transition matrix. Ensure that (5 marks)

all entries are probabilities and that the rows of your transition matrix sum to 1.

Hint: Commands like tab <- table(1:10, 2:11), prop.table(tab) and rowSums(x) may

be useful.

2. Classification of the Markov Chain Total for Question 2: 35 marks

For each of the following questions, refer to the relevant definition and provide an example applying

this definition in the context of your Markov chain.

(a) Does this Markov chain have any absorbing states? Justify your answer. (5 marks)

(b) Is state i accessible from state j (for all i and j)? Justify your answer. (5 marks)

(c) Is this Markov chain irreducible? Justify your answer. (5 marks)

(d) Is this Markov chain ergodic? Justify your answer. (5 marks)

Page 2 of 3 V: 23rd September 2019

Auckland University of Technology: STAT600 Probability – Assignment 3

Question 2 continues . . .

Semester 2, 2019

(e) Use R to compute the steady state probabilities and write several sentences interpreting what (5 marks)

they mean in the context of your chosen scenario.

(f ) Compute the mean first passage times for a state i to return to itself, (for all i). (5 marks)

(g) What assumptions need to be made in order for this scenario to be modelled as a Markov chain? (5 marks)

Discuss whether or not these assumptions are reasonable for your scenario.

3. Simulation & Analysis Total for Question 3: 40 marks

Note: For this question you should write your own simulation code. Do not use an R package which

has an inbuilt simulation function (like the markovchain package).

• Write some R code to simulate this Markov chain and include your code in your assignment

file. Run your simulation for a large number of stages (e.g. at least 10000).

• Set the seed equal to your student ID number. For example, if your ID number is 12345678,

then at the start of your simulation use set.seed(12345678).

• Use the results of your simulation to answer the following questions.

(a) Compute the proportion of time that the Markov chain spends in each state. Compare this to (15 marks)

your answer in question 2e and write 1 - 2 sentences discussing what you observe.

(b) Construct a line graph showing how the proportion of time in each state converges to the steady (10 marks)

state probabilities over the first 1000 stages. Your graph should include appropriate axis labels,

axis limits, and legends.

Hint: If your Markov chain has 5 states, then your graph should have 5 lines.

(c) Using simulation, investigate the first passage times for each state i to itself. Compare your (5 marks)

result to the theoretical results in question 2f and write 1 - 2 sentences discussing what you

observe.

(d) Choose a state i with πi > 0.1. Repeat your simulation a large number of times. For each (10 marks)

simulation, begin the simulation in your chosen state, run each simulation for the length of

your original dataset (e.g., if your dataset has data for 500 days, then run the simulation for

500 days) and record the number of times that the Markov chain enters your chosen state.

Investigate (using summary statistics and graphs) the distribution of the number of times that

the Markov chain enters your chosen state. Compare this to the actual number of times that

this state was observed. Write several sentences discussing your findings in the context of your

selected scenario.

Hint: A histogram will be useful for exploring the distribution.

4. Improving the Model Total for Question 4: 15 marks

The Markov chain, with the states specified by the categorical variable in the CSV file provided, can

be used to analyse the scenario you have selected. However, as with any stochastic model, it is a

model and thus a simplification of reality. Using some of the other information provided in the csv

file (or from elsewhere), provide a new classification, so that your Markov Chain has at least 3 more

states than it did previously.

Hint: The R function cut is useful for splitting continuous variables into categorical ones.

(a) Define the states for your Markov chain and briefly explain why this new classification will (5 marks)

provide an improved model. Use R to compute the new states for your data. If you use additional

data, include the data as a CSV with your submission.

(b) Compute the transition matrix for your new Markov chain. (5 marks)

(c) Does steady state exist for this Markov chain? Justify your answer. If so, compute the steady (5 marks)

state probabilities. If not, demonstrate that the steady state probabilities do not converge.

Page 3 of 3 V: 23rd September 2019

联系我们

- QQ：99515681
- 邮箱：99515681@qq.com
- 工作时间：8:00-23:00
- 微信：codinghelp

- 95-712留学生作业代做、代写java编程设计作业、代做polymorph 2019-10-18
- 代做ols留学生作业、代写r程序语言作业、代做r编程设计作业、代写linea 2019-10-18
- Sdgb 7844作业代做、R编程设计作业代做、代写markdown留学生作 2019-10-18
- 代写math4/68091作业、代做statistical Computin 2019-10-18
- Analytics留学生作业代做、代写data Visualisation作 2019-10-18
- 代写frt留学生作业、代写r语言作业、代做datasets课程作业、R编程设 2019-10-18
- 代做sta 442课程作业、代写effects Models作业、Pytho 2019-10-17
- Se 3316A作业代做、代写web Technologies作业、Java 2019-10-17
- 代写csi213留学生作业、代做data Structures作业、代写ja 2019-10-17
- Cse 325作业代写、C/C++编程设计作业调试、Program留学生作业 2019-10-17
- 代做fit2014留学生作业、代做c++课程设计作业、Information 2019-10-17
- Scm 460课程作业代做、代写r编程设计作业、代做r实验作业、代写data 2019-10-17
- 代写rad留学生作业、代做r, Matlab/C++编程语言作业、代写r课程 2019-10-17
- Comp5338作业代写、Sql程序语言作业调试、代写schema Desi 2019-10-17
- 代做159.20留学生作业、代写rle课程作业、Java编程设计作业调试、P 2019-10-17
- 代做gu4206/Gr5206作业、代写r程序语言作业、代写data留学生作 2019-10-16
- Fit2104留学生作业代做、代写sql语言作业、Sql编程语言作业调试、代 2019-10-16
- 代写glfrustum课程作业、代做python程序语言作业、代写java， 2019-10-15
- 代写software留学生作业、代做information Technolo 2019-10-15
- 31927留学生作业代做、Net Applications作业代写、C++程 2019-10-15