describe(deprecated)/linearcorrelation - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : describe(deprecated)/linearcorrelation

stats[describe]

  

linearcorrelation

  

Coefficient of linear correlation between two data lists

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

stats[describe, linearcorrelation](data1, data2)

describe[linearcorrelation](data1, data2)

Parameters

data1

-

first statistical list

data2

-

second statistical list

Description

• 

Important: The stats package has been deprecated. Use the superseding package Statistics instead.

• 

The function linearcorrelation of the subpackage stats[describe, ...] computes the coefficient of linear correlation between two statistical lists.

• 

The linear correlation measures how well a linear function (a straight line) explains the relationship between two data lists. If a straight line is an excellent explanation of the relationship, then the linear correlation coefficient will have a high magnitude. The correlation is positive if an increase in one variable corresponds to an increase in the other, and negative when an increase in one corresponds to a decrease in the other. The range of this function is -1 (high negative correlation) to 0 (no linear correlation) to 1 (high positive linear correlation).

• 

The two data lists must have the same number of observations, with the same weights for each corresponding element.

• 

The coefficient of linear correlation is computed by dividing the covariance by the square root of the product of the variance of the two data lists.

• 

Classes are assumed to be represented by the class mark, for example 10..12 has the value 11.

• 

See stats[describe, covariance] and stats[describe, variance] for the treatment of missing data.

• 

There are other measures of correlation besides the linear correlation. A low value for the coefficient of linear correlation does not imply that the data is not correlated. For example, if the pairs of data describe a circle, the correlation is high with respect to the circle, but low with respect to a straight line.

• 

The command with(stats[describe],linearcorrelation) allows the use of the abbreviated form of this command.

Examples

Important: The stats package has been deprecated. Use the superseding package Statistics instead.

withstats:

These two sets of data are on an increasing straight line

data11,2,3

data11,2,3

(1)

data23,5,7

data23,5,7

(2)

describelinearcorrelationdata1,data2:evalf

3.,5.,7.

(3)

These are on a decreasing straight line

data31,2,3

data31,2,3

(4)

data47,5,3

data47,5,3

(5)

describelinearcorrelationdata3,data4:evalf

7.,5.,3.

(6)

These have low correlation

data51,2,3,4,5

data51,2,3,4,5

(7)

data60,5,6,1,1

data60,5,−6,1,1

(8)

describelinearcorrelationdata5,data6:evalf

0.,5.,−6.,1.,1.

(9)

See Also

describe(deprecated)[covariance]

describe(deprecated)[variance]

Statistics

Statistics[Correlation]

stats(deprecated)[data]

transform(deprecated)[classmark]