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

  Statistics-probability assignment

MATH1550H: Assignment:  Question:  A word is selected at random from the following poem of Persian poet and mathematician Omar Khayyam (1048-1131), translated by English poet Edward Fitzgerald (1808-1883). Find the expected value of the length of th..

  What is the least number

MATH1550H: Assignment:  Question:     what is the least number of applicants that should be interviewed so as to have at least 50% chance of finding one such secretary?

  Determine the value of k

MATH1550H: Assignment:  Question:     Experience shows that X, the number of customers entering a post office during any period of time t, is a random variable the probability mass function of which is of the form

  What is the probability

MATH1550H: Assignment:Questions: (Genetics) What is the probability that at most two of the offspring are aa?

  Binomial distributions

MATH1550H: Assignment:  Questions:  Let’s assume the department of Mathematics of Trent University has 11 faculty members. For i = 0; 1; 2; 3; find pi, the probability that i of them were born on Canada Day using the binomial distributions.

  Caselet on mcdonald’s vs. burger king - waiting time

Caselet on McDonald’s vs. Burger King - Waiting time

  Generate descriptive statistics

Generate descriptive statistics. Create a stem-and-leaf plot of the data and box plot of the data.

  Sampling variability and standard error

Problems on Sampling Variability and Standard Error and Confidence Intervals

  Estimate the population mean

Estimate the population mean

  Conduct a marketing experiment

Conduct a marketing experiment in which students are to taste one of two different brands of soft drink

  Find out the probability

Find out the probability

  Linear programming models

LINEAR PROGRAMMING MODELS

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