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? I would appreciate if someone could point me to the reading that would gently shed light on this topic for me? I am reasonably proficient in calculus (undergraduate vector calculus course), and have some background in linear algebra (for example, I know that the least squares method works because errors are set to be orthogonal to the data vectors), but most of my math knowledge is limited to the requirements of my economics major. Seems to me that my question would be pretty well-studied though, and an intuitive explanation available...
Thank you!