Mean and variance of non-stationary stochastic processes I'm studying AR and MA stochastic processes, I know that AR is stationary when $\theta<1$ while MA is always stationary.
I need to calculate $E$, $Var$ and $Cov$ of this two processes:
$$y_t=\alpha+y_{t-1}+\varepsilon_t$$
$$ y_t=\alpha t + \varepsilon_t $$
where $\varepsilon_t$ has mean 0 and variance $\sigma^2$.
From my understanding the first process is not stationary, but I can't even calculate the mean as for $\theta=1$ the formula $E[y_t]=\frac{\alpha}{1-\theta}$ clearly cannot be computed.
The second one is also not stationary as the mean depends on $t$, but I have no idea of how to calculate it, maybe $E[y_t]=\alpha \frac{T}{2}$?
 A: (Assuming that $(\varepsilon_t)_{t \in \mathbb{N}}$ is IID noise, as is usual in this context). If we define $Y_t=\alpha + Y_{t-1}+\varepsilon_t$ then you see that $(Y_t)_{t \in \mathbb{N}}$ is s.t.
$$E[Y_t|Y_{t-1}]=\alpha+Y_{t-1}\implies E[Y_t]=\alpha+E[Y_{t-1}]$$
so $E[Y_t]$ is a recursive sequence with starting value $E[Y_1]=\alpha +y_0$. It follows that $E[Y_t]=y_0+t\alpha$. To find the variance, consider that, by the law of total variance
$$\textrm{Var}[Y_t|Y_{t-1}]=\sigma^2\implies \textrm{Var}[Y_t]=\sigma^2+\textrm{Var}[E[Y_t|Y_{t-1}]]=\sigma^2+\textrm{Var}[Y_{t-1}]$$
so again by recursion $\textrm{Var}[Y_t]=\sigma^2t$. The covariance is, for $t>s$,
$$\textrm{Cov}[Y_t,Y_s]=E[(Y_t-E[Y_t])(Y_s-E[Y_s])]=\sum_{k=1}^s\sigma^2=s\sigma^2$$
You can see this by considering that $Y_t=y_0 + \alpha t + \sum_{k=1}^t\varepsilon_k$.
If we define $Y_t=\alpha t+ \varepsilon_t$ it is easier. The sequence $(\varepsilon_t)_{t \in \mathbb{N}}$ is IID so $E[Y_t]=\alpha t$ and $\textrm{Var}[Y_t]=\sigma^2$. You can visualize it as stationary noise around the line $y(t)=\alpha t$.
Also $\textrm{Cov}[Y_t,Y_s]=E[\varepsilon_t\varepsilon_s]=0$. However $E[Y_t]\neq E[Y_s]$ so $Y_t$ is stationary around its time-dependent mean. This is why if there is a linear trend in a time series we use detrending.
