What works:
- I generate real-valued white gaussian noise with standard deviation $\sigma$
- I calculate the FFT of this noise. The Abs of the FFT is a flat noisy trace over frequency, as expected for white noise.
- The standard deviation of the resulting FFT returns $\sigma$. -> Expected, good!
Where I am stuck:
- I use the same noise vector, but now multiply it with a unity-gain Hann window, i.e. the Hann window whose tip is at a value of 2 and whose integral is equal to the vector length.
- I calculate the FFT and compute the standard deviation as before. The absolute value of the FFT again is a flat noisy trace over frequency, but the average value is somewhat higher as also reflected in the standard deviation of the FFT:
- The result of the standard deviation of the FFT vector is approximately $\sigma$ with an additional factor of approximately ~1.24.
- I am puzzled because the same unity-gain Hann window does not alter the amplitude of Sine waves in the FFT.
Questions:
- Why does applying this Hann window change the noise power ?
- What is the exact value of the additional factor and why ? I am unable to derive it formally.
- Is it perhaps $\sqrt{3/2}\approx1.225$ ? I obtained it as square root of the integral of the squared window.. The same factor would be indeed 1 for the unity gain rectangular window.
Code example (Mathematica):
n = 2000;
noise = RandomVariate[NormalDistribution[0, 1.], n];
win = 1 - Cos[2 \[Pi] Range[n]/n];
StandardDeviation@Fourier[noise] (* returns ~1.00 *)
StandardDeviation@Fourier[noise*win] (* returns ~1.24 *)