# Expected Value and Variance of a Markov Chain

Say I have a transition matrix $Q = \begin{bmatrix} 1-p & p \\ p & 1-p \end{bmatrix}$ where $0 < p < 1$ for a two state system with states $-1$ and $1.$ Define $X_i$ to be the value of the markov chain at time $i$ (so either $-1$ or $1$). If $\bar{X_i} = \frac{1}{n}\sum_{i = 1}^n X_i$ what is the $\mathbb{E}[\bar{X_i}]$ and $Var[\bar{X_i}]$?

I've started off by tackling $\mathbb{E}[\bar{X_i}]$ but it seems to me that this answer depends on whether $n$ is even or odd. Note since this is a Markov chain there is not pairwise independence.

$$\begin{bmatrix} p&1-p\\ 1-q&q \end{bmatrix}.$$ If $$p=q>0$$ then the $$n^{th}$$ power of the state transition probability tends quite fast to
$$\begin{bmatrix} \frac12&\frac12\\ \frac12&\frac12 \end{bmatrix}.$$
So, for $$p=q$$ the stationary probabilities are both $$\frac12$$.
So, on the long run $$1$$ and $$-1$$ appears with the same probability. The expectation is then $$0$$. As far as the variance, we have $$1^2\frac12+(-1)^2\frac12$$=1.