代做PSTAT 160A W– Summer 2025 ASSIGNMENT 5代做留学生Python程序
- 首页 >> Java编程ASSIGNMENT 5
PSTAT 160A W– Summer 2025
Release date: Wednesday, July 23
Due date: Wednesday, July 30th at 11:59 pm PT
Instructions for the homework: Solve all homework problems. To receive full credit sufficient explanations indicating comprehensible and complete reasoning need to be provided. Submit your work as a PDF on Gradescope. Please write legibly and do not crowd your solution on the page. You are welcome to use computer algebra systems (Python, R, Wolfram Alpha, Mat-lab, etc.) to compute matrix powers and products. Be sure to state clearly when you do that, and write out/screenshot the results into your assignment.
Problem 5.1 (10 points) Exercise 3.28 in Dobrow (”without technology” means without directly computing Pn for large n):
Problem 5.2 (10 points) (Reflecting random walk on the line.) Consider the points 1, 2, 3, 4 marked on a straight line. Let Xn be a Markov chain that moves to the right with proba-bility 1/3 and to the left with probability 2/3, subject to the rule that if Xn tries to go to the left from 1 or to the right from 4, it stays put where it was.
(a) (2 points) Find the transition probability matrix for the chain.
(b) (4 points) Find the limiting amount of time the chain spends at each site.
(c) (4 points) Suppose that you get paid i2 dollars each time you’re in state i. So every time you visit state 3 you get 9 dollars, and so on. Determine the long-run revenue per step.
Problem 5.3 (10 points) Within a certain society of individuals, there is a certain gene pair where each gene in the pair can have one of two types: A or a. This leaves {AA, Aa, aa} as the possible gene pairs an individual has. Assuming that each offspring in the society gets one of the two genes in the pair from each of its two parents, we can reasonably model the gene pair motility through descendancy as a stationary discrete time Markov chain with states S = {AA, Aa, aa}, where Xn represents the gene pair of the nth descendant (we will ignore issues such as death of an individual before having another descendant). Assume that the transition matrix for this process is
For each gene pair g ∈ S, what is the long run probability that the (far future) descendants have gene pair g? Justify your answer.
Problem 5.4 (10 points) Consider the Markov chain (Xn) with state space S = {1, 2, 3, 4, 5, 6, 7, 8} and the following transition graph:
Find all stationary distributions of this chain.
Problem 5.5 (10 points) A sunny day is followed by a sunny day 70% of the time, and by a cloudy day 30% of the time. A rainy day is always followed by a cloudy day. A cloudy day is equally likely to be followed by any of sunny, rainy and cloudy days. Today (day 0) is cloudy.
(a) (3 points) Find the expected number of days until the next cloudy day.
(b) (4 points) Find the expected number of cloudy days in the next week. Hint: compute the probability it’s cloudy on Day 1, 2, 3, ....
(c) (3 points) Find the typical number of cloudy days in a randomly selected week. Explain in 2-3 sentences why the answer in (c) is bigger/smaller than the answer in (b).