Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Correlation Coefficients Algorithm in C#?

I have been tasked to calculate correlation coefficients of two input arrays. I see the Measurement Studio has a Cross Correlation method, but I was told this was not what I wanted. Does Measurement Studio offer this calculation? If not, is there a way to use some of the existing Measurement Studio functions to calculate the Correlation Coefficients?

Thanks in advance!
Derek
0 Kudos
Message 1 of 3
(7,067 Views)
Sorry, Measurement Studio does not have a method for calculating the correlation coefficient of two arbitrary input arrays. Generally, we return statistical error in the form of the mean squared error when you perform a statistical operation such as a curve fit. You will find that some methods in the Statistics class come in handy when calculating a correlation coefficient, though.

The correlation coefficient is the covariance of the two arrays divided by the product of the variances of each array. The covariance is the average of the product of the differences of each pair of correlated elements from their respective means. Do a web search on "random variable statistics correlation coefficient" to get an abundance of websites that will give you formulas
for this computation.

Good luck with your project.

Tony H
Measurement Studio
Message 2 of 3
(7,067 Views)
Hi Tony,

Not the answer I was hoping for, but I appreciate your honesty!

Thanks,
Derek
0 Kudos
Message 3 of 3
(7,067 Views)