The optimal least-squares amplitude estimate may be found by the following steps:
Amplitude and Phase Estimation
Multiplying the optimal amplitude estimator by suggests the following generalization for including phase:
That is, is given by the complex coefficient of projection of onto the complex sinusoid at the known frequency .
Proof by the orthogonality principle (Method 3):
The orthogonality principle for linear least squares estimation states that
That is, if is our optimal signal model (viewed now as an -vector in ), then we must have
Thus, the complex coefficient of projection of onto is given by
The optimality of in the least squares sense follows from the least-squares optimality of orthogonal projection.
Frequency Estimation
The preceding cases suggest the following sinusoidal frequency estimator:
That is, the sinusoidal frequency estimate is defined as that frequency which maximizes the DTFT magnitude.