Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Math Expert


Home >> Math

Q1. A Hidden Markov Model in discrete time is a stochastic process involving two layers: (i) a hidden state which forms a Markov chain, and (ii) an observed state, which, given the hidden state, is independently distributed across time. The following is an example:

The hidden states Z1, Z2, . . . follow a two state Markov chain (with states 0 and 1) with transition probability matrix

1590_Figure.png

where π00 + π01 = 1 and π10 + π11 = 1. This means, for each i,

P(Zi+1 = l|Zi = k) = πkl, for k, l ∈ {0, 1}.

Given, Zi = k, we observe Xi ∼ N(µk, σ2k), for k = 0, 1, independently for each i. Here µ0, µ1 are real numbers and σ0, σ1 > 0.

(a) Write an R function that takes the following input: π00, π10, µ0, µ1, σ0, σ1, n and Z0 (the initial state of Z), to generate the processes (X1, . . . , Xn) and (Z1, . . . , Zn). Set default values of all the parameters, in your function definition. The function should return all the parameters, and two vectors containing the values of Xi's and Zi's.

(b) Generate a data set with n = 200, π00 = 0.8, π10 = 0.2, µ0 = 0, µ1 = 2, σ0 = σ1 = 1, and Z0 = 0.

(c) Generate a data set with n = 200, π00 = 0.8, π10 = 0.2, µ0 = µ1 = 0, σ0 = 1, σ1 = 4, and Z0 = 0.

(d) Assuming that you only observe the Xi's, for each of (b) and (c), compute the following statistics: (i) Ui = j=1i Xj, i = 1, . . . , n; and (ii) Vi = j=1i X2j - i(X-i)2, i = 1, . . . , n, where X-i = (j=1i Xj)/i.

(e) Based on your results in (d), can you say which of the statistics (among (i) and (ii)) provides information about the transitions in the hidden states {Z1, . . . , Zn}? Justify your answer. [Hint: It will help to plot the values of Ui's and Vi's against index i.]

Q2. Suppose we are given a set of bivariate observations (Xi, Zi) for i = 1, . . . , n, where Zi's are categorical, that is, Zi's can take a finite number of distinct values. We want to see whether the values of Xi's differ for the different categories of the Z variable. In the following, we assume that we have two different vectors X = (X1, . . . , Xn) and Z = (Z1, . . . , Zn) as our data.

(a) Write an R function that accepts X and Z as input and returns the following output:

(i) The set of distinct values of the variable Z;

(ii) The sets of indices for which Z takes these values;

(ii) Mean and standard deviation of X corresponding to the distinct values of Z.

You must avoid using for or while loops when writing this function.

(b) Now suppose we consider the data set generated in 1(b). Treat both X = (X1, . . . , Xn) and Z = (Z1, . . . , Zn) as observed. Use the function created in 2(a) to check whether the Xi's corresponding to different values of Z are from the same population. Provide a brief argument to justify your answer. Clearly state any assumption you are making and any result that you are using.

(c) Write an R function to repeat the process in 2(b) m times (i.e., generate the data following 1(b) m times, and in each case decide whether the populations for distinct Zi's are the same). Report the success rate of your decision rule for m = 100.

Math, Academics

  • Category:- Math
  • Reference No.:- M92286978
  • Price:- $55

Guranteed 36 Hours Delivery, In Price:- $55

Have any Question?


Related Questions in Math

Questions - provide solution to the following questionsq1

Questions - Provide solution to the following questions: Q1. Evaluate the following: ∫xsin3xdx Q2. If , then for what value of α is A an identity matrix? Q3. The line y = mx + 1 is a tangent to the curve y 2 = 4x. Find t ...

Mathematics- algebraic geometry problemlet k denotes an

Mathematics- Algebraic Geometry Problem Let K denotes an algebraically closed field and let P 1 be constructed as in Example 5.5(a) in Gathmanns notes, i.e. P 1 is the gluing of X 1 = A 1 and X 2 = A 1 along  the open su ...

Assignment - solving the five question in the very details

Assignment - Solving the five question in the very details, thanks a lot. Question - Let a ∈ P n be a point. Show that the one-point set {a} is a projective variety, and compute explicit generators for the ideal I p ({a} ...

Assessment taskpractical investigation- question 1 requires

Assessment Task Practical Investigation - Question 1 requires selecting reference points from the graph. It is expected that each student will choose different reference points to other students. Take note of the criteri ...

Question you will recommend a course of action regarding

Question: You will recommend a course of action regarding strategic planning in light of the issue the healthcare organization is facing. Be sure to address the following: 1. Provide a brief summary of the issue facing t ...

Question 1 - for the ivp of ode y t-1e-y y1 0 find an

Question 1 - For the I.V.P of ODE y' = (t-1)e -y , y(1) = 0, find an approximation to y(1.2) using the following numerical methods with Δt = 0.1. Compare the numerical solution with the exact solution and compute the err ...

Question 1 what is the nth order approximation using taylor

Question: 1. What is the nth order approximation using Taylor series? 2. What is Error Propagation? 3. Please explain what the total numerical error is? Please illustrate how the change of step size will affect the total ...

1 suppose that n 10088821 is a product of two distinct

1. Suppose that n = 10088821 is a product of two distinct primes, and Φ(n) = 10082272. Determine the prime factors of n. 2. It is easy to show that the converse of Fermat's Theorem does not hold; i.e., the congruence a n ...

Assignment - provide solution to the following questionsq1

Assignment - Provide solution to the following questions: Q1. Evaluate the following: ∫xsin3x dx Q2. If , then for what value of α is A an identity matrix? Q3. The line y = mx + 1 is a tangent to the curve y 2 = 4x. Find ...

Assignment -question 1 let t and or 0 1 be a boolean

Assignment - Question 1. Let (T, ∧, ∨,', 0, 1) be a Boolean Algebra. Define ∗ : T × T → T and o : T × T → T as follows: x ∗ y := (x ∨ y)' x o y := (x ∧ y)' (a) Show, using the laws of Boolean Algebra, how to define x ∗ y ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As