# Why use $\chi^2$ test to determine the presence of white noise?

I want to test for the presence of broadband noise in a snapshot 1000 complex baseband samples recorded by a software defined radio.

As a follow-up to this post, why was the $\chi^2$ test used? How many degrees of freedom should be used?

Also, how would one extend this approach to complex baseband data? I would assume that I and Q are iid Gaussian random variables. The magnitude of the complex data would then be Rayleigh distributed not Gaussian. Is there a generalization of the $\chi^2$ test for Rayleigh random variables? Or, would I just pick I or Q to operate on?

Update: I was able to find a paper: A test for whiteness. The author outlines a similar process. • So, as the post you link to answers the question of how, you're looking for a why with the $\chi^2$ test? – Marcus Müller Aug 2 '18 at 20:22
• Yes, the post doesn't explain why to use the chi-squared test. – random_dsp_guy Aug 2 '18 at 21:09
• I changed the title to reflect that. However, the text from the answer to that question is pretty clear: because $R$ from cited formula $(16.32)$ is $\chi^2$-distributed. So, I'm still not sure what your question is? – Marcus Müller Aug 2 '18 at 21:12
• I'm looking for a little more context. Why did he pick 10 degrees of freedom? – random_dsp_guy Aug 2 '18 at 22:14

If I and Q are normal, then their magnitude square is $\chi^2$ distributed.

Hence, if you check the distribution of the instantaneous power against that distribution, you get information about how much the complex baseband signal is circularly complex normal.

The autocorrelation function has power of the signal as its value for zero shift. For whiteness, the sample autocorrelation approaches an accordingly weighted Dirac impulse with growing observation length.

• So, the magnitude is Rayleigh but the magnitude^2 is chi^2? – random_dsp_guy Aug 3 '18 at 16:46
• can you please provide a reference? I thought the magnitude squared would be an exponential distribution not a chi-squared distribution? – random_dsp_guy Aug 3 '18 at 20:44
• It's the definition of the chi² distribution. – Marcus Müller Aug 3 '18 at 21:51

This table shows the $\chi^2$ test values for various degrees of freedom. 