Nevets Steprock
2005-06-03 19:45:08 UTC
I'm writing a program that will, among other things, calculate the
correlation coefficient between two stocks.
I'm trying to wrap head my head around whether to use sample variance or
population variance in my equation.
I will only be working within certain dates (ie. between 1998 to 1999) of
the total data, which suggests using sample variance.
I'm concerned about using sample variance when the data is too short. For
example:
12,13,11,23,13,4,56,11,23,13
12,13,11,23,13,4,56,11,23,13
Using population variance, the above series has a correlation of 1
Using sample variance, the above series has a correlation of 0.9
I've searched and searched the internet, but all the pages say the same
thing about using sample variance when the population mean is not known - no
real explanation. Can someone please give me guidance as to the preferred
variance to use. I would hugely appreciate some justification (if it's not
to much to ask) for the decision. If I use sample variance. I will
eventually be asked by my boss why the example above isn't 'perfectly'
correlated
Thanks very much for ANY help you can give me.
Steven
correlation coefficient between two stocks.
I'm trying to wrap head my head around whether to use sample variance or
population variance in my equation.
I will only be working within certain dates (ie. between 1998 to 1999) of
the total data, which suggests using sample variance.
I'm concerned about using sample variance when the data is too short. For
example:
12,13,11,23,13,4,56,11,23,13
12,13,11,23,13,4,56,11,23,13
Using population variance, the above series has a correlation of 1
Using sample variance, the above series has a correlation of 0.9
I've searched and searched the internet, but all the pages say the same
thing about using sample variance when the population mean is not known - no
real explanation. Can someone please give me guidance as to the preferred
variance to use. I would hugely appreciate some justification (if it's not
to much to ask) for the decision. If I use sample variance. I will
eventually be asked by my boss why the example above isn't 'perfectly'
correlated
Thanks very much for ANY help you can give me.
Steven