From: gct on
So I'm looking at the timing error associated with a correlation function.
I'm basically taking 10 correlations and I'm curious about change in
standard deviation when I average two different ways. If I average before
calculating standard deviation, I improve my SNR by 10x and will see a
sqrt(10) reduction in standard deviation.

My question is what does it do to the standard deviation/variance if I
post-average, ie calculate variances for each correlation and average them
together? It seems clear to me that the result will be closer to the mean
of the gaussian distribution, but exactly how much closer eludes me.


From: Tim Wescott on
On 06/14/2010 09:34 AM, gct wrote:
> So I'm looking at the timing error associated with a correlation function.
> I'm basically taking 10 correlations and I'm curious about change in
> standard deviation when I average two different ways. If I average before
> calculating standard deviation, I improve my SNR by 10x and will see a
> sqrt(10) reduction in standard deviation.

It's not clear what you're averaging, so I'm going to answer the
question that I think you're asking -- please comment on whether I'm
getting it right.

You're correlating ten times, and you're finding the timing of the
correlation peak each time -- yes?

And this correlation is with respect to some reference, so 0 is no
error, and the variation is plus or minus that -- yes?

Then you average these ten times, and you see your variance go down by
10x, or your standard deviation go down by sqrt(10) -- yes?

> My question is what does it do to the standard deviation/variance if I
> post-average, ie calculate variances for each correlation and average them
> together? It seems clear to me that the result will be closer to the mean
> of the gaussian distribution, but exactly how much closer eludes me.

What do you mean? On lexical analysis you're saying that you're
averaging the variances -- that can't be it. Do you mean that in the
correlation phase you are somehow averaging your input vectors, then
doing the correlation once? And you are asking the difference between
that and doing the correlation ten times, and averaging the outputs?

If the latter, and if your correlation is already pretty good, then
you'll probably get more or less the same results either way. The
process of finding the correlation peak isn't a linear one, however, so
if things are really noisy then averaging input samples (if you can)
then doing the correlation is going to get you better results.

--
Tim Wescott
Control system and signal processing consulting
www.wescottdesign.com
From: gct on
>It's not clear what you're averaging, so I'm going to answer the
>question that I think you're asking -- please comment on whether I'm
>getting it right.
>
>You're correlating ten times, and you're finding the timing of the
>correlation peak each time -- yes?
>
>And this correlation is with respect to some reference, so 0 is no
>error, and the variation is plus or minus that -- yes?
>
>Then you average these ten times, and you see your variance go down by
>10x, or your standard deviation go down by sqrt(10) -- yes?
>
All correct

>> My question is what does it do to the standard deviation/variance if I
>> post-average, ie calculate variances for each correlation and average
them
>> together? It seems clear to me that the result will be closer to the
mean
>> of the gaussian distribution, but exactly how much closer eludes me.
>
>What do you mean? On lexical analysis you're saying that you're
>averaging the variances -- that can't be it. Do you mean that in the
>correlation phase you are somehow averaging your input vectors, then
>doing the correlation once? And you are asking the difference between
>that and doing the correlation ten times, and averaging the outputs?
>
That's right, I'm looking for the variance change between averaging 10
correlations and finding the standard deviation and finding 10 standard
deviations and averaging them (it's not me that's doing this but I've been
asked to analyze it)

>If the latter, and if your correlation is already pretty good, then
>you'll probably get more or less the same results either way. The
>process of finding the correlation peak isn't a linear one, however, so
>if things are really noisy then averaging input samples (if you can)
>then doing the correlation is going to get you better results.
>
>--
>Tim Wescott
>Control system and signal processing consulting
>www.wescottdesign.com
>
From: Clay on
On Jun 14, 1:15 pm, "gct" <smcallis(a)n_o_s_p_a_m.gmail.com> wrote:
> >It's not clear what you're averaging, so I'm going to answer the
> >question that I think you're asking -- please comment on whether I'm
> >getting it right.
>
> >You're correlating ten times, and you're finding the timing of the
> >correlation peak each time -- yes?
>
> >And this correlation is with respect to some reference, so 0 is no
> >error, and the variation is plus or minus that -- yes?
>
> >Then you average these ten times, and you see your variance go down by
> >10x, or your standard deviation go down by sqrt(10) -- yes?
>
> All correct
>
> >> My question is what does it do to the standard deviation/variance if I
> >> post-average, ie calculate variances for each correlation and average
> them
> >> together?  It seems clear to me that the result will be closer to the
> mean
> >> of the gaussian distribution, but exactly how much closer eludes me.
>
> >What do you mean?  On lexical analysis you're saying that you're
> >averaging the variances -- that can't be it.  Do you mean that in the
> >correlation phase you are somehow averaging your input vectors, then
> >doing the correlation once?  And you are asking the difference between
> >that and doing the correlation ten times, and averaging the outputs?
>
> That's right, I'm looking for the variance change between averaging 10
> correlations and finding the standard deviation and finding 10 standard
> deviations and averaging them (it's not me that's doing this but I've been
> asked to analyze it)
>
>
>
> >If the latter, and if your correlation is already pretty good, then
> >you'll probably get more or less the same results either way.  The
> >process of finding the correlation peak isn't a linear one, however, so
> >if things are really noisy then averaging input samples (if you can)
> >then doing the correlation is going to get you better results.
>
> >--
> >Tim Wescott
> >Control system and signal processing consulting
> >www.wescottdesign.com- Hide quoted text -
>
> - Show quoted text -

What I'm not sure is in one case you collect 10 points of data (in
stats this is called a sample) and from that sample you calc. a
standard deviation. Then are you saying you repeat this process where
you calculate for 10 samples (each consisting of 10 data points), 10
standard deviations and then average those numbers together to get
down to a single summary statistic. And on the other hand are you
saying you collect 1 sample of 100 data points and then find its
summary statistic. If true, you want to add variances and not standard
deviations for the 10 sets of 10 computation. The reason for this is
sqrt(a+b) != sqrt(a) + sqrt(b) in general.

Please write more clearly what you are really doing, and we may be
able to offer greater help.

Clay