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.