Covariance calculations and correlations
Source code name: "stat_corr.m"
Programming language: Octave
Topic: Statistics/Descriptive
DMelt Version 1. Last modified: 05/09/2015. License: Free
https://datamelt.org/code/cache/stat_corr_4975.m
To run this script using the DataMelt IDE, copy the above URL link to the menu [File]→[Read script from URL] of the DMelt IDE.



v1=[1,10,20,2,4,7,4,3]
v2=[3,11,10,3,5,5,7,3]
a=cov(v1,v2);           printf('Covariance=%f\n',a)
a=correlation(v1,v2);   printf('Coeff. correlation=%f\n',a)