Re: correlation of random variables



In article <43de103b$1@cs1>, Jeroen <no_mail@xxxxxxxxx> wrote:

> I agree that for every finite length sample of the random processes x
> and y, the theoretical statistics are only approached by the practical
> calculations. But the value of 0.75 is indeed a result of the fact that
> x and y both have a (theoretic) mean of 0.5. If I eliminate this mean:
>
> xcorr(x-0.5,y-0.5,0,'coeff')
>
> Then I get -4.531932291179145e-004, which approaches zero (as
> theoretically expected). According your first statement:
>
> > No! The means of a pair of random variables have absolutely
> > nothing to do with their correlation.
>
> this should also lead to 0.75.
>
> Jeroen

Yes, that which xcorr produces does indeed reflect the mean
of the variables, but only because xcorr does not compute
the true correlation coefficient between two random variables.

It produces the dot product of those variables, as shown by
doc xcorr. When 'coeff' is used, it scales by the standard
deviations. This is still NOT the true statistical coefficient
of correlation between two variables, nor does the xcorr
document imply that.

http://mathworld.wolfram.com/CorrelationCoefficient.html

The coefficient of correlation between two random variables
is given by

sum((x-mean(x)).*(y-mean(y)))/(std(x)*std(y))

This is the number that a function like corrcoef will produce.
Also note that adding any constant to x or y will have no
impact on the coefficient of correlation.

The problem is the original poster asked about a correlation
coefficient, but then was looking at the output of xcorr.

Yes, it is true that the output of xcorr (as opposed to the
coefficient of correlation) will have a non-zero component
due to the non-zero mean of its inputs.

John


--
The best material model of a cat is another, or preferably the same, cat.
A. Rosenblueth, Philosophy of Science, 1945

Those who can't laugh at themselves leave the job to others.
Anonymous
.



Relevant Pages

  • Re: correlation of random variables
    ... > John D'Errico wrote: ... that which xcorr produces does indeed reflect the mean ... >> the true correlation coefficient between two random variables. ...
    (comp.soft-sys.matlab)
  • Re: correlation of random variables
    ... the theoretical statistics are only approached by the practical calculations. ... that which xcorr produces does indeed reflect the mean ... the true correlation coefficient between two random variables. ...
    (comp.soft-sys.matlab)
  • Dependent, Indentically Distributed Random Variables
    ... Suppose I know that 2 random variables X and Y have identical ... distribution function f, and they are correlated with correlation ... coefficient r. ...
    (sci.stat.math)
  • Re: multicollinearity in regression
    ... I could use Analysis of Covariance but 2 of the independent variables ... I'm guessing that in the model with LOGSIZE, the LOGSIZE coefficient is ... multicollinearity: it may be that you can then see a sensible approach ... I always find it helpful to calculate the correlation coefficient ...
    (sci.stat.consult)
  • Re: OT: "Rabbit Hunting" in stat/handicapping
    ... of random variables into the correlation hat. ... Using the runs test to see what the expectation is in this situation, ... So, with 10 random variables thrown into the correlation bonnet, we ...
    (rec.gambling.poker)