Link to home
Start Free TrialLog in
Avatar of reddal
reddal

asked on

Calculating correlation coefficient in SQL Server

Hi,

I want to calculate the correlation between 2 numbers in SQL Server T-SQL. ie this http://en.wikipedia.org/wiki/Correlation

I have a table with 2 columns that have floating point values and I want to get the correlation between the values in a quick easy way.

Does anyone already have a script for this (or a UDF or stored proc) - or do I need to wade through the equation and do it myself?

thanks - Reddal

its MS SQL Server 2008 if that helps
ASKER CERTIFIED SOLUTION
Avatar of Patrick Matthews
Patrick Matthews
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of reddal
reddal

ASKER

Perfect - thanks.