Linear prediction tries to predict a signal sample $\hat{s}(n)$ using a linear combination of the signal's past samples: $ \hat{s}(n) = \sum_{k=1}^{P} a_k s(n-k) $ The prediction error $e(n)$ is called the [[residue]]: $ e(n) = s(n) - \sum_{k=1}^{P} a_k s(n-k) $ The coefficients $a_{k}$ are called the [[linear prediction coefficients]]. The difference equation has the form of an all-zero filter with a transfer function $A(z)$ that is a polynomial in $z$: $ A(z) = \frac{E(z)}{S(z)}=1 - \sum_{k=1}^{P} a_k z^{-k} $ The inverse of this filter is an all-pole filter that can be seen as similar to the vocal tract transfer function. In this case, the residue can also be seen as an estimate of the glottal excitation that is shaped by the filter to produce the speech signal: $ S(z) = \frac{1}{1 - \sum_{k=1}^{P} a_k z^{-k}} E(z) $ In terms of the magnitude of the [[frequency response]]: $ |H(e^{j\omega})|_{dB} = 20 \log \left|\frac{1}{1-\sum_{k=1}^{P}a_{k}e^{-j\omega k}} \right| $ ![[linear-prediction-envelope.png]]