Problem 1 say {Xn,n≥1} is a Markov chain with state space {0,1} and transition matrix

for some 0≤p≤1, 0≤q≤1 (Note: not necessarily p+q=1!)
In each of the following if you have trouble with the general case do p=0.65 and q=0.25 for partial credit.
a) find the eigenvalues and eigenvectors of this matrix
b) In this part only, assume p=q=r, use the result from part a) to find the n-step transition matrix P(n). What is limn→∞P(n) ? Write an R routine that generates this Markov chain and estimates P00(3) for r=0.25. (Correct answer is (1+(2r-1)n)/2=0.4375)
c) Find the stationary distribution p = (p1,p2)T of P. (with ∑p=1). Use it to calculate

Write an R routine to check your answers above for p=0.25 and q=0.65. Correct answer is p1=(q-1)/(p+q-2)
d) Say X0 has distribution p, that is P(X0=0)=p1. Show that then Xn also has distribution p for all n≥1
Hint: show that X1 has distribution p
e) Again say X0 has distribution p. Show that

Use it to show that X0 and X1 are uncorrelated if and only if p=1 or q=1 or p+q=1
Hint remember the formula E[X]=E{E[X|Y]}. Also, the definition of Cov(X0,X1) is exactly the same as before.
Write an R routine to check your answers
Problem 2
One of the standard distributions in Statistics is Student's t distribution. A rv X is said to have a t distribution with n degrees of freedom if

Write an R routine to generate observations from a t distribution with 2 degrees of freedom. Use the accept-reject algorithm with Y~Cauchy(0) which you can generate with the command rcauchy(1). What is is the optimal value of c in the accept-reject algorithm?