3

I am confused about the units we would refer to with a correlation result in that if it would be a magnitude or power quantity (and therefore specifically when using ratios in dB would we use 10Log or 20Log?).

I have since confirmed as detailed in this post that the normalized correlation coefficient $\rho$ is a magnitude quantity in that the relationship between SNR and $\rho$ repeated here is:

$$\text{SNR} = 10\log_{10}\frac{\rho^2}{1-\rho^2}$$

Where in this case for an SNR relationship to $\rho$, the correlation involved is the correlation of $x(t)$ being a reference waveform as signal to $y(t)$ which is the same signal with added noise. (So that the SNR of $y(t)$ is determined in this case).

However I also understand and see directly from the math that the autocorrelation (at $\tau=0$ if we are referring to the autocorrelation function) is the variance (scaled by the number of samples), which is a power quantity, and we see the sum of products in the general expression for correlation suggesting a sum of powers. How do we reconcile all this?

Is it that the normalized coefficient through it's normalization process:

$$\rho = \frac {\operatorname*{cov}(x,y)}{\operatorname*{stddev}(x)\operatorname*{stddev}(y)} $$

Has this converted the power quantity of the numerator back to a magnitude quantity, and therefore correlation on its own (the numerator) IS a power quantity, while the correlation coefficient IS a magnitude quantity? If so, I don't yet quite see how. Or is it something else entirely?

Peter K.
  • 25,714
  • 9
  • 46
  • 91
Dan Boschen
  • 50,942
  • 2
  • 57
  • 135

2 Answers2

2

There are different ways to look at this.

In general, it's useful to think of the correlation as a power quantity.

  1. If you slog through the units, the correlation will have power-like units: $V^2$ for example
  2. The Fourier Transform of the autocorrelation is the Power Spectral Density, which is clearly a power-like quantity

So what's happening in your example? Let's assume that we have $y = x + n$ where $x$ and $n$ are mean-free, uncorrelated and have the variances $P_x = \sigma_x^2 = <x^2>$ and $P_n = \sigma_n^2 = <n^2>$. Since they are uncorrelated we have $P_y = P_x+P_n $

The SNR would be $$SNR = 10log_{10}\frac{P_x }{P_n}$$

The argument to the log is a ratio of powers.

The covariance is $cov(x,y) = <x\cdot (x+n)> = P_x$ which has power-like units. The normalized correlation coefficient comes to be.

