Let Us C Solution | Chapter 14 Exercise C (O) | How to calculate correlation coefficient r in C?
Duration: 17:50 Min | Sep 10, 2023
For the following set of n data points (x,y), compute the correlation coefficient r, given by a formula.
r = (xysum - xsum*ysum) / (sqrt((n*x2sum - xsum*xsum)*(n*y2sum - ysum*ysum)));
x y
34.22 102.43
39.87 100.93
41.85 97.43
43.23 97.81
40.06 98.32
53.29 98.32
53.29 100.07
54.14 97.08
49.12 91.59
40.71 94.85
55.15 94.65