# Is it possible to estimate variance of noise for a step answer signal?

I know there is not possible to find the true noise of a measured signal. The only way to "find" the noise is to estimate the noise. Noise has the mean 0, but the variance varies.

So assume that we have a signal which look like this: The clean signal is $y(t)$ and the noise is $e(t)$. In this case, $e(t)$ has the variance 1 because it's generated by Octave/MATLAB function 0.05*randn().

So my question is: How can i estimate variance of this noise from this signal?

Hi: In order to estimate the variance, you need to have an underlying model for your signal. So, suppose that the model is

$y_{t+1} = y_t + \epsilon_t$ $~\forall ~ t = 1,\ldots n$.

assuming that $E(\epsilon_t) = 0$ and $var(\epsilon_t) = \sigma^2$.

In this case, you would difference your data in order to get estimates of $\epsilon_{t}$ at each time $t$, and call the estimates $\hat{\epsilon}_t, ~\forall i = 2, \ldots n$.

Then, then an unbiased estimate of $\sigma^2 , \hat{\sigma}^2$, $= \frac{1}{n-2} \sum_{i=2}^{n} (\hat{\epsilon_i} - 0)^2$.

But that estimate is critically dependent on the assumed model for the response $y_{t}$ ( this model is sometimes used in finance for the log price at time t+1 and is referred to as a random walk model ). A different model will lead to a different estimate of the noise because the assumptions about the noise will be quite different in each case. I hope this helps some.

Here is the answer. If we have a measured signal $y_m(t)$ and we know that there is a noise $e(t)$ inside $y_m(t)$. Our goal is to extract $e(t)$ from $y_m(t)$.

So lets say that we have a signal which look like this: I have generate this by using this Octave/MATLAB code

>> ym = y + 0.03*randn(1, length(y));


The command randn() gives a vector of dimension 1 and length length(y). The vector contains noise of mean 0 and variance 1. Notice that I scale the variance with 0.03.

So to find the variance I need to use this command

>> var(ym)
ans =  0.037284


Now we have found our variance $\sigma ^2$

But assume that we want to know the scalar of the noise. We choose a new $y_m(t)$ with noise scalar 9.

ym = y + 9*randn(1, length(y));


This is much noise.

>> ym = y + 9*randn(1, length(y));
>> var(ym)
ans =  81.339
>> sqrt(var(ym))
ans =  9.0188
>>


We simply find the standard deviation. We can also type in.

>> std(ym)
ans =  9.0188


So now we know the scalar of the noise. The command randn() gives $\sigma ^2 = 1$ and then we can generate the estimated noise $e(t)$ from $y_m(t)$ just by know the scalar of the noise.