[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-gsl] Covariance calculation in gsl
From: |
Srimal Jayawardena |
Subject: |
[Help-gsl] Covariance calculation in gsl |
Date: |
Thu, 13 May 2010 16:35:11 +1000 |
Hi
I'm not an expert in statistics but I just realised that in the
covariance definition used for
double gsl_stats_covariance (const double data1[], const size_t
stride1, const double data2[], const size_t stride2, const size_t n)
http://www.gnu.org/software/gsl/manual/html_node/Covariance.html
covar = (1/(n - 1)) \sum_{i = 1}^{n} (x_i - \Hat x) (y_i - \Hat y)
Is there any particular reason for dividing with (n-1) instead of just 'n' ?
Whats the reasoning behind this ?
Thanks in advance
Srimal.
--
~
Srimal Jayawardena
BSc (Engineering), BIT, MIET
PhD Candidate
Research School of Information Sciences and Engineering
College of Engineering and Computer Science
Building 115, Corner of North and Daley Roads
Australian National University
T: +61 2 6125 1771
M: +61 422 684 854
F: +61 2 6125 8651
ANU Contact Info : http://arp.anu.edu.au/user/3788
http://srimal.sri-lankan.net/
http://srimal-techdiary.blogspot.com/
- [Help-gsl] Covariance calculation in gsl,
Srimal Jayawardena <=