X=[1.7 1.6 2.8 5.6 1.3 2.2 1.3 1.1 3.2 1.5 5.2 4.6 5.8 3.0]
Y=[3.7 3.9 6.7 9.5 3.4 5.6 3.7 2.7 5.5 2.9 10.7 7.6 11.8 4.1]
Using Matlab/Octave we can calculate Coefficient of correlation (r) and Coefficient of determination (r2) in a following way:
c=corrcoef([X' Y']);
r=c(1,2);
r2=r^2;
In our example we get r=0.95088 and r2=0.90418.
Now what does it mean? Coefficient of determination measures the proportion of variation in Y that is explained by the X. In other words, we can say that 90.4% of the change in Y can be explained by the change in X. In our case we can conclude that 90.4% of change in annual sales is explained by the change in store size. The rest (9.6%) depends on the other factors like localization, staff, management, etc.
Bellow scatter plot of X and Y:
The above scatter plot can be generated in Matlab/Octave by:
figure;
plot(X,Y,'+r');
title('Scatter plot');
When I initially left a comment I seem to have clicked the
ReplyDelete-Notify me when new comments are added- checkbox and from
now on whenever a comment is added I receive 4 emails with the
exact same comment. Perhaps there is a way you are able to remove me
from that service? Kudos!
Feel free to surf to my website ... calories burned walking calculator
Hello There. I found your blog using msn. This is
ReplyDeletean extremely well written article. I will make sure to
bookmark it and come back to read more of your useful information.
Thanks for the post. I'll definitely comeback.
Here is my homepage ... Diets That Work
You should be a part of a contest for one of the best blogs on the net.
ReplyDeleteI am going to recommend this blog!
My weblog weblink