Write a code to simulate the Markov chain

Assignment Help Basic Statistics
Reference no: EM131893307

Questions -

Q1. Solve each part here; note these are four separate questions unrelated to each other.

(a) Show that the average of the Ri's determined over an entire cycle of a full period linear congruential generator (LCG) (mod m) is

U¯ = ½ - 1/2m.

(b) Use moment-generating functions (mgf) to show that any linear transformation Y = cX + d of any uniform r.v. X ∼ U(a, b) is itself uniform. (Note: To receive any credit you must first derive the mgf of Y , MY (t), from the mgf of X, MX(t), then explain how you know that MY (t) is the mgf of a uniform r.v. with appropriate parameters (in terms of a, b, c, and d). No credit will be given if you first state that Y is uniform (from its definition) and then determine its mgf.)

(c) Consider a set of independent and identically distributed (i.i.d.) r.v.'s U1, U2, U3, . . . s.t. U1 ∼ U(0, 1). For all k let Sk = i=1k Ui, and define Yk = Sk -⌊Sk⌋,

where ⌊x⌋ is the greatest integer less than or equal to x (notice this defines Yk as the fractional part of Sk). Show that Yk ∼ U(0, 1).

(d) A loaded six-sided die is rolled for which Pr{i appears} = ci for some c ∈ R (for i = 1, 2, . . . , 6). If i appears then a fair coin is flipped i times. Given that at least one H has appeared, what is the probability that a "2" was rolled?

Q2. In this problem you will write code to simulate the Markov chain from the up-down stock problem we have been discussing in lecture (i.e., your code will yield the stock being up or down each day for a set of N days). Note: You may use any programming language among R, Matlab, or VBA. (Note: You must email me your code as I will be running it myself to check its validity in solving this problem.)

(a) Let pup represent the probability the stock is up on Day 0. For now let pup = 0.5. Use random number generation (RNG) to determine whether or not the stock is actually up on Day 0.

(b) Recall that if the stock is up today then the stock will be up tomorrow with probability 0.8, if it is down today then it will be down tomorrow with probability 0.6. Use RNG to determine whether or not the stock is up on Day 1. Define a variable "StockUp" that keeps track of whether or not the stock is up (StockUp = 1 if up, StockUp = 0 if down) during the current day. Additionally, define a variable "NumUp" to keep track of how many days (starting with Day 1) the stock is up over the length of your model.

(c) Now, define a loop and use RNG to determine if the stock is up on each of Day 2, Day 3, . . . , Day N, for N ∈ {5, 10, 25, 100, 1000, 10000, 100000}, being sure to update "StockUp" and "NumUp" appropriately. Notice that the fraction of days (over your entire model) for which the stock was up is

pˆ ≡ NumUp/N.

Recall the steady-state probability for the stock being up was determined to be πup = 2/3. Comment on any patterns you see in the value of ˆp in terms of N, specifically in relation to πup.

(d) Finally, rerun your code for the same set of values of N, but now varying the value of Day 0 probability pup (pick several values between (and including) 0 and 1). Does the value of pup affect pˆ for all N? Does it have a more significant effect for particular N? And are there N for which varying pup appears to have no effect on pˆ? Is this as expected? Discuss.

Reference no: EM131893307

Questions Cloud

Whether acquisition creates value for the acquiring company : The topic of whether an acquisition creates value for the acquiring company focuses on evaluating which of the following:
Summarize the characteristics of critical thinking and logic : Throughout this course you have been learning about the importance of critical thinking and logical thought. Reflect on the course readings and discussions.
Identify areas of evaluation in communicating effectively : Identify three (3) areas of evaluation you consider to be most important in communicating effectively and preventing misunderstandings through revision within.
What are the most important ethical principles : What are the three most important ethical principles that you feel organizations should adhere to in terms of their staffing philosophies.
Write a code to simulate the Markov chain : In this problem you will write code to simulate the Markov chain from the up-down stock problem we have been discussing in lecture
Define criteria for successful business process management : What are three criteria for successful business process management? How can each process be integrated successfully in the business?
Explain the codes of conduct : Thinking of all the accounting ethical theories, codes of conduct, professional, and personal experience, I would like you to draft a 3 paragraph personal.
Future value of multiple annuities-value of retirement plan : Future value of multiple annuities. Given an 8 percent interest rate. What is the value of your retirement plan after the 40 years?
Developing a work breakdown structure : Think of a somewhat complicated endeavor you are familiar with and develop a work breakdown structure WBS for it.

Reviews

len1893307

3/8/2018 11:26:55 PM

Please see the Statistics assignment attached. Please provide us the confirmation if you can solve this. Note: You may use any programming language among R, Matlab, or VBA. (Note: You must email me your code as I will be running it myself to check its validity in solving this problem.)

Write a Review

Basic Statistics Questions & Answers

  Calculate the chi-square statistic

Construct a table of observed counts going to bed after midnight or not, along with a table of counts expected if overall proportions were the same in the two

  Draw curves representing distribution of original population

Sketch curves representing the distribution of the original population and the sampling distribution of x for a sample of size n+16.

  Find probability that total weight of eight people exceeds

What is the probability that the total weight of eight people exceeds 1300 pounds? 1500 pounds? (Assume that the probability distribution is approximately normal).

  Procedure for testing hypothesis

When using the six step procedure for testing hypothesis, what type of conclusion is identified when you reach the "interpret the test/result" step? Is this the method that can be used to present the results in which the test statistic disagrees ..

  Determining hypotheses

State the appropriate null hypothesis H0 and alternative hypothesis Hain each of the following cases. (a) A 2002 study reported that 70% of students owned a cell phone. You plan to take an SRS of students to see if the percent has increased.

  The relaxation algorithm applied to a minimum cost flow

(Dealing with Infeasibility) Consider the -relaxation algorithm applied to a minimum cost flow problem with initial prices p0

  Mean-median-standard deviation and range

Find the range and the standard deviation of the times.

  Determining the suitability of a forest for use

It is believed that forest canopy closure (X, in percent) is an important factor in determining the suitability of a forest for use by flying squirrels.

  What ways is the data not stationary

In what way(s) is the data not stationary? Use transformations and/or differencing to make the series stationary. Include a time plot of the transformed and/or differenced data. If you chose a transformation, use this transformation for the remain..

  Average number of acres in western pennsylvania

A state executive claims that the average number of acres in western Pennsylvania State Park is less than 2000 acres. A random sample of five parks is selected, and the number of acres is shown. At alpha=.01, is there enough evidence to support th..

  What information does calculating standard deviation

1. what information does calculating standard deviation provide? how is the z-score related to standard deviation?2.

  From experience a high-jumper knows that he can clear a

from experience a high-jumper knows that he can clear a height of at least 1.78 meters once in 5 attempts. he also

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd