public inbox for gsl-discuss@sourceware.org
 help / color / mirror / Atom feed
* correlation coefficient
@ 2007-03-15 23:06 Patrick Alken
  2007-03-15 23:18 ` Ben Klemens
  2007-03-16 15:51 ` Brian Gough
  0 siblings, 2 replies; 9+ messages in thread
From: Patrick Alken @ 2007-03-15 23:06 UTC (permalink / raw)
  To: gsl-discuss

Hi,

  Is there any interest in putting a new function in the
statistics area for calculating the Pearson correlation coefficient?
I think this can be done safely in gsl by just using

r = gsl_stats_covariance(x,y) / (gsl_stats_sd(x) * gsl_stats_sd(y))

but it would be more efficient to calculate everything in 1 pass
through the data and I believe there is a stable algorithm to do
this (similar to how the mean/variance is calculated). This is
such a common function for people who work with data so I think
it'd be nice to have it in gsl :)

Patrick Alken

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2007-03-20 15:41 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-15 23:06 correlation coefficient Patrick Alken
2007-03-15 23:18 ` Ben Klemens
2007-03-16 15:51 ` Brian Gough
2007-03-16 16:01   ` keith.briggs
2007-03-16 16:05   ` James Theiler
2007-03-16 16:36     ` Patrick Alken
2007-03-16 22:15   ` Patrick Alken
2007-03-20 14:11     ` Brian Gough
2007-03-20 15:41       ` Patrick Alken

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).