# Help in understanding the formula of Signal-to-Noise-Ratio (SNR) - Part 1

• Question 1:

Consider an Autoregressive model : \begin{align} y[n] &= y[n-1] + x[n]\\ z[n] &= y[n] + w[n] \end{align} where $y$ is the output observation, $x$ is a random input and $w$ is Additive White Gaussian Noise (AWGN). In general, I have seen in many research articles and tutorials that the SNR = $\frac{E[y^2]}{\sigma^2_w}$

How to arrive at this formula and what is the meaning of Expectation? Is it calculating the mean?

• small comment. be careful about the attribute "white" regarding "Additive White Gaussian Noise". first of all truly white noise has infinite bandwidth, all at a constant spectral density, and therefore has infinite power making $\sigma_w^2 \to \infty$. now, really good gaussian pseudo-random numbers, $w[n]$, have finite $\sigma_w$, and the bandwidth is not infinite, but is the Nyquist frequency. so, from knowledge of the variance and mean of $w[n]$ and from the sampling frequency, you can assume constant spectral density throughout DC to Nyquist and derive the value of it. – robert bristow-johnson Jul 1 '17 at 4:44
• @robertbristow-johnson In a discrete-time setting, which this seems to be as evidenced by the square brackets and the use of $n$ instead of $t$, white noise is commonly understood to mean a sequence of iid zero-mean random variables with finite variance $\sigma^2$. – Dilip Sarwate Jul 1 '17 at 13:37
• i know, @DilipSarwate. and the power spectrum density (in normalized angular frequency $\omega$) is a constant and that constant must be $\frac{\sigma^2}{2 \pi}$. in the continuous-time setting, we would say it's something like $\frac{\eta}{2}$ and you have to multiply that times the effective bandwidth of the channel to get $\sigma^2$. – robert bristow-johnson Jul 1 '17 at 14:16

## 3 Answers

$\mathsf{SNR}$ (signal-to-noise ratio) is a generic term whose value can be defined in different ways by different people, and as long as one states clearly what is meant by $\mathsf{SNR}$ in a particular document, there is no confusion. Thus, there is no "arriving" at the formula $\mathsf{SNR} = \frac{E[y^2]}{\sigma_w^2}$ at all: it is the definition of the term $\mathsf{SNR}$ as it used in that particular document. There is, of course, a general feeling among communications systems designers and analysts that the error probability $P_e$ should be a decreasing function of $\mathsf{SNR}$, but exactly which decreasing function it is depends on the definition of $\mathsf{SNR}$ in use. For example, someone could define $\mathsf{SNR}$ as $\frac{E[|y|]}{\sigma_w}$ or as $\frac{\sqrt{E[y^2]}}{\sigma_w}$ or as $\frac{E_b}{N_0}$ (a quantity that I like to call the BEND ratio ("bit energy to noise density ratio")), because those definitions make more sense in that particular application, or lead to more memorable formulas. If $\mathsf{SNR}$ is defined to be the BEND ratio, then the bit error probability for coherent demodulation of binary orthogonal FSK would be $P_e = Q(\sqrt{\mathsf{SNR}}\,)$ (where $Q(\cdot)$ is the complementary standard Gaussian CDF) while for differentially coherent demodulation of differentially encoded PSK, the bit error probability would be $p_e =\frac{1}{2}e^{-\mathsf{SNR}}$, etc. Skipping over the fine details to the executive summary, large values of $\mathsf{SNR}$ are better than small values of $\mathsf{SNR}$.

Since the $x[n]$'s are random (variables), so are the $y[n]$'s random variables since they are sums of the $x[k]$'s. Note that \begin{align} y[n] &= x[n]+y[n-1]\\ &= x[n] + \left(x[n-1]+y[n-2]\right)\\ &= x[n]+x[n-1]+\left(x[n-2]+y[n-3]\right)\\ &\ddots\\ &= \sum_{k\leq n} x[k] \end{align} Thus, $z[n] = y[n]+w[n]$ is the sum of two independent random variables and so \begin{align}\require{cancel}E[(z[n])^2] &= E[(y[n])^2] + E[(w[n])^2]+2E[y[n]]\cancelto{0}{E[w[n]]}\\ &= E[(y[n])^2] + \sigma_w^2\tag{1}\label{1}\end{align} where $E$ denotes expectation (as the OP suspected) and the expectation is indeed calculating the mean, not of the random variable $z[n]$ but of the random variable $(z[n])^2$, and $\sigma^2$ is the variance of the AWGN. So, the definition of $\mathsf{SNR}$ that the OP is reading about, viz. $\frac{E[y^2]}{\sigma_w^2}$ is the ratio of the two terms in $(1)$. The numerator is the instantaneous power of the output signal $y$ and the denominator is the instantaneous power of the AWGN. This definition of $\mathsf{SNR}$ is deemed by the authors of the paper that the OP is reading to be the most convenient for their purposes. Others may choose to carry out similar analyses using different definitions of $\mathsf{SNR}$ and their formulas will appear to be different. But, arguments about "My $\mathsf{SNR}$ is larger than your $\mathsf{SNR}$" are readily resolved by refusing to compare apples with oranges and looking at the important parameters: which system achieves smaller error probability, or needs smaller (peak or average) transmitter power, uses smaller bandwidth, etc. The rest is just semantics.