$$\rho = \frac{cov(x,y)}{\sqrt{{P_x \cdot P_y }} = \frac{P_x}{\sqrt{P_x \cdot (P_x + P_n) }} $$

$$\rho = \frac{cov(x,y)}{\sqrt{P_x \cdot P_y }} = \frac{P_x}{\sqrt{P_x \cdot (P_x + P_n) }} $$

So that's also a ratio of powers: cross-power to geometric mean of the signal powers. Since it's a ratio it's unitless. Let's square it:

$$\rho^2 =\frac{P_x^2}{P_x \cdot (P_x + P_n) } = \frac{P_x}{P_x + P_n } $$

The most reasonable physical interpretation of this is STILL a ratio powers: signal power to signal power plus noise power. Since the ratio is unitless, the square of ratio is still unitless, so there is no direct conflict here.

Hilmar
  • 44,604
  • 1
  • 32
  • 63
  • in your formula for rho you show the covariance as being equal to the standard deviation of x (and variances throughout should be $\sigma_x^2$ not $\sigma_x$. If you concur can you update as I am trying to follow your otherwise interesting logic – Dan Boschen May 18 '21 at 17:19
  • 1
    Shoot, I mixed up the symbol for variance and standard deviation. Lemme fix it, – Hilmar May 18 '21 at 17:51
  • So rho is a ratio of powers but if we square it it is still a ratio of powers (which is counter-intuitive given a ratio of voltages as expressed in dB using 20Log when squared is a ratio of powers as 10Log. This is still a missing piece for me not yet explained – Dan Boschen May 19 '21 at 03:07
  • Fair point. Frankly, the definition of $\rho$ feels a little wonky to me. The cross power can be negative (is it still a power then?) and I have no physical interpretation of the "geometric mean" of the powers. There may be a way to interpret this a "scaled magnitude quantity" although it's not obvious to me how to do that. It seems needlessly complicated. Why would you use that instead of just $P_x/(P_y-P_x)$ ? – Hilmar May 19 '21 at 13:21
  • But the rest of your post was great without even mentioning that point and solved a long running mystery for me. In particular, and simply, showing how the SNR was derived. So my real interest is getting to Px/Py as in SNR and using rho to do that. Which you basically showed if you took it one step further for the final rho^2/(1-rho^2). So I appreciate this insight. – Dan Boschen May 19 '21 at 13:25
  • I added an answer below that I'd be interested in your further thoughts on – Dan Boschen May 21 '21 at 15:24
0

I am adding this which was influenced by Hilmar's answer, and specifically to show that the normalized correlation coefficient, $\rho$, when derived from the comparison of a signal to the same signal signal plus noise is indeed a ratio of magnitude quantities and not power quantities. I will derive continuing Hilmar's approach that the result is indeed a ratio of the standard deviations. This is interesting as I also see the logic that correlation itself is a power quantity, especially noting the relationship of power spectral density and the autocorrelation function.

I believe what resolves the confusion is that the Normalized Correlation Coefficient is a magnitude quantity, which is not the same as the Auto-correlation or Cross-correlation functions which I believe are indeed in units of power quantities. The normalization by the standard deviations in the computation for $\rho$ which is the only difference must in the process convert the power quantity in the numerator back to a magnitude quantity, as proven by the sequence of equations below (but I don't otherwise grasp that intuitively):

Starting with the relationship between SNR and $\rho$ and then confirming this relationship and how it relates to $\rho$ itself:

$$SNR = 10\log_{10} \frac{\rho^2}{1-\rho^2} \tag{1} \label{1} $$

$$\rho = \frac{\text{cov}(X,Y)}{\sigma_X \sigma_Y}\tag{2} \label{2} $$

Where

$X$: signal, assumed zero-mean

$Y = X + N$: signal plus uncorrelated zero-mean noise

$\text{cov}(X,Y)$: Covariance of X and Y

$\sigma_X$: standard deviation of X

$\sigma_Y$: standard deviation of Y

Since the signal and noise are both zero-mean, $\text{cov}(X,Y) = E(XY)$:

$$\text{cov}(X,Y) = E(XY)-E(X)E(Y)=E(XY)-0 = E(XY)$$

Since the signal and noise are uncorrelated:

$$E(XY) = E(X(X+N))= E(X^2) + E(X N) = E(X^2) + 0 = E(X^2) = \sigma_X^2 \tag{3} \label{3}$$

Substituting \ref{3} into \ref{2}:

$$\rho = \frac{\sigma_X^2}{\sigma_X \sigma_Y} = \frac{\sigma_X}{\sigma_Y}\tag{4} \label{4} $$

From this we clearly see that the correlation coefficient for the correlation of Signal to Signal+ Noise is simply the ratio of the standard deviation of the two. Standard Deviation is a magnitude quantity, not a power quantity.

We continue to get Hilmar's result above and finally the relationship given in $\ref{1}$

$$\rho^2 = \frac{\sigma_X^2}{\sigma_Y^2} = \frac{\sigma_X^2}{\sigma_X^2 + \sigma_N^2}\tag{5} \label{5} $$

and

$$1-\rho^2 = 1-\frac{\sigma_X^2}{\sigma_X^2 + \sigma_N^2} = \frac{\sigma_N^2}{\sigma_X^2 + \sigma_N^2}\tag{6} \label{6}$$

Dividing \ref{5} bu \ref{6} we get the result:

$$\frac{\rho^2 }{1-\rho^2} = \frac{\sigma_X^2}{\sigma_N^2}$$

Dan Boschen
  • 50,942
  • 2
  • 57
  • 135