Linear Prediction Coefficients
First you need to compute the signal's autocorrelation:

$$R(k)=\sum_nx(n)x(n+k),\quad k=0,1,\ldots,p$$

In your case with $p=2$ you get

$$\begin{align}R(0)&amp;=(-1)(-1)+(-2)(-2)+0\cdot 0+1\cdot 1=6\\
R(1)&amp;=(-1)(-2)+(-2)\cdot 0+0\cdot 1=2\\
R(2)&amp;=(-1)\cdot 0+(-2)\cdot 1=-2\end{align}$$

Then you have to solve a system of linear equations:

$$\begin{bmatrix}R(0)&amp;R(1)\\
R(1)&amp;R(0)\\
\end{bmatrix}
\begin{bmatrix}a_1\\a_2\end{bmatrix}=
-\begin{bmatrix}R(1)\\R(2)\end{bmatrix}$$

which gives the values $a_1=-0.5$ and $a_2=0.5$. Of course $a_0=1$, as you've already noted.

The matrix that occurs in the system of linear equations is a Toeplitz matrix, i.e. all its diagonals have the same elements. As a result, such systems can be solved by specialized and efficient algorithms, such as Levinson's algorithm.