So the $H_1$ and $H_2$ frequency response estimators for SISO systems are defined according to:
\begin{align} H_1 &= \frac{P_{yx}}{P_{xx}}\\ H_2 &= \frac{P_{yy}}{P_{xy}} \end{align}
Where $\frac{A}{B}$ is an element-wise division of vectors $A$ and $B$. The $H_1$ estimator should be used when the noise is uncorrelated with the input, and $H_2$ should be used when the noise is uncorrelated with the output. I've been trying to experiment with estimating frequency responses but I end up getting the same result regardless of which of the estimators I use. I first define the cross-spectral density according to:
\begin{align} P_{xy} &= X\odot \bar{Y}\\ P_{yx} &= Y\odot \bar{X}\\ P_{yy} &= Y\odot \bar{Y}\\ P_{xx} &= X\odot \bar{X} \end{align}
Where $\bar{A}$ denotes the complex conjugate of $A$, $\odot$ denotes element-wise multiplication. Here $Y$ and $X$ are vectors of the same length and the Fourier transformation of the signals $x$ and $y$.
If the definition of cross-spectral density is inserted into the $H_1$ and $H_2$ estimator formulations as described at the beginning of this post I get:
\begin{align} H_1 &= \frac{Y\odot \bar{X}}{X\odot \bar{X}} = \frac{Y}{X}\\ H_2 &= \frac{Y\odot \bar{Y}}{X\odot \bar{Y}} = \frac{Y}{X} \end{align} And, therefore, $H_1 = H_2 = \frac{Y}{X}$
The $H_1$ and $H_2$ estimators should yield different results as one is supposed to be used when the noise is uncorrelated with the input and the other with the output (as mentioned above).
However, according to my methodology, they are equivalent, at least according to my definitions and calculations. There must, therefore, be something wrong with my approach, but I can't seem to understand what.
EDIT: I realised that if one estimates the PSD or CSD without any averaging, i.e., welch or similar the $H_1$ and $H_2$ estimators are equivalent when I implement them. However, when I use welch averaging they are not equivalent. Although the $H_1$ estimator is better than the $H_2$ estimator regardless if there's noise on the input or output.