Magnitude-squared Coherence calculation inconsistence I have to calculate the magnitude-squared coherence (MSC) between two signal. However, using a routine that uses only one taper (or no tapers at all) my result is always 1, despite the signals are clearly different. This doesn't happen if I use more than one taper. Searching a explication for this abnormal result, I come with a confusing characteristic of the MSC itself. The definition that I'm using is this

$$\gamma^2(\omega)=\frac{ |X(\omega)\overline{Y(\omega)}| ^2}{(X(\omega)\overline{X(\omega)}).(Y(\omega)\overline{Y(\omega)}) }$$

X and Y are the Fourier tranformed signals that depends on the frequency $\omega$. However, if you take any two complex numbers as the value of these functions in some fixed frequency, the result is always 1. Knowing that $|z|^2=z\overline{z} $ then

$$\gamma^2=\frac{(X\overline{Y})\overline{(X\overline{Y})} }{X\overline{X}Y\overline{Y}}=\frac{(X\overline{Y})(\overline{X}Y) }{X\overline{X}Y\overline{Y}}=\frac{X\overline{X}Y\overline{Y} }{X\overline{X}Y\overline{Y}}=1$$

Certainly there must be something I must be misunderstanding but I can't see what it is. Can anyone explain to me what is the catch?

Edit: I'm gonna use some matlab links as trustable sources.
Definition of MS-coherence

http://www.mathworks.com/help/signal/ref/mscohere.html

definition of cross power spectral density

http://www.mathworks.com/help/signal/ref/cpsd.html

(the power spectral density is the " auto -cross" spectral density, i.e. the Fourier transform of the autocorrelation)
A important property of the Fourier transform of the cross correlation can be found on wikipedia under "properties".

Another source can be found googling under the name "Coherence function in biomedical signal processing". Sorry i didn't post the direct links here, I don't have enough "reputation"
For any single chunk (window) of data the coherence will, as you observed, be 1. In order to properly estimate coherence you must average the spectra and cross-spectra for multiple windows, and THEN calculate coherence. 

The auto-spectra XX and YY can be averaged the conventional way. For the cross-spectrum XY you must average the real and imaginary components first before calculating XY = sqrt( XY[imag]^2 + XY[real]^2 ).

Does that help? Averaging over 8 windows usually yields reliable estimates.