I am new to this forum. Please forgive me if this question is elementary, but I am somewhat lost and could use a little guidance.
Suppose I have an unknown function $f(i)=x_i$. I have a sequence of observations $y_1,y_2,\ldots,y_n$ of sequence $x_1,x_2,\ldots,x_n$, which is the result of applying this function on $\{1,2,\ldots,n\}$. The observations have a Gaussian error "skirts" around them such that:
$$p(y|x)=\frac{1}{\sqrt{2\pi\sigma^2}}e^{-\frac{(y-x)^2}{2\sigma^2}}$$
Now, if the function is linear and there is no autocorrelation, I think that I can use the usual least squares method that I learned in the undergraduate econometrics to obtain the coefficients, and, (I assume, since I've never have actually done that, but it seems reasonable) knowing $\sigma^2$ would get me a nice expression of some kind for the errors (my guess would be that they'd be Gaussian with mean zero and variance $\sigma^2$ or something like that).
If I am not too off-base in the previous paragraph, what do I do if $f(i)=x_i$ is autocorrelated, such that $x_i$ depends on $i-1,i-2,\ldots, i-m$ for some $m
Thank you!