
Visualizing Data
The strength of the linear relationship betw een the two variables (how tightly
the data lies along a least-squares line through the scatter) is measured by
the covariance, computed by the MATLAB
cov function:
C12 = cov([c1 c2])
C12 =
1.0e+003 *
0.6437 0.9802
0.9802 1.7144
The results are displayed in a symmetric square matrix, with the covariance
of the i th an d j th variables in the (i, j)th position. The i th diagonal element
is the variance of the i th variable.
Covariances have the disadvantage of depending on the units used to measure
the individual variables. They are often divided by the s tandard deviations
5-15
Commenti su questo manuale