# Why is the coherence function unity at all frequencies when only one reading is done?

Several papers on the internet states that the coherence function is unity for all frequencies if only one reading is done, and that the coherence function requires an average of two or more readings of the input and output in order to get a valid result. Why does not the coherence function give a valid result for only one reading of the input and output? And what is the effect of dividing the readings into several segments?

• I'm missing a bit of context here – how does "one reading" contain any frequency information, to begin with? Maybe explaining in which context you're working and linking to one or two of these papers would make it easier to understand? Nov 18, 2019 at 10:56
• The same phenomenon is also stated in the MATLAB function 'mscohere', where it is said "You must use at least two segments. Otherwise, the magnitude-squared coherence is 1 for all frequencies." I am wondering why this is the case? Nov 19, 2019 at 12:34
• can you link to that? I don't even know what "segment" is in this context, sorry. Nov 19, 2019 at 15:06
• The quote is taken from the description of 'cxy = mscohere(x, y, window)' at the following mathworks.com/help/signal/ref/mscohere.html Nov 20, 2019 at 23:03
The definition of magnitude-squared coherence (MSC) is $$C_{xy} = \frac{|S_{xy}|^2}{S_{xx}S_{yy}}$$ where $$S_{uv}$$ is the cross-PSD between $$u$$ and $$v$$ and given by $$S_{u,v}(f) = U^\ast(f) V(f) = \mathcal{F}(U)^\ast \mathcal{F}(V) = \mathcal{F}(R_{uv})$$ where $$R_{uv} = u \star v$$ is the cross-correlation between $$u$$ and $$v$$ (in time).
Denote by $$X = \mathcal{F}(x)$$ and $$Y = \mathcal{F}(y)$$ the Fourier transforms of $$x$$ and $$y$$, omitting the frequency index. Then insert these in the definition: $$C_{xy} = \frac{|S_{xy}|^2}{S_{xx}S_{yy}} = \frac{ | X^\ast Y |^2 }{X^\ast X Y^\ast Y} = \frac{X^\ast Y Y^\ast X}{X^\ast X Y^\ast Y} = 1$$ since all the term in the numerator and denominator cancel each other.