I have a rather simple question that needs addressing in matlab. I think I understand but I need someone to clarify I'm doing this correctly:
In the following example I'm trying to calculate the correlation between two vectors and the p values for the correlation.
dat = [1,3,45,2,5,56,75,3,3.3];
dat2 = [3,33,5,6,4,3,2,5,7];
[R,p] = corrcoef(dat,dat2,'rows','pairwise');
R2 = R(1,2).^2;
pvalue = p(1,2);
From this I have a R2 value of 0.11 and a p value of 0.38. Does this mean that the vectors are correlated by 0.11 (i.e. 11%) and this would be expected to occur 38 % of the same, so 62 % of the time a different correlation could occur?