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 expected frequencies

(a) State the hypotheses to be tested. (b) Calculate the expected frequencies.

  What average must exceed to obtain an a

The next 20% a B, the next 42% a C, the next 18% a D and the bottom 12% an F. What average must you exceed to obtain an A?

  Review case study of the bear market

During a bear market, 140 investors were asked how they were adjusting their portfolios to protect themselves. Some of these investors were keeping.

  Use a 005 significance level to test the claim that the two

samples were collected from two ponds in the bahamas to compare salinity values in parts per thousand. several samples

  Converting z intervals to x intervals

What is given is the mean=27.2 kilograms and standard deviation=4.3 kilograms. I attempted to work out a which I know is wrong but this is what I did.

  Name three sources of variation in the one-way

When is it appropriate to compute the one-way within-subjects ANOVA?

  Statistical decision making and quality control

Explain why a process can be out of control even though all the samples fall within the upper and lower control limits.

  Discuss briefly energy supplement bars for use by athlete

Grand foods, Inc., makes energy supplement bars for use by athletes and others who need an energy boost. One of the critical quality characteristics.

  Indirect exchange rate of the euro

Go to the section on currencies within the website. First, identify the direct exchange rates of foreign currencies from the U.S. perspective. Then, identify the indirect exchange rates. What is the direct exchange rate of the euro?

  For the binary communications system

For the binary communications system of Example 8.7, graph the error probability PERR as a function of p, the probability that the transmitted signal is 0. For the signal-to-noise voltage ratio, consider v/σ ∈ {0.1, 1, 10}. What values of p minimi..

  Difference in variability of times for men and women

Is there any evidence of a difference in variability of times for men and women who finished this vertical run? Use a = 0.05 and assume normality.

  Graph to visualize the problem with the given data

Make a graph to visualize the problem and state, without doing the calculations, whether the p-value of the test

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