I don't knwo Matlab, but:
>
> I create two random signals (each 100 points from gaussian distribution
> from -1 to 1)
You mean 100 IID Gaussian-distributed points, indexed by values from -1
to 1? (I'm assuming this, anyway.)
and find the maximum cross-correlation value (either
> negative or positive, whichever has the larger absolute value).
When you calculate cross-correlation you get a vector of somewhere up to
200 values, corresponding to lags from -1 to 1, possibly not independent
but with quite a lot of degrees of freedom. We can probably pretend they
are independent for crude purposes at least.
When you take the one with maximum absolute value you are selecting the
most extreme of these 200-odd. This will almost never be a value close
to 0; it will be a value corresponding roughly to the 99.5th percentile
of the correlations.
As you're maximizing the absolute value but not actually applying the
transformation to the correlations, you get two peaks, not a standard
"maximum-value" sample distribution F_Y(y)^200 f_Y(y).
(Imagine the same extreme-value selection carried out on ordinary
samples of 100
N(0,1) normal random variables. You would not expect the maximum value
to be anywhere near 0 very often!)
BTW, the two peaks are not quite Gaussian; in particular, f_Y(0) = 0 .
However, I would hazard a guess that they are excellently approximated
by Gaussian peaks.
-Robert Dawson
=================================================================
Instructions for joining and leaving this list and remarks about
the problem of INAPPROPRIATE MESSAGES are available at
http://jse.stat.ncsu.edu/
=================================================================