COMPLETE TWO PROBLEMS FROM AMONG PROBLEMS 6-9 6. (20 pts) Consider the following hidden Markov model (HMM): . x = (...
COMPLETE TWO PROBLEMS FROM AMONG PROBLEMS 6-9 6. (20 pts) Consider the following hidden Markov model (HMM): . x = (x,,. . . ,x,Je {o, l}n [i.e., X is a binary sequence of length n] and Y = (Yİ, . . . , Y, ) E R" [i.e., Y is a sequence of n real numbers.] ·Xi ~ Bernoulli (1 /2) Ip is the switching probability; when p is small the Markov chain likes to stay in the same state] . conditioned on X, the random variables Yi . . . , Y, are independent with Ylx, ~ Normal (Xi,02) [another way to say this is that Yi-x, + e, where the ei are iid Normal (0,o2)] X is the hidden Markov chain and Y is the observation process. Suppose that p ,1, σ 1, and n 1000. Write Matlab code (or pseudocode) that outputs a sample from this HMM. You can output the vectors X and Y such that X(1) [in Matlab] is Xi, X(2) is X,Y(1) is Yi, Y(2) is , etc.
COMPLETE TWO PROBLEMS FROM AMONG PROBLEMS 6-9 6. (20 pts) Consider the following hidden Markov model (HMM): . x = (x,,. . . ,x,Je {o, l}n [i.e., X is a binary sequence of length n] and Y = (Yİ, . . . , Y, ) E R" [i.e., Y is a sequence of n real numbers.] ·Xi ~ Bernoulli (1 /2) Ip is the switching probability; when p is small the Markov chain likes to stay in the same state] . conditioned on X, the random variables Yi . . . , Y, are independent with Ylx, ~ Normal (Xi,02) [another way to say this is that Yi-x, + e, where the ei are iid Normal (0,o2)] X is the hidden Markov chain and Y is the observation process. Suppose that p ,1, σ 1, and n 1000. Write Matlab code (or pseudocode) that outputs a sample from this HMM. You can output the vectors X and Y such that X(1) [in Matlab] is Xi, X(2) is X,Y(1) is Yi, Y(2) is , etc.