Hey thanks. That answers a ton for me. I guess the last thing I had on my mind was in regards to n.
Since X would be a trace containing an array of samples, x would contain the first sample. In the algorithm, there is a point where it is asking for x[n-1] and x[n-2]. In the case that n would equal 0, the first part (n-1) would try to pull a value from the -1 element in the array. How would I work around that for the first few elements of the array?