• Thank you for your explanation and answer in detail along with the derivation. Can the derivation and the theory supporting the explanation applicable to SNR computed for non-gaussian distributuon? – Ria George Jul 1 '17 at 17:15
• Nothing in what I wrote requires $w[n]$ to be a Gaussian random variable, and all the above is applicable to nonGaussian noise as well. If $w[n]$ has nonzero mean, $E[(w[n])^2]=\mu_w^2+\sigma_w^2$ and so that is a minor difference that needs to be accounted for; again regardless of whether $w[n]$ is Gaussian or not. – Dilip Sarwate Jul 2 '17 at 2:41
• Thank you for your reply. However, I cannot find from your answer if the noise is complex, circularly symmetric, $w \sim CN(0,2\sigma^2_w)$ (Case 2 in my Question), then due to real and imaginary component,would the denominator be $2\sigma^2_w$? – Ria George Jul 5 '17 at 2:18
• I did not address your Question 2) at all, but what I said above is applicable to Question 2) also: an author can define $\mathsf{SNR}$ to be whatever is most convenient or relevant to the author's purposes. What is definitely incorrect is your proposed formula for $\mathsf{SNR}$. Since $x$ and $y$ are complex-valued, so is $E[x^2]$ complex-valued making the $\mathsf{SNR}$ also a complex-valued quantity. Most people would use $E[|x|^2]$ in these applications...... – Dilip Sarwate Jul 5 '17 at 2:28
• I see I can follow why you used the the numerator with the absolute value -- I think that would take into account the real and imaginary component. Still, the denominator would have 2? CAn you please confirm for complex if this is the formula $SNR = \frac{E[|x|^2]}{2\sigma^2_w}$? – Ria George Jul 5 '17 at 3:31

Based on a physical interpretation, the power of a signal $x(t)$ is related to its square $x^2(t)$. For a random variable $X$, the average power is $\mathsf E[X^2]$. Since the variance is the second central moment, by definition we have $\sigma^2_X=\mathbb E[X-\mathsf E[X]]^2$ which simplifies to $\sigma^2_X=\mathsf E[X^2]-\mathsf E^2[X]$. So if the mean is zero, then $\mathsf E[X^2]=\sigma^2_X$. That is, the variance is equal to the average power. This definition is general regardless if $X$ is "signal" or noise.

• Thank you for your answer. CAn you please confirm by the term signal, did you mean the output variable or the input $x$ (in Case 2)? I am confused because I have used $x$ in case 2 under Question 2. In general, is the SNR calculated with the signal being the observation or the input? If the input, noise and the output is complex valued, and the real and imaginary component of noise each has a variance of $\sigma^2_w$, also, the real and imaginary of the input, $x$ each has variance $\sigma^2_x$, then would the SNR = $\frac{2\sigma^2_x}{2\sigma^2_w}$ – Ria George Jul 6 '17 at 5:08
• Here, the $x$ is the input to the model / the information data (and not the output observations). Is this expression and my understanding correct? – Ria George Jul 6 '17 at 5:08
• It is a generic term. For noise analysis of systems we can often see terms such as input SNR and output SNR. This is because in reality often acquisition of input signal is corrupted by some type of noise (for example measurement noise). Regarding your questions, an example that can help you understand it better is a digital communication system. For SNR calculation in such cases, we usually look at the received signal (i.e. the output of the system) rather than what we have transmitted. This is obviously because the error probability is proportional to what we actually have at the receiver. – msm Jul 6 '17 at 9:08
• So, for complex valued noise, $w \sim CN(0,2\sigma^2_w)$ would there be a 2 in the denominator of the formula for SNR? – Ria George Jul 7 '17 at 18:53
• In the answer by Prof. Dilip, he has mentioned the signal to be y that appears in the numerator of SNR formula. So y is noise corrupted signal and z is the received. But you say that for SNR calculation, the formula should have the output, z of the system. I am confused now. In general, by "signal" in the formula of SNR, should it not be the desired signal i.e., the transmitted signal which would have been noise-free and not the recieved noisy signal? Could you please clarify your previous comment? thanks – Ria George Jul 7 '17 at 19:10

I would add to the previous answer that for a complex random variable the second moment is $$E\{ x(t) x(t)^{*} \} = \sigma^2 + |m(t)|^2$$ where $m(t)$ is the complex mean. The second moment is real. The value $$E\{ x(t)^2\}$$ depends on if the process is improper. For a proper random variable it is zero. There are situations were improper is valid.