# Math Help - discrete markov stochastic process

1. ## discrete markov stochastic process

hi guys

I have a simple problem driving me crazy

the topic is stochastic process and markov process, this is the problem:

assuming every day's weather has only two options: rainy or sunny.
the probability that in certain day the weather is the same as the day before is $p$. the probability of change in weather is $q=1-p$.

now i will define $(x_{[n]})_{n>=0}$ as a discrete time stochastic process as: $x_{[n]}=1$ if the n'th day was rainy and $x_{[n]}=0$ if the n'th day was sunny.

the question is: given that today, n=0, is a rainy day, find the probability to rain in the n'th day. clue: you can organize the data in a matrix.
i've tried few approaches but nothing comes out, i know its simple, will be happy for assistance. thanks

2. Hello,

Let A be the transition matrix. It's a 2x2 matrix because there are only two states. Since the probability of staying in the same state the next day is p, you will have p in the diagonal. And q otherwise.

$A=\begin{pmatrix} p&q \\ q&p\end{pmatrix}$

it can be diagonalized : its eigenvalues are 1 (eigenvector (1,1)) and p-q (eigenvector (1,-1)).
So $A=PDP^{-1}$, where $P=\begin{pmatrix}1&1\\1&-1\end{pmatrix}$ (matrix of the eigenvectors) and $D=\begin{pmatrix} 1&0 \\ 0&p-q\end{pmatrix}$
Also note that $P^{-1}=\frac 12\begin{pmatrix} 1&1 \\ 1&-1\end{pmatrix}$

Hence $A^n=P\begin{pmatrix} 1^n & 0 \\ 0&(p-q)^n\end{pmatrix}$
But the element $(i,j)$ in $A^n$ denotes $P(X_n=j\mid X_0=i)$ (more or less)
And you're looking for $P(X_n=0 \mid X_0=0)$, so you'll be looking at the (1,1) element of the matrix $A^n$