|See also:||twrandomsample twpvalue twnormalize tw1d twlinreg twclt|
|Description:||the teachware quantlet twpearson gives a visual demonstration of the form of the Pearson correlation coefficient. In particular, it shows why the product moment gives a measure of "dependence", and why it is essential to "normalize", i.e. to subtract means, and divide by standard deviations, to preserve that property.|
|x||matrix (n x 2) with user defined data|
; load teachware library library("tware") ; predefine matrix x = normal(100,2) ; call twpearson teachware quantlet twpearson(x)
a two window port display with the scatterplot of the matrix x in the upper port and the values of the product moments in the lower (text) port